about 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 0170ce307..591cb6ac7 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -71,6 +71,7 @@ if (( long )); then
     lopts=("--${(@)^${(@)${(@)${(@M)${(@ps:\n:j:\n:)${(@)${(@M)${(@f)$(${~words[1]} --help 2>&1)//\[--/
 --}:#[ 	]#-*}//,/
 }}:#[ 	]#--*}#*--}%%[], ]*}:#}")
+    lopts=( "${(@)lopts:#--}" )
 
     # Now remove all ignored options ...
 
@@ -163,7 +164,7 @@ done
 
 _style -s options auto-description autod
 
-if comparguments -i "$autod" "$@"; then
+if (( $# )) && comparguments -i "$autod" "$@"; then
   local nm="$compstate[nmatches]" action noargs aret expl local
   local next direct odirect equal single match matched ws tmp1 tmp2 tmp3
   local opts subc prefix suffix