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

Re: Funky list-colors



Bart wrote:
> For even more detail you can use something similar to:
>   compadd -o -d labels_array -a filenames_array
> where there is one entry in $labels_array for each entry in
> $filenames_array.  The completion system will arrange to build a grid
> of the labels and names so that each name is paired with the
> corresponding element from the labels.  However, it does place the
> labels to the right of the names rather than to the left.

Actually the array specified with -d is not just for the labels but for
the whole string - match and label. So you can make any change you
like to how the match appears in the completion listing for your
own custom version of the LIST_TYPES option.

The common rendering of the match followed by a separator (-- by
default) and a label is not part of compadd. (in terms of man
pages/documentation sections, it is part of zshcompsys rather than
zshcompwid). In most, but by no means all, cases this is done from
_describe.

This also means that for things like the list-colors style, patterns
match the whole display string. It can thus be used to change
attributes for either or both match and label. For an example, try:
'=(#b)(--) (*)==32=3'

Oliver



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