From f9e65c2b1f448cd27c597ec727b63bebde2fbdff Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Fri, 19 May 2000 08:24:16 +0000 Subject: don't use $match for something different than (#b)ackrefs (11464) --- Completion/Base/_arguments | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'Completion/Base') diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments index 8aad10852..f819f69c9 100644 --- a/Completion/Base/_arguments +++ b/Completion/Base/_arguments @@ -164,7 +164,7 @@ zstyle -s ":completion:${curcontext}:options" auto-description autod if (( $# )) && comparguments "$multi[@]" "$autod" "$@"; then local action noargs aret expl local tried - local next direct odirect equal single match matched ws tmp1 tmp2 tmp3 + local next direct odirect equal single matcher matched ws tmp1 tmp2 tmp3 local opts subc tc prefix suffix descrs actions subcs local origpre="$PREFIX" origipre="$IPREFIX" @@ -196,6 +196,8 @@ if (( $# )) && comparguments "$multi[@]" "$autod" "$@"; then fi fi + comparguments -M matcher + context=() state=() @@ -252,7 +254,7 @@ if (( $# )) && comparguments "$multi[@]" "$autod" "$@"; then eval ws\=\( "${action[3,-3]}" \) - _describe -t "$subc" "$descr" ws -M "$match" "$subopts[@]" + _describe -t "$subc" "$descr" ws -M "$matcher" "$subopts[@]" tried=yes elif [[ "$action" = \(*\) ]]; then @@ -307,8 +309,6 @@ if (( $# )) && comparguments "$multi[@]" "$autod" "$@"; then PREFIX="$origpre" IPREFIX="$origipre" - comparguments -M match - if comparguments -s single; then if [[ "$single" = direct ]]; then @@ -342,15 +342,15 @@ if (( $# )) && comparguments "$multi[@]" "$autod" "$@"; then next=( "$next[@]" "$odirect[@]" ) if [[ -n "$ismulti" ]]; then _ms_opt=yes - _ms_match="$_ms_match $match" + _ms_match="$_ms_match $matcher" _ms_optnext=( "$_ms_optnext[@]" "$next[@]" ) _ms_optdirect=( "$_ms_optdirect[@]" "$direct[@]" ) _ms_optequal=( "$_ms_optequal[@]" "$equal[@]" ) else _describe -o option \ - next -Q -M "$match" -- \ - direct -QS '' -M "$match" -- \ - equal -QqS= -M "$match" + next -Q -M "$matcher" -- \ + direct -QS '' -M "$matcher" -- \ + equal -QqS= -M "$matcher" fi fi PREFIX="$prevpre" @@ -368,7 +368,8 @@ if (( $# )) && comparguments "$multi[@]" "$autod" "$@"; then suffix="$SUFFIX" PREFIX="${PREFIX%%\=*}" SUFFIX='' - compadd -M "$match" -D equal - "${(@)equal%%:*}" + + compadd -M "$matcher" -D equal - "${(@)equal%%:*}" if [[ $#equal -eq 1 ]]; then PREFIX="$prefix" -- cgit 1.4.1