From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18042 invoked from network); 29 Jun 2004 16:09:45 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.85) by ns1.primenet.com.au with SMTP; 29 Jun 2004 16:09:45 -0000 Received: (qmail 18195 invoked from network); 29 Jun 2004 17:20:21 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Jun 2004 17:20:21 -0000 Received: (qmail 26482 invoked by alias); 29 Jun 2004 16:09:05 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7616 Received: (qmail 26472 invoked from network); 29 Jun 2004 16:09:04 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.85) by sunsite.dk with SMTP; 29 Jun 2004 16:09:04 -0000 Received: (qmail 17039 invoked from network); 29 Jun 2004 17:19:46 -0000 Received: from vinc17.net1.nerim.net (HELO ay.vinc17.org) (62.4.18.82) by a.mx.sunsite.dk with SMTP; 29 Jun 2004 17:19:36 -0000 Received: from lefevre by ay.vinc17.org with local (Exim 4.32) id 1BfL9m-00032d-Fi; Tue, 29 Jun 2004 18:08:26 +0200 Date: Tue, 29 Jun 2004 18:08:26 +0200 From: Vincent Lefevre To: zsh-users@sunsite.dk Subject: Re: coloring STDERR to terminal Message-ID: <20040629160826.GL2033@ay.vinc17.org> Mail-Followup-To: zsh-users@sunsite.dk References: <20040627190433.Q27888@willy_wonka> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.6i Sender: Vincent Lefevre 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 On 2004-06-29 08:43:50 -0700, Bart Schaefer wrote: > This sort of thing is the reason that zsh's coprocess hangs around after > its input and output are closed, rather than exiting the way ksh coprocs > do. Assuming you're not using the coprocess for anything else (hardly > anyone does) you can do this: > > coproc while read line; print '\e[91m'${(q)line}'\e[0m' > /dev/tty > exec 2>&p It doesn't work very well. Normally, if I do a Ctrl-d when there are running jobs, I get: greux:~> zsh: you have running jobs. greux:~> With the coprocess, I get: greux:~> greux:~> zsh: you have running jobs. -- Vincent Lefèvre - Web: 100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17, Championnat International des Jeux Mathématiques et Logiques, etc. Work: CR INRIA - computer arithmetic / SPACES project at LORIA