about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Type/_path_files2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e42620a6e..06efc60b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-10-07  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* 39489: Completion/Unix/Type/_path_files: Interpret -P as
+	literally, rather than as a pattern.
+
 	* 39479 + 39481 minus _path_files hunk (see
 	39489): Completion/Debian/Command/_debfoster,
 	Completion/Linux/Command/_modutils,
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index 6a1e89f05..0d36b5487 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -69,7 +69,7 @@ fi
 pats=( "${(@)pats:# #}" )
 
 if (( $#pfx )); then
-  compset -P "$pfx[2]" || pfxsfx=( "$pfx[@]" "$pfxsfx[@]" )
+  compset -P "${(b)pfx[2]}" || pfxsfx=( "$pfx[@]" "$pfxsfx[@]" )
 fi
 
 if (( $#prepaths )); then