From fc95f1a465638327704ba1bf28413b72c6a4226e Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 10 Feb 2000 14:52:33 +0000 Subject: zsh-workers/9657 --- Completion/Core/_path_files | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'Completion/Core/_path_files') diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index 0ec311c64..5ff8d7dd5 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -6,7 +6,7 @@ local linepath realpath donepath prepath testpath exppath skips skipped local tmp1 tmp2 tmp3 tmp4 i orig eorig pre suf tpre tsuf opre osuf cpre local pats haspats=no ignore pfxsfx rem remt sopt gopt opt -local nm=$compstate[nmatches] menu mspec matcher mopts atmp sort match +local nm=$compstate[nmatches] menu matcher mopts atmp sort match typeset -U prepaths exppaths @@ -54,8 +54,6 @@ if (( $#ignore )); then fi fi -(( $#matcher )) && mspec="${matcher[2]}" - if [[ -z "$_file_pat_checked" ]] && zstyle -s ":completion:${curcontext}:files" file-patterns tmp1 && [[ -n "$tmp1" ]]; then @@ -92,7 +90,6 @@ if (( ! $mopts[(I)-[JVX]] )); then fi tmp1=$expl[(I)-M*] if (( tmp1 )); then - mspec="$mspec $expl[1+tmp1]" if (( $#matcher )); then matcher[2]="$matcher[2] $expl[1+tmp1]" else @@ -452,30 +449,26 @@ for prepath in "$prepaths[@]"; do if [[ "$tmp3" = */* ]]; then compadd -Qf "$mopts[@]" -p "$linepath$tmp2" -s "/${tmp3#*/}" \ -W "$prepath$realpath$testpath" \ - "$pfxsfx[@]" \ - -M "r:|/=* r:|=* $mspec" \ + "$pfxsfx[@]" -M "r:|/=* r:|=*" \ - "${(@)tmp1%%/*}" else compadd -Qf "$mopts[@]" -p "$linepath$tmp2" \ -W "$prepath$realpath$testpath" \ - "$pfxsfx[@]" \ - -M "r:|/=* r:|=* $mspec" \ + "$pfxsfx[@]" -M "r:|/=* r:|=*" \ - "$tmp1[@]" fi else if [[ "$tmp3" = */* ]]; then atmp=( -Qf "$mopts[@]" -p "$linepath$tmp2" -W "$prepath$realpath$testpath" - "$pfxsfx[@]" \ - -M "r:|/=* r:|=* $mspec" ) + "$pfxsfx[@]" -M "r:|/=* r:|=*" ) for i in "$tmp1[@]"; do compadd "$atmp[@]" -s "/${i#*/}" - "${i%%/*}" done else compadd -Qf "$mopts[@]" -p "$linepath$tmp2" \ - -W "$prepath$realpath$testpath" \ - "$pfxsfx[@]" \ - -M "r:|/=* r:|=* $mspec" \ + -W "$prepath$realpath$testpath" \ + "$pfxsfx[@]" -M "r:|/=* r:|=*" \ - "$tmp1[@]" fi fi @@ -522,11 +515,8 @@ for prepath in "$prepaths[@]"; do fi tmp4="$testpath" compquote tmp4 tmp1 - compadd -Qf "$mopts[@]" -p "$linepath$tmp4" \ - -W "$prepath$realpath$testpath" \ - "$pfxsfx[@]" \ - -M "r:|/=* r:|=* $mspec" \ - - "$tmp1[@]" + compadd -Qf "$mopts[@]" -p "$linepath$tmp4" -W "$prepath$realpath$testpath" \ + "$pfxsfx[@]" -M "r:|/=* r:|=*" - "$tmp1[@]" fi done @@ -542,8 +532,7 @@ if zstyle -t ":completion:${curcontext}:paths" expand prefix && if (( $#exppaths )); then PREFIX="${opre}" SUFFIX="${osuf}" - compadd -Q "$mopts[@]" -S '' \ - -M "r:|/=* r:|=* $mspec" -p "$linepath" - "$exppaths[@]" + compadd -Q "$mopts[@]" -S '' -M "r:|/=* r:|=*" -p "$linepath" - "$exppaths[@]" fi fi -- cgit 1.4.1