summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2016-12-01 03:58:13 +0100
committerMikael Magnusson <mikachu@gmail.com>2016-12-01 03:58:13 +0100
commit1ba59c4147e3b82023026bc6784105ccd73b7bd3 (patch)
tree0672c11e14959c4efb8eaabccd9c37cb7fcb7424 /Completion/Unix
parent989f5e590c90a472376f1337053c3c8251eb8804 (diff)
downloadzsh-1ba59c4147e3b82023026bc6784105ccd73b7bd3.tar.gz
zsh-1ba59c4147e3b82023026bc6784105ccd73b7bd3.tar.xz
zsh-1ba59c4147e3b82023026bc6784105ccd73b7bd3.zip
unposted: fix previous commit
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Type/_path_files3
1 files changed, 2 insertions, 1 deletions
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index 041a73ba6..9fa6ae9fc 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -380,6 +380,7 @@ for prepath in "$prepaths[@]"; do
     # to ask why).
     tmp1=${match[1]}
     tpre=${match[2]}
+    tmp2=$tmp1
     tmp1=${tmp1//(#b)\\(?)/$match[1]}
     tpre=${tpre//(#b)\\([^\\\]\[\^\~\(\)\#\*\?])/$match[1]}
     # Theory: donepath needs the quoting of special characters
@@ -388,7 +389,7 @@ for prepath in "$prepaths[@]"; do
     # doing something a bit different.
     tmp3=${donepath//(#b)\\(?)/$match[1]}
     while true; do
-      if [[ -z $path_completion || -d $prepath$realpath$tmp3$tmp1 ]]; then
+      if [[ -z $path_completion || -d $prepath$realpath$tmp3$tmp2 ]]; then
 	tmp3=$tmp3$tmp1/
 	# Now put donepath back the way it should be.  (I think.)
 	donepath=${tmp3//(#b)([\\\]\[\^\~\(\)\#\*\?])/\\$match[1]}