summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:12:31 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:12:31 +0000
commit500085176c8733062f313798e3bcee4efa8d0a30 (patch)
treeba89a5673ecbf444a56d13e3a98d4646a7da6827 /Completion
parent0c3c55faefbb6f2e2e4c345cf205c79cbc8cd045 (diff)
downloadzsh-500085176c8733062f313798e3bcee4efa8d0a30.tar.gz
zsh-500085176c8733062f313798e3bcee4efa8d0a30.tar.xz
zsh-500085176c8733062f313798e3bcee4efa8d0a30.zip
moved to Completion/Base/Utility/_alternative
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/_alternative82
1 files changed, 0 insertions, 82 deletions
diff --git a/Completion/Core/_alternative b/Completion/Core/_alternative
deleted file mode 100644
index d6aef96b6..000000000
--- a/Completion/Core/_alternative
+++ /dev/null
@@ -1,82 +0,0 @@
-#autoload
-
-local tags def expl descr action mesgs nm="$compstate[nmatches]" subopts
-local opt curcontext="$curcontext"
-
-subopts=()
-while getopts 'O:C:' opt; do
-  case "$opt" in
-  O) subopts=( "${(@P)OPTARG}" ) ;;
-  C) curcontext="${curcontext%:*}:$OPTARG" ;;
-  esac
-done
-
-shift OPTIND-1
-
-[[ "$1" = -(|-) ]] && shift
-
-mesgs=()
-
-_tags "${(@)argv%%:*}"
-
-while _tags; do
-  for def; do
-    if _requested "${def%%:*}"; then
-      descr="${${def#*:}%%:*}"
-      action="${def#*:*:}"
-
-      _description "${def%%:*}" expl "$descr"
-
-      if [[ "$action" = \ # ]]; then
-
-        # An empty action means that we should just display a message.
-
-        mesgs=( "$mesgs[@]" "$descr")
-      elif [[ "$action" = \(\(*\)\) ]]; then
-        local ws
-
-        # ((...)) contains literal strings with descriptions.
-
-        eval ws\=\( "${action[3,-3]}" \)
-
-        _describe "$descr" ws -M 'r:|[_-]=* r:|=*' "$subopts[@]"
-      elif [[ "$action" = \(*\) ]]; then
-
-        # Anything inside `(...)' is added directly.
-
-        _all_labels "${def%%:*}" expl "$descr" \
-            compadd "$subopts[@]" - ${=action[2,-2]}
-      elif [[ "$action" = \{*\} ]]; then
-
-        # A string in braces is evaluated.
-
-        while _next_label "${def%%:*}" expl "$descr"; do
-          eval "$action[2,-2]"
-        done
-      elif [[ "$action" = \ * ]]; then
-
-        # If the action starts with a space, we just call it.
-
-        eval "action=( $action )"
-        while _next_label "${def%%:*}" expl "$descr"; do
-          "$action[@]"
-        done
-      else
-
-        # Otherwise we call it with the description-arguments built above.
-
-        eval "action=( $action )"
-	while _next_label "${def%%:*}" expl "$descr"; do
-          "$action[1]" "$subopts[@]" "$expl[@]" "${(@)action[2,-1]}"
-        done
-      fi
-    fi
-  done
-  [[ nm -ne compstate[nmatches] ]] && return 0
-done
-
-for descr in "$mesgs[@]"; do
-  _message "$descr"
-done
-
-return 1