summary refs log tree commit diff
path: root/Completion/Base/_arguments
diff options
context:
space:
mode:
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"