summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Type/_path_files9
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index db8dce098..48efd1c0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-24  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 33526: Completion/Unix/Type/_path_files: fix path prefix
+	handling when NO_CASE_GLOB is in effect
+
 2014-10-24  Peter Stephenson  <p.stephenson@samsung.com>
 
 	* 33480 slightly tweaked: Src/Zle/zle_tricky.c: fix completion
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index ed3f54de3..c64ebf58c 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -609,8 +609,15 @@ for prepath in "$prepaths[@]"; do
   tmp3="$pre$suf"
   tpre="$pre"
   tsuf="$suf"
-  [[ -n "${prepath}${realpath}${testpath}" ]] &&
+  if [[ -n "${prepath}${realpath}${testpath}" ]]
+  then
+    if [[ -o nocaseglob ]]
+    then
+      tmp1=( "${(@)tmp1#(#i)${prepath}${realpath}${testpath}}" )
+    else
       tmp1=( "${(@)tmp1#${prepath}${realpath}${testpath}}" )
+    fi
+  fi
 
   while true; do