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

Re: Funky list-colors



zsugabubus wrote:
> > For even more detail you can use something similar to:
> >   compadd -o -d labels_array -a filenames_array
>
> It looks wonderful! I think it will work for me. Can I make parts of
> labels bold or colored? (Zsh seems to escape escape codes.) Or it's only
> doable with "list-colors"?

From a normal completion function, you can add color specifications to
_comp_colors. It helps if you're using groups. The following will make
the strings green:

  compadd -J group -o -ld labels_array -a filenames_array
  _comp_colors+=( "(group)=*=32" )

For an example of this, see the _ps1234 function. This handles
completion for, e.g: PS1='%F{<tab>
In general, this is left up to users to configure with list-colors so
there aren't other examples.

The format style also allows attributes to be specified which is applied
to various messages or heading labels.

Oliver



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