about summary refs log tree commit diff
path: root/Completion/Base/_argument_sets
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Base/_argument_sets')
-rw-r--r--Completion/Base/_argument_sets4
1 files changed, 4 insertions, 0 deletions
diff --git a/Completion/Base/_argument_sets b/Completion/Base/_argument_sets
index d9c771051..f8a55dad9 100644
--- a/Completion/Base/_argument_sets
+++ b/Completion/Base/_argument_sets
@@ -59,6 +59,10 @@ while true; do
 done
 
 [[ -n "$_ms_opt" ]] &&
+   { ! zstyle -T ":completion:${curcontext}:options" prefix-needed ||
+     [[ "$PREFIX" = [-+]* ||
+     ( -z "$has_args" && ret -ne 300 && nm -eq compstate[nmatches] ) ]] } &&
+  has_args=yes &&
   _describe -o option \
             _ms_soptmid _ms_soptmidadd -Q -S '' -- \
 	    _ms_soptend -Q -- \