about summary refs log tree commit diff
path: root/Completion/Base/_arguments
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-29 09:15:12 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-29 09:15:12 +0000
commitd22ee9a5ba4fcedc63b63a0ab904b86471fcad56 (patch)
treef33e9f75149f35cc2335e7f43294c52c523e616f /Completion/Base/_arguments
parenta2750a4effef1db7966530cd39905dbb7cf2b99c (diff)
downloadzsh-d22ee9a5ba4fcedc63b63a0ab904b86471fcad56.tar.gz
zsh-d22ee9a5ba4fcedc63b63a0ab904b86471fcad56.tar.xz
zsh-d22ee9a5ba4fcedc63b63a0ab904b86471fcad56.zip
keep information about things to complete in _arguments (11631)
Diffstat (limited to 'Completion/Base/_arguments')
-rw-r--r--Completion/Base/_arguments14
1 files changed, 6 insertions, 8 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index 44895d9d3..5581e5bd9 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -168,7 +168,7 @@ zstyle -s ":completion:${curcontext}:options" auto-description autod
 if (( $# )) && comparguments -i "$autod" "$@"; then
   local action noargs aret expl local tried
   local next direct odirect equal single matcher matched ws tmp1 tmp2 tmp3
-  local opts subc tc prefix suffix descrs actions subcs
+  local opts subc tc prefix suffix descrs actions subcs anum
   local origpre="$PREFIX" origipre="$IPREFIX" nm="$compstate[nmatches]"
 
   if comparguments -D descrs actions subcs; then
@@ -203,11 +203,12 @@ if (( $# )) && comparguments -i "$autod" "$@"; then
 
   while true; do
     while _tags; do
-      while (( $#descrs )); do
+      anum=1
+      while [[ anum -le  $#descrs ]]; do
 
-	action="$actions[1]"
-	descr="$descrs[1]"
-	subc="$subcs[1]"
+	action="$actions[anum]"
+	descr="$descrs[anum]"
+	subc="$subcs[anum++]"
 
         if [[ -n "$matched" ]] || _requested "$subc"; then
 
@@ -293,9 +294,6 @@ if (( $# )) && comparguments -i "$autod" "$@"; then
             fi
           fi
         fi
-        shift descrs
-        shift actions
-        shift subcs
       done
 
       if [[ -z "$matched$hasopts" ]] && _requested options &&