From 3076ed44d33ac699b306824214951c436c4a7a4e Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Fri, 11 Feb 2000 11:14:51 +0000 Subject: zsh-workers/9677 --- Completion/Core/_match | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'Completion/Core/_match') diff --git a/Completion/Core/_match b/Completion/Core/_match index 42416242d..ad481f23b 100644 --- a/Completion/Core/_match +++ b/Completion/Core/_match @@ -12,12 +12,10 @@ local tmp opm="$compstate[pattern_match]" ret=0 orig ins local curcontext="${curcontext/:[^:]#:/:match:}" -# Do nothing if we don't have a pattern or there are still global -# match specifications to try. +# Do nothing if we don't have a pattern. tmp="${${:-$PREFIX$SUFFIX}#[~=]}" -[[ "$tmp:q" = "$tmp" || - compstate[matcher] -ne compstate[total_matchers] ]] && return 1 +[[ "$tmp:q" = "$tmp" ]] && return 1 zstyle -s ":completion:${curcontext}:" original orig zstyle -b ":completion:${curcontext}:" insert-unambiguous ins @@ -25,11 +23,9 @@ zstyle -b ":completion:${curcontext}:" insert-unambiguous ins # Try completion without inserting a `*'? if [[ -n "$orig" ]]; then - compstate[matcher]=-1 compstate[pattern_match]='-' _complete && ret=1 compstate[pattern_match]="$opm" - compstate[matcher]="$compstate[total_matchers]" if (( ret )); then [[ "$ins" = yes && @@ -43,11 +39,9 @@ fi [[ "$orig" = only ]] && return 1 -compstate[matcher]=-1 compstate[pattern_match]='*' _complete && ret=1 compstate[pattern_match]="$opm" -compstate[matcher]="$compstate[total_matchers]" [[ ret -eq 1 && "$ins" = yes && $#compstate[unambiguous] -ge ${#:-${PREFIX}${SUFFIX}} ]] && -- cgit 1.4.1