Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: coloring STDERR to terminal
- X-seq: zsh-users 7606
- From: ari <edelkind-zsh-users@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: coloring STDERR to terminal
- Date: Sun, 27 Jun 2004 20:06:17 -0400
- Cc: Atom 'Smasher' <atom@xxxxxxxxxxxxxx>
- In-reply-to: <20040627190433.Q27888@willy_wonka>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040627190433.Q27888@willy_wonka>
atom@xxxxxxxxxxxxxx mentioned:
> i'm not sure if this is possible without patching some sources, but here's
> what i want to do... every time STDERR is directed to a terminal, i want
> to filter it through _something_like_ this:
> awk '{print "^[[91m"$0"^[[0m"}'
Perhaps not what you're looking for, since the effect is asynchronous,
but you _could_ do this with a variation of:
ERRFIFO=$HOME/.stderr-$TTY.fifo
[ -p $ERRFIFO ] || mkfifo $ERRFIFO
awk '{print "^[[91m"$0"^[[0m"}' <$ERRFIFO 1>&2 &
exec 2>$ERRFIFO
Execution of this segment would, of course, need to be restricted to
once per terminal session.
ari
Messages sorted by:
Reverse Date,
Date,
Thread,
Author