Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Re[2]: completing files first



On 2013-01-30, Manuel Presnitz <mpy@xxxxxxx> wrote:
> Honestly, I do not really understand these zstyle stuff, but combining
> Jesper's suggestions with my own .zshrc I found by chance, that
>
> zstyle ':completion:*' file-patterns '*(-/):directories:directories %p(^-/):globbed-files' '*:all-files'
>
> (note the second word ,directories', wchich is just a label, it could also be
> something else) instead of 
>
> zstyle ':completion:*' file-patterns '*(-/):directories %p(^-/):globbed-files' '*:all-files'
>
> works also with ,less' -- as in your example.

Yeah, they are tricky, these zstyles.

Thanks, this led me to try, by pure experimentation, this:

zstyle ':completion:*' file-patterns '*(-/):directories:directories %p(^-/):globbed-files:files' '*:all-files'
zstyle ':completion:*' group-order globbed-files all-files files directories

Which actually does what I want... It ditches the particular names that
completers give its groups, but at least I get them in the order I want.
Works with cat, less and my "myview".



Messages sorted by: Reverse Date, Date, Thread, Author