summary refs log tree commit diff
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2016-12-01 03:40:17 +0100
committerMikael Magnusson <mikachu@gmail.com>2016-12-01 03:42:32 +0100
commit989f5e590c90a472376f1337053c3c8251eb8804 (patch)
treea8ebed61981cedc38b9474574c8b7b56157070aa
parente8699613bcb07c247cb0729636ef6a6bc4ff514f (diff)
downloadzsh-989f5e590c90a472376f1337053c3c8251eb8804.tar.gz
zsh-989f5e590c90a472376f1337053c3c8251eb8804.tar.xz
zsh-989f5e590c90a472376f1337053c3c8251eb8804.zip
40024: Update _path_files since quoting requirements changed in 39412
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Unix/Type/_path_files6
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d2802082..fc49df000 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-12-01  Mikael Magnusson  <mikachu@gmail.com>
+
+	* 40024: Completion/Unix/Type/_path_files: Update _path_files
+	since quoting requirements changed in 39412, this case only
+	triggers when accept-exact-dirs is set.
+
 2016-12-01  Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
 
 	* 40050: Src/compat.c: prepend /**/ to global functions and #ifdefs
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index 32942d7a7..041a73ba6 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -377,11 +377,9 @@ for prepath in "$prepaths[@]"; do
     # on, we need to remove quotes from everything that's not a pattern
     # character, because the code that does the file generation only
     # 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.
+    # to ask why).
     tmp1=${match[1]}
     tpre=${match[2]}
-    tmp2=${(Q)tmp1}
     tmp1=${tmp1//(#b)\\(?)/$match[1]}
     tpre=${tpre//(#b)\\([^\\\]\[\^\~\(\)\#\*\?])/$match[1]}
     # Theory: donepath needs the quoting of special characters
@@ -390,7 +388,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$tmp2 ]]; then
+      if [[ -z $path_completion || -d $prepath$realpath$tmp3$tmp1 ]]; then
 	tmp3=$tmp3$tmp1/
 	# Now put donepath back the way it should be.  (I think.)
 	donepath=${tmp3//(#b)([\\\]\[\^\~\(\)\#\*\?])/\\$match[1]}