From 293b3f13bfaa1e02489b2e46d01864e86a739cd3 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 1 Sep 1999 12:43:13 +0000 Subject: zsh-workers/7607 --- Completion/Base/_arguments | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Completion') 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 -- cgit 1.4.1