about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJun T <takimoto-j@kba.biglobe.ne.jp>2014-04-15 20:59:27 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2014-04-15 20:59:27 -0700
commitd9935915b73082c70d543ea098ecea9e95068659 (patch)
treec7588926be7e4854ca27b258f96a251775efe739
parent31e2ae380a8ab9d49345294e70842a64cb565432 (diff)
downloadzsh-d9935915b73082c70d543ea098ecea9e95068659.tar.gz
zsh-d9935915b73082c70d543ea098ecea9e95068659.tar.xz
zsh-d9935915b73082c70d543ea098ecea9e95068659.zip
32546: better handling of ignored files with _path_files -W prefixes
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Type/_path_files5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 35910c316..562e459fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-15  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* Jun T: 32546: Completion/Unix/Type/_path_files: better handling
+	of ignored files when using -W to specify prefixes.
+
 2014-04-13  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* 32540: Src/Zle/zle_tricky.c, Src/Zle/zle_utils.c: following
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index aa58ea09b..85feae54c 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -564,9 +564,10 @@ for prepath in "$prepaths[@]"; do
           ( "$ignpar" != *dir* || "$pats" = '*(-/)' ) &&
           ( "$ignpar" != *..* || "$tmp1[1]" = *../* ) ]]; then
 
-      compfiles -i tmp1 _comp_ignore "$ignpar" "$prepath$realpath$donepath"
+      compfiles -i tmp1 ignore "$ignpar" "$prepath$realpath$donepath"
+      _comp_ignore+=( ${(@)ignore#$prepath$realpath$donepath} )
 
-      (( $#_comp_ignore && $mopts[(I)-F] )) ||
+      (( $#_comp_ignore && ! $mopts[(I)-F] )) &&
           mopts=( "$mopts[@]" -F _comp_ignore )
     fi