about summary refs log tree commit diff
diff options
context:
space:
mode:
-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"