about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-17 09:26:31 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-17 09:26:31 +0000
commite6ab106e179dbf583f3eebe1a842cfc04b7e2a14 (patch)
treedf3ed4e2bc944db89dd487e1ad745460077abba7 /Completion
parent66b9bee81ee99907a4bafdac62bcc184a574b17e (diff)
downloadzsh-e6ab106e179dbf583f3eebe1a842cfc04b7e2a14.tar.gz
zsh-e6ab106e179dbf583f3eebe1a842cfc04b7e2a14.tar.xz
zsh-e6ab106e179dbf583f3eebe1a842cfc04b7e2a14.zip
zsh-workers/9768
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/_path_files5
1 files changed, 3 insertions, 2 deletions
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}"