summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Unix/Type/_path_files15
2 files changed, 12 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a802b552..097e9f003 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,5 @@
2010-08-06 Peter Stephenson <pws@csr.com>
- * 28131: MACHINES: latest status on Cygwin.
-
* users/15232: Completion/Unix/Type/_path_files: somehow
this didn't get completed.
@@ -13494,5 +13492,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5050 $
+* $Revision: 1.5049 $
*****************************************************
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index 581835efc..1f8be09b8 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -367,17 +367,24 @@ for prepath in "$prepaths[@]"; do
# Explanation of substitution: For tmp1 and tpre, which are used further
# on, we need to remove quotes from everything that's not a pattern
# character, because the code that does the file generation only
- # strips qutoes from pattern characters (you know better than
+ # strips quotes from pattern characters (you know better than
# to ask why). Because we need to test for a real directory,
# however, for tmp2 we unquote everything.
tmp1=${match[1]}
tpre=${match[2]}
tmp2=${(Q)tmp1}
- tmp1=${tmp1//(#b)\\([^\\\]\[\^\~\(\)\#\*\?])/$match[1]}
+ tmp1=${tmp1//(#b)\\(?)/$match[1]}
tpre=${tpre//(#b)\\([^\\\]\[\^\~\(\)\#\*\?])/$match[1]}
+ # Theory: donepath needs the quoting of special characters
+ # still in it. However, we need it without at this point.
+ # (I think.) Note this is different from the above where we're
+ # doing something a bit different.
+ tmp3=${donepath//(#b)\\(?)/$match[1]}
while true; do
- if [[ -z $path_completion || -d $prepath$realpath$donepath$tmp2 ]]; then
- donepath=$donepath$tmp1/
+ 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]}
pre=$tpre
break
elif [[ $tmp1 = (#b)(*)/([^/]#) ]]; then