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

Re: terminfo, cygwin troubles



On 19 Jan, Le Wang wrote:
> >   zstyle ':completion:*' file-patterns \
> >       '%p:globbed-files *(-/):directories'
> > '*:all-files'
> 
> Yes.  This works well.  But is there any way I can
> control how the results are sorted?  I would want the
> directories to always come last.

The group-order style lets you specify the order of the groups. First
you need to add descriptions for the two groups in the file-patterns
style:

zstyle ':completion::*:(id3cp|id3info|mp3Reencode|mp3Group):*' file-patterns \
    '%p:globbed-files:mp3\ files *(-/):directories:directories' '*:all-files'

That avoids the group-name for the files tag taking precedence over
the group-name for the globbed-files and directories tags.

The group-order style is probably unnecessary but here it is anyway:
zstyle ':completion::*:(id3cp|id3info|mp3Reencode|mp3Group):*' group-order \
    globbed-files directories

For this to work you will need to also define a group-name style. I just
define this:
zstyle ':completion:*' group-name ''

but if you don't want that, you can define it for each of the
directories and globbed-files tags:

zstyle ':completion::*:(id3cp|id3info|mp3Reencode|mp3Group):*:directories' \
    group-name directories
zstyle ':completion::*:(id3cp|id3info|mp3Reencode|mp3Group):*:globbed-files' \
    group-name globbed-files

I hope that helps

Oliver


This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.



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