Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: updated color sequences as variables
- X-seq: zsh-users 4179
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Russell Hoover <rj@xxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: updated color sequences as variables
- Date: Mon, 27 Aug 2001 16:41:30 -0700
- In-reply-to: <20010827180638.A828@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20010827180638.A828@xxxxxxxxx>
On Aug 27, 6:06pm, Russell Hoover wrote:
>
> I've been using a group of colors-put-into variables that someone put on
> this list a while back, which (in the old color-coding scheme) looked like
> this:
>
> red="%{$(echo -n '\e[1;31m')%}"
> green="%{$(echo -n '\e[1;32m')%}" etc.,
Take a look at the "colors" function that is included with the zsh 4.0.x
distributions. Look for "colors" in the index of the texinfo zsh manual,
or read "man zshcontrib".
> Would the coding in the variables translate -- updating to the new color scheme of
> sequences -- to anything like the following?
>
> red="%{$(\e[1;31m)%}"
You'd want
red=$'%{\e[1;31m%}'
Or
autoload colors
colors
red="%{${fg[red]}%}"
--
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author