about summary refs log tree commit diff
path: root/Completion/Base
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-10-21 12:54:28 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-10-21 12:54:28 +0000
commitbc182b8c2f269a7f1ef2222a481b07f3488ae5f8 (patch)
treec9456c9443316d7c8f6eee90728e9b5354ce028d /Completion/Base
parent242c5843d7337cf9ce4bb39bed5d825fc0fe0411 (diff)
downloadzsh-bc182b8c2f269a7f1ef2222a481b07f3488ae5f8.tar.gz
zsh-bc182b8c2f269a7f1ef2222a481b07f3488ae5f8.tar.xz
zsh-bc182b8c2f269a7f1ef2222a481b07f3488ae5f8.zip
zsh-workers/8360
Diffstat (limited to 'Completion/Base')
-rw-r--r--Completion/Base/_arguments6
-rw-r--r--Completion/Base/_values2
2 files changed, 5 insertions, 3 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index a948d27e4..18ddf0327 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -71,7 +71,7 @@ if (( long )); then
 
     lopts=("--${(@)^${(@)${(@)${(@M)${(@ps:\n:j:\n:)${(@)${(@M)${(@f)$(${~words[1]} --help 2>&1)//\[--/
 --}:#[ 	]#-*}//,/
-}}:#[ 	]#--*}#*--}%%[, ]*}:#}")
+}}:#[ 	]#--*}#*--}%%[], ]*}:#}")
 
     # Now remove all ignored options ...
 
@@ -227,7 +227,8 @@ if comparguments -i "$compconfig[autodescribe_options]" "$@"; then
 
     if [[ -z "$matched" ]] &&
        comparguments -O next direct odirect equal &&
-       [[ ( ( nm -eq compstate[nmatches] || -n "$noargs" ) && -z "$aret" ) ||
+       [[ ( ( nm -eq compstate[nmatches] || -n "$noargs" ) &&
+            -z "$aret" && -z "$mesg" ) ||
           -z "$compconfig[option_prefix]" || 
           "$compconfig[option_prefix]" = *\!${cmd}* ||
           "$PREFIX" = [-+]* ]]; then
@@ -246,6 +247,7 @@ if comparguments -i "$compconfig[autodescribe_options]" "$@"; then
 	  compadd "$expl[@]" -QqS= - "${PREFIX}${SUFFIX}"
         else
 	  tmp1=( "$next[@]" "$direct[@]" "$odirect[@]" "$equal[@]" )
+	  tmp1=( "${(M@)tmp1:#[-+]?(|:*)}" )
 	  tmp2=( "${PREFIX}${(@M)^${(@)${(@)tmp1%%:*}#[-+]}:#?}" )
 
           _describe -o -c "$cmd" option tmp1 tmp2 -Q -S ''
diff --git a/Completion/Base/_values b/Completion/Base/_values
index 0c8f19a9f..fb70f6e7f 100644
--- a/Completion/Base/_values
+++ b/Completion/Base/_values
@@ -36,7 +36,7 @@ if compvalues -i "$@"; then
     else
       compvalues -d descr
       if [[ ${#noargs}+${#args}+${#opts} -ne 1 ]] && compvalues -s sep; then
-        sep=( "-qQS$sep" )
+        sep=( "-qQS" "$sep" )
       else
         sep=()
       fi