From 7eb928e2663197d52898b55cd2ccbe10c3222236 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 13 Sep 1999 10:41:28 +0000 Subject: manual/7796 --- Completion/Base/_arguments | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'Completion/Base/_arguments') 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 -- cgit 1.4.1