From e6ab106e179dbf583f3eebe1a842cfc04b7e2a14 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 17 Feb 2000 09:26:31 +0000 Subject: zsh-workers/9768 --- Completion/Core/_path_files | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Completion/Core') diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index 7acab453c..8c9981f53 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -253,6 +253,7 @@ for prepath in "$prepaths[@]"; do # Get the matching files by globbing. + tmp2=( "$tmp1[@]" ) if [[ "$tpre$tsuf" = */* ]]; then if [[ ! -o globdots && "$PREFIX" = .* ]]; then tmp1=( ${^tmp1}${skipped}*(-/) ${^tmp1}${skipped}.*(-/) ) @@ -287,7 +288,6 @@ for prepath in "$prepaths[@]"; do # See which of them match what's on the line. if [[ -n "$_comp_correct" ]]; then - tmp2=( "$tmp1[@]" ) builtin compadd -D tmp1 -F _comp_ignore "$matcher[@]" - "${(@)tmp1:t}" if [[ $#tmp1 -eq 0 ]]; then @@ -333,6 +333,7 @@ for prepath in "$prepaths[@]"; do # if none of the patterns match. if [[ -z "$tpre$tsuf" && -n "$pre$suf" ]]; then + tmp1=( "$tmp2[@]" ) pfxsfx=(-S '' "$pfxsfx[@]") break elif [[ "$haspats" = no && -z "$tpre$tsuf" && @@ -382,7 +383,7 @@ for prepath in "$prepaths[@]"; do # There are more components, so skip over the next components and make a # slash be added. - tmp2="${(M)tpre##((.|..|)/)##}" ### + tmp2="${(M)tpre##((.|..|)/)##}" if [[ -n "$tmp2" ]]; then skipped="/$tmp2" tpre="${tpre#$tmp2}" -- cgit 1.4.1