about summary refs log tree commit diff
path: root/Completion/Base/_arguments
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 /Completion/Base/_arguments
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)
Diffstat (limited to 'Completion/Base/_arguments')
-rw-r--r--Completion/Base/_arguments3
1 files changed, 2 insertions, 1 deletions
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"