about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-03-28 09:50:36 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-03-28 09:50:36 +0000
commit975b4c58d3c88818b6ee8fb31cd45b72d55176ce (patch)
tree4e8d60bf6c48981031474d59431ade24815c7ce2
parente48f71e2165072a813aa91c11b61dae69afc8c3c (diff)
downloadzsh-975b4c58d3c88818b6ee8fb31cd45b72d55176ce.tar.gz
zsh-975b4c58d3c88818b6ee8fb31cd45b72d55176ce.tar.xz
zsh-975b4c58d3c88818b6ee8fb31cd45b72d55176ce.zip
don't add options as completions if a `->state' action was used and we are directly after the option (in the same word) (13809)
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Base/_arguments3
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 92f25d642..3a72167fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-03-28  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 13809: Completion/Base/_arguments: don't add options as
+	completions if a `->state' action was used and we are
+	directly after the option (in the same word)
+
 2001-03-27  Sven Wischnowsky  <wischnow@zsh.org>
 
 	* 13790: Completion/Base/_arguments, Completion/X/_x_arguments,
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index 913e73895..af79571e8 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -319,7 +319,8 @@ if (( $# )) && comparguments -i "$autod" "$@"; then
         fi
       done
 
-      if [[ -z "$matched$hasopts" ]] && _requested options &&
+      if [[ -z "$matched$hasopts" && ( -z "$aret" || "$PREFIX" = "$origpre" ) ]] &&
+          _requested options &&
           { ! zstyle -T ":completion:${curcontext}:options" prefix-needed ||
             [[ "$origpre" = [-+]* || -z "$aret$mesg$tried" ]] } ; then
 	local prevpre="$PREFIX" previpre="$IPREFIX"