diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-01 12:43:13 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-01 12:43:13 +0000 |
commit | 293b3f13bfaa1e02489b2e46d01864e86a739cd3 (patch) | |
tree | 8e64a5fd25ee0624a19206a68ca9f4e35f30f69c | |
parent | 3334b38905019c6eccef7e97a08ea1803ca23c31 (diff) | |
download | zsh-293b3f13bfaa1e02489b2e46d01864e86a739cd3.tar.gz zsh-293b3f13bfaa1e02489b2e46d01864e86a739cd3.tar.xz zsh-293b3f13bfaa1e02489b2e46d01864e86a739cd3.zip |
zsh-workers/7607
-rw-r--r-- | Completion/Base/_arguments | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments index 17c4d3203..d2b276cf0 100644 --- a/Completion/Base/_arguments +++ b/Completion/Base/_arguments @@ -7,7 +7,7 @@ setopt localoptions extendedglob local args rest ws cur nth def nm expl descr action opt arg tmp local single uns ret=1 soptseq soptseq1 sopts prefix line -local beg optbeg argbeg nargbeg inopt fromrest +local beg optbeg argbeg nargbeg inopt inrest fromrest # Associative arrays used to collect information about the options. @@ -500,7 +500,10 @@ while [[ cur -gt 0 ]]; do line=( "$line[@]" "$ws[1]" ) [[ -n "$inopt" ]] && nargbeg=$(( beg - 1 )) inopt='' - [[ -z "$args[nth]" && "$rest" = \*::* ]] && break + if [[ -z "$args[nth]" && "$rest" = \*::* ]]; then + inrest=yes + break + fi (( nth++ )) fi fi @@ -537,7 +540,7 @@ if [[ -z "$def" || "$def" = :* ]]; then optbeg="$nargbeg" argbeg="$nargbeg" fromrest=yes - [[ "$def" = \*::* ]] && opt='' + [[ -n "$inrest" ]] && opt='' fi fi |