Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Colorizing the output of watch



On Tue 07/08/08 at 04:38 PM +0200,
Richard Hartmann <richih.mailinglist@xxxxxxxxx> wrote:

> [...] I was wondering if there is a built-in way to colorize the output
> of that depending on if they log on or off.

Could you actually get color for this?  I have:

export WATCHFMT="       %D       [%B%t%b]       %B%n%b \
%(a:%Blogged on%b:logged off)       %B%l%b       from       %B%M%b"

which puts "logged on" into a boldface (which boldface I have set to a gold
color); and "logged off" into a nonbold, which I have as my standard
grey-ish text color.

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.

-- 
                  // rj@xxxxxxxxx //
They accused us of suppressing freedom of expression.
This was a lie and we could not let them publish it.
-- Nelba Blandon, Nicaraguan Interior Ministry Director of Censorship



Messages sorted by: Reverse Date, Date, Thread, Author