about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-10-24 09:06:32 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2014-10-24 09:06:32 -0700
commite18b5bf0b2a1409ba5c88f8b61dbf65cdc235027 (patch)
tree1df5d69a237bec2fe34b758755bb20e10dd5d5dc /Completion
parent11c3bc3d73c69d60ab88c1fd404fb37a35ee9f01 (diff)
downloadzsh-e18b5bf0b2a1409ba5c88f8b61dbf65cdc235027.tar.gz
zsh-e18b5bf0b2a1409ba5c88f8b61dbf65cdc235027.tar.xz
zsh-e18b5bf0b2a1409ba5c88f8b61dbf65cdc235027.zip
33526: fix completion path prefix handling when NO_CASE_GLOB is in effect
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Type/_path_files9
1 files changed, 8 insertions, 1 deletions
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