Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: wish for a colored completion system
- X-seq: zsh-users 3133
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: wish for a colored completion system
- Date: Thu, 8 Jun 2000 16:49:13 +0200 (MET DST)
- In-reply-to: Matthias Kopfermann's message of Thu, 8 Jun 2000 16:31:30 +0200
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
Matthias Kopfermann wrote:
> Okay, after having heard the answer that there is the possibility
> to have colored completion, has anybody used it to create useful
> completions with colors in them to share with us all?
> There is not one example but the very easy to handle
> ZLS_COLOURS case for completing different kinds of files.
> To me it still seems to be quite complex to say the least.
>
> Okay, I try to be not so polite: :)
> Should'nt there be an easier way than that approach?
It's the normal way of configuring things for the new completion
system and I definitely think colouring should be done like all other
setup for it. The `=pat=col' syntax was partly chosen because we
(well, some people here) wanted the possibility to use their $LS_COLOR
for zsh, too. That left us not too many syntax extensions to use.
Hm, how should we supply good examples for something depending so much
on personal preference. One thing you can try is using similarities in
the completion lists, like the ` -- ' thing used for descriptions:
zstyle ':completion:*:(jobs|directory-stack|indexes|option|values)' list-colors \
'=(#b)(*) -- (*)=35;1=31=33'
More examples? These show another problem: the patterns often depend
on the output format of certain system commands like ps(1) and lpq(1):
zstyle ':completion:*:processes' list-colors \
'=(#b)( #[0-9]#) ??????[^0-9]##([0-9]##:[0-9][0-9][.:][0-9][0-9])(*)=35=31;1=32=33'
zstyle ':completion:*::lp*:jobs' list-colors \
'=(#b)* [0-9] ##([^ ]##) ##([^ ]##) ##([^ ]##) ##(*)=35=32=31;1=33=32'
And we can't do anything about that...
Other things one might want to highlight are the descriptions (see the
`format' style) and probably `special' types of matches, like
`warnings', `all-expansions', `original' etc. Oh, and, of course, the
`ma' capability when using menu-selection.
Bye
Sven
P.S.: You'll certainly get other colours because I don't use a
colour-xterm.
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author