Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: coloring STDERR to terminal
- X-seq: zsh-users 7628
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: coloring STDERR to terminal
- Date: Wed, 30 Jun 2004 13:43:41 +0200
- In-reply-to: <Pine.LNX.4.60.0406300311020.5600@xxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040627190433.Q27888@willy_wonka> <Pine.LNX.4.60.0406280815130.19831@xxxxxxxxxxxxxxxxxx> <20040629160826.GL2033@xxxxxxxxxxxxx> <Pine.LNX.4.60.0406291002300.31134@xxxxxxxxxxxxxxxxxx> <20040630070902.GO2033@xxxxxxxxxxxxx> <Pine.LNX.4.60.0406300311020.5600@xxxxxxxxxxxxxxxxxx>
- Sender: Vincent Lefevre <vincent@xxxxxxxxxx>
On 2004-06-30 03:52:46 -0700, Bart Schaefer wrote:
> To clarify, by this I mean to its original standard output, not to the
> redirected stdout which is going to /dev/tty (otherwise the parent zsh
> can't see it). E.g. instead of
>
> coproc while read line; print '\e[91m'${(q)line}'\e[0m' > /dev/tty
>
> You need
>
> coproc while read line; do
> print '\e[91m'${(q)line}'\e[0m' > /dev/tty
> print -n $'\0'
> done
[...]
> The situation is thus: The parent zsh (Z) holds the write-end (W) of the
> standard input of coprocess (C), and the read end (R) of the standard
> output of the coprocess. Within the coprocess, the first print command
> has its standard output redirected to the terminal (T), but the second is
> still writing on R.
[...]
Thanks for the explanation. But in fact, I didn't add the
print -n $'\0'
line, so there is no R problem in my case. So, is this line really
useful?
Also, when I quit zsh, the coprocess is not killed (the NO_HUP option
is set, but a coprocess can be seen as a particular case). Is it a bug?
And is it possible to hide the coprocess from the jobs table?
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author