From 8c15ccd08c114ecde068794de0a176dca14716d6 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 28 Feb 2000 09:22:33 +0000 Subject: zsh-workers/9892 --- Completion/Core/_path_files | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'Completion/Core/_path_files') diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index 2452c3c34..bc3a52e5c 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -163,6 +163,8 @@ if (( $#ignore )); then (( $mopts[(I)-F] )) || mopts=( "$mopts[@]" -F _comp_ignore ) fi +(( $#matcher )) && mopts=( "$mopts[@]" "$matcher[@]" ) + # Now let's have a closer look at the string to complete. if [[ "$pre[1]" = \~ ]]; then @@ -458,26 +460,26 @@ for prepath in "$prepaths[@]"; do if [[ "$tmp3" = */* ]]; then compadd -Qf "$mopts[@]" -p "$linepath$tmp2" -s "/${tmp3#*/}" \ -W "$prepath$realpath$testpath" \ - "$pfxsfx[@]" "$matcher[@]" "r:|/=* r:|=*" \ + "$pfxsfx[@]" -M "r:|/=* r:|=*" \ - "${(@)tmp1%%/*}" else compadd -Qf "$mopts[@]" -p "$linepath$tmp2" \ -W "$prepath$realpath$testpath" \ - "$pfxsfx[@]" "$matcher[@]" "r:|/=* r:|=*" \ + "$pfxsfx[@]" -M "r:|/=* r:|=*" \ - "$tmp1[@]" fi else if [[ "$tmp3" = */* ]]; then atmp=( -Qf "$mopts[@]" -p "$linepath$tmp2" -W "$prepath$realpath$testpath" - "$pfxsfx[@]" "$matcher[@]" "r:|/=* r:|=*" ) + "$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[@]" "$matcher[@]" "r:|/=* r:|=*" \ + "$pfxsfx[@]" -M "r:|/=* r:|=*" \ - "$tmp1[@]" fi fi @@ -525,7 +527,7 @@ for prepath in "$prepaths[@]"; do tmp4="$testpath" compquote tmp4 tmp1 compadd -Qf "$mopts[@]" -p "$linepath$tmp4" -W "$prepath$realpath$testpath" \ - "$pfxsfx[@]" "$matcher[@]" "r:|/=* r:|=*" - "$tmp1[@]" + "$pfxsfx[@]" -M "r:|/=* r:|=*" - "$tmp1[@]" fi done @@ -541,7 +543,7 @@ if zstyle -t ":completion:${curcontext}:paths" expand prefix && if (( $#exppaths )); then PREFIX="${opre}" SUFFIX="${osuf}" - compadd -Q "$mopts[@]" -S '' "$matcher[@]" "r:|/=* r:|=*" -p "$linepath" - "$exppaths[@]" + compadd -Q "$mopts[@]" -S '' -M "r:|/=* r:|=*" -p "$linepath" - "$exppaths[@]" fi fi -- cgit 1.4.1