zsh-users
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Matthias Kopfermann <kopfermann@trio-hittfeld.de>,
	zsh-users@sunsite.auc.dk
Subject: Re: wish for a colored completion system
Date: Wed, 7 Jun 2000 16:09:25 +0000	[thread overview]
Message-ID: <1000607160925.ZM8141@candle.brasslantern.com> (raw)
In-Reply-To: <20000607172010.A4979@linux-ws.kg-hittfeld.local>

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' \
	list-colors '=csh*=31:=*hist*=32:=list*=34:=*glob*=35'

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"
chapter.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2000-06-07 16:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-07 15:20 Matthias Kopfermann
2000-06-07 16:09 ` Bart Schaefer [this message]
2000-06-08 10:41 Sven Wischnowsky
2000-06-09  7:24 Sven Wischnowsky
     [not found] <no.id>
2000-06-08 14:31 ` Matthias Kopfermann
2000-06-08 14:49   ` Sven Wischnowsky
2000-06-08 14:50   ` Thomas Köhler
2000-06-08 15:11     ` Matthias Kopfermann
2000-06-08 15:32       ` have to get used to the new zstyle thingy! Matthias Kopfermann
     [not found]         ` <0FVU005MNF7Q6N@la-la.cambridgesiliconradio.com>
2000-06-08 17:37           ` wish for a colored completion system Bart Schaefer
2000-06-08 18:44             ` Fletch
     [not found]               ` <000608122524.ZM16857@candle.brasslantern.com>
     [not found]                 ` <m2bt1c0xoe.fsf@godzilla.phydeaux.org>
2000-06-08 20:07                   ` Bart Schaefer
2000-06-08 20:18                     ` Fletch
2000-06-08 20:36                       ` Peter Stephenson
2000-06-09 13:36 ` Matthias Kopfermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1000607160925.ZM8141@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=kopfermann@trio-hittfeld.de \
    --cc=zsh-users@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).