about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Base/Utility/_arguments7
-rw-r--r--Completion/Unix/Type/_services1
3 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index dc6987c0a..71dd0f63a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2002-05-14  Sven Wischnowsky  <wischnow@zsh.org>
 
+	* 17148: Completion/Base/Utility/_arguments,
+	Completion/Unix/Type/_services: fix for _arguments: don't use
+	argument-tag when completing options; fix for _services: leave
+	loop when matches were produced
+
 	* 17147: Completion/Base/Utility/_describe,
 	Completion/Zsh/Command/_zstyle, Doc/Zsh/compsys.yo,
 	Src/Zle/computil.c: allow users to give the maximum number of
diff --git a/Completion/Base/Utility/_arguments b/Completion/Base/Utility/_arguments
index 826d5b5c2..0cfc60b54 100644
--- a/Completion/Base/Utility/_arguments
+++ b/Completion/Base/Utility/_arguments
@@ -335,9 +335,11 @@ if (( $# )) && comparguments -i "$autod" "$singopt[@]" "$@"; then
          [[ -z "$hasopts" &&
             -z "$matched" &&
             ( -z "$aret" || "$PREFIX" = "$origpre" ) ]] &&
-          { ! zstyle -T ":completion:${curcontext}:options" prefix-needed ||
+          { ! zstyle -T ":completion:${oldcontext%:*}:options" prefix-needed ||
             [[ "$origpre" = [-+]* || -z "$aret$mesg$tried" ]] } ; then
-	local prevpre="$PREFIX" previpre="$IPREFIX"
+	local prevpre="$PREFIX" previpre="$IPREFIX" prevcontext="$curcontext"
+
+        curcontext="${oldcontext%:*}:options"
 
 	hasopts=yes
 
@@ -389,6 +391,7 @@ if (( $# )) && comparguments -i "$autod" "$singopt[@]" "$@"; then
         fi
 	PREFIX="$prevpre"
 	IPREFIX="$previpre"
+        curcontext="$prevcontext"
       fi
       [[ -n "$tried" && "${${alwopt:+$origpre}:-$PREFIX}" != [-+]* ]] && break
     done
diff --git a/Completion/Unix/Type/_services b/Completion/Unix/Type/_services
index 837a77586..670aed05b 100644
--- a/Completion/Unix/Type/_services
+++ b/Completion/Unix/Type/_services
@@ -18,6 +18,7 @@ while _tags; do
     compadd  -a inits && ret=0
   _requested xinetd expl 'xinetd services' \
     compadd  -a xinetds && ret=0
+  (( ret )) || break
 done
 
 return $ret