Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Colorizing the output of watch
- X-seq: zsh-users 13132
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: Colorizing the output of watch
- Date: Mon, 11 Aug 2008 08:33:33 -0700
- In-reply-to: <20080811142512.GB6317@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <2d460de70807080738x1b80092u9736203b46ff9724@xxxxxxxxxxxxxx> <20080811142512.GB6317@xxxxxxxxx>
On Aug 11, 10:25am, Russell Hoover wrote:
}
} export WATCHFMT=" %D [%B%t%b] %B%n%b \
} %(a:%Blogged on%b:logged off) %B%l%b from %B%M%b"
}
} But I don't know how to put this text in color. It would be great to
} have "logged on" appear in green, say, and "logged off" in, say, blue
} or some other color.
In the very latest zsh you can replace %B with %F{green} and %b with %f.
In most currently-available zsh you'll have to
autoload -U colors
colors
and then replace %B with %{${fg[green]}%} and %b with %{${fg[none]}%}.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author