From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16705 invoked from network); 28 Jun 2004 00:08:42 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.85) by ns1.primenet.com.au with SMTP; 28 Jun 2004 00:08:42 -0000 Received: (qmail 5634 invoked from network); 28 Jun 2004 01:18:09 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Jun 2004 01:18:09 -0000 Received: (qmail 1302 invoked by alias); 28 Jun 2004 00:08:03 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7606 Received: (qmail 1243 invoked from network); 28 Jun 2004 00:06:22 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.85) by sunsite.dk with SMTP; 28 Jun 2004 00:06:22 -0000 Received: (qmail 3769 invoked from network); 28 Jun 2004 01:15:58 -0000 Received: from episec.com (69.55.237.141) by a.mx.sunsite.dk with SMTP; 28 Jun 2004 01:15:55 -0000 Received: (qmail 49218 invoked by uid 1024); 28 Jun 2004 00:06:17 -0000 Date: Sun, 27 Jun 2004 20:06:17 -0400 From: ari To: zsh-users@sunsite.dk Cc: Atom 'Smasher' Subject: Re: coloring STDERR to terminal Message-ID: <20040628000617.GW96475@episec.com> References: <20040627190433.Q27888@willy_wonka> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040627190433.Q27888@willy_wonka> X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 atom@suspicious.org 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