Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: change in zstyle file-patterns handling between 5.5.1 & 5.6(.2)?
Hi,
I've also found a near related problem in zstyle list-dirs-first; that is,
zsh ignores list-dirs-first style.
Step to reproduce:
~/.zshrc-minimal:
----
autoload -Uz compinit && compinit
zstyle ':completion:*:*:*:*:*' group-name ''
zstyle ':completion:*' list-dirs-first yes
zstyle ':completion:*:descriptions' format '%B%F{black}%d%f%b'
----
Here is a shell session:
----
% zsh -f
host% . ~/.zsh-minimal
host% mkdir -p /tmp/test-dir/9dir{1,2}
host% touch /tmp/test-dir/0file
host% cat /tmp/test-dir/<TAB>
files
0file 9dir1/ 9dir2/
----
I would expect the following:
----
host% cat /tmp/test-dir/<TAB>
directory
9dir1/ 9dir2/
files
0file
----
* ml.zsh-workers.454@xxxxxxxxxxx <ml.zsh-workers.454@xxxxxxxxxxx> [2018-09-16 20:50]:
> Is this an intentional change?
> How can I get the separation back in 5.6 (ideally in a way that also works
> in 5.5)?
If I revert the commit 6b4e78dce6a505d8dab5554d9925e38e13bb40ea like
a workaround diff hunk at the end of this mail, it works here for these
2 particular issues.
The diff at the end of this mail breaks the patch:
"[PATCH] Completion: Small fixes for _files, _object_files"
http://www.zsh.org/mla/workers/2018/msg00788.html
So, my workaround diff is not good shape... I'm wondering if someone
could help.
Here is my trial diff:
diff --git a/Completion/Unix/Type/_files b/Completion/Unix/Type/_files
index 5df22ea46..2b0c5580a 100644
--- a/Completion/Unix/Type/_files
+++ b/Completion/Unix/Type/_files
@@ -121,7 +121,7 @@ for def in "$pats[@]"; do
done
fi
else
- _path_files -g "$pat" "$opts[@]" "$expl[@]" && ret=0
+ _path_files "$expl[@]" -g "$pat" "$opts[@]" && ret=0
fi
done
(( ret )) || break
Messages sorted by:
Reverse Date,
Date,
Thread,
Author