Zsh Mailing List Archive
Messages sorted by:
Re: wish for a colored completion system
- X-seq: zsh-users 3127
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Matthias Kopfermann <kopfermann@xxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxxxxxx
- Subject: Re: wish for a colored completion system
- Date: Wed, 7 Jun 2000 16:09:25 +0000
- In-reply-to: <20000607172010.A4979@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <20000607172010.A4979@xxxxxxxxxxxxxxxxxxxxxxxxxx>
On Jun 7, 5:20pm, Matthias Kopfermann wrote:
} Subject: wish for a colored completion system
} (I love colored completion when i hit ls<tab>.
} i want it with other completions , too , not only
} when i try to complete filenames .
Check out the `list-colors' style, which can be used to override the
ZLS_COLORS parameter on a per-completion basis.
The doc for ZLS_COLORS (actually, for the complist module, there is no
independent entry for the parameter) in 3.1.9 says:
Apart from these strings, the NAME may also be an asterisk (`*')
followed by any string. The VALUE given for such a string will be
used for all files whose name ends with the string. The NAME may
also be a equal sign (`=') followed by a pattern. The VALUE given
for this pattern will be used for all matches (not just filenames)
whose display string are matched by the pattern. Definitions for
both of these take precedence over the values defined for file types
and the form with the leading asterisk takes precedence over the
form with the leading equal sign.
So for example one can do
zstyle ':completion:*:zsh-options' \
to have csh options in red, history options in green, completion listing
options in blue, and globbing options in magenta. The patterns are tried
left to right, so "cshnullglob" is in red, not magenta. Unfortunately,
you can't specify that csh gets a red foreground and globs get a yellow
background and have them overlap; oh, well.
The tricky bit is figuring out what string goes at the tail of the style
pattern, e.g. `zsh-options' in this case. The place to look is the
"Standard Tags" subsection in the "Completion System Configuration"
Bart Schaefer Brass Lantern Enterprises
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by: