about summary refs log tree commit diff
path: root/Completion/Base/_arguments
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-13 10:41:28 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-13 10:41:28 +0000
commit7eb928e2663197d52898b55cd2ccbe10c3222236 (patch)
treec20c9867c251eac584a9f1c4e1271ed060d42624 /Completion/Base/_arguments
parent2ef449a71d2f681a85453e68b10d3af97dec14ff (diff)
downloadzsh-7eb928e2663197d52898b55cd2ccbe10c3222236.tar.gz
zsh-7eb928e2663197d52898b55cd2ccbe10c3222236.tar.xz
zsh-7eb928e2663197d52898b55cd2ccbe10c3222236.zip
manual/7796
Diffstat (limited to 'Completion/Base/_arguments')
-rw-r--r--Completion/Base/_arguments19
1 files changed, 12 insertions, 7 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index b9af1c072..e0443930b 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -209,7 +209,7 @@ if [[ "$*" != "$_args_cache_descr" ]]; then
 
     # Description for both the `-foo' and `+foo' form?
 
-    if [[ "$1" = (\*|)(-+|+-)* ]]; then
+    if [[ "$1" = (\*|)(-+|+-)[^:]* ]]; then
 
       # With a `*' at the beginning, the option may appear more than
       # once.
@@ -257,7 +257,7 @@ if [[ "$*" != "$_args_cache_descr" ]]; then
         [[ "$tmp" = *[-+] ]] && tmp="$tmp[1,-2]"
       else
         tmp="${1%%:*}"
-        [[ "$tmp" = *[-+] ]] && tmp="$tmp[1,-2]"
+        [[ "$tmp" = [-+]?*[-+] ]] && tmp="$tmp[1,-2]"
 	xor="$xor ${tmp%\=}"
       fi
 
@@ -275,7 +275,7 @@ if [[ "$*" != "$_args_cache_descr" ]]; then
       else
         _args_cache_opts[$tmp]=''
       fi
-      _args_cache_odescr=( "$_args_cache_odescr[@]" "${tmp%[-+=]}:$descr" )
+      _args_cache_odescr=( "$_args_cache_odescr[@]" "${tmp%\=}:$descr" )
       [[ -n "$xor" ]] && 
           _args_cache_xors[${tmp%\=}]="${${xor##[ 	]#}%%[ 	]#}"
     elif [[ "$1" = \*::* ]]; then
@@ -774,11 +774,16 @@ while true; do
 
         eval ws\=\( "${action[3,-3]}" \)
 
-	if _display tmp ws -M 'r:|[_-]=* r:|=*'; then
-          compadd "$expl[@]" -y tmp - "${(@)ws%%:*}"
+	if [[ -n "$compconfig[describe_values]" &&
+              "$compconfig[describe_values]" != *\!${cmd}* ]]; then
+          if _display tmp ws -M 'r:|[_-]=* r:|=*'; then
+            compadd "$expl[@]" -y tmp - "${(@)ws%%:*}"
+          else
+            [[ -n "$matched" ]] && compadd -Q -S -s "$SUFFIX" - "$PREFIX"
+            _message "$descr"
+          fi
         else
-          [[ -n "$matched" ]] && compadd -Q -S -s "$SUFFIX" - "$PREFIX"
-          _message "$descr"
+	  compadd "$expl[@]" - "${(@)ws%%:*}"
         fi
       elif [[ "$action" = \(*\) ]]; then