Zsh Mailing List Archive
Messages sorted by:
Re: coloring STDERR to terminal
- X-seq: zsh-users 7653
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: coloring STDERR to terminal
- Date: Thu, 1 Jul 2004 20:14:59 +0200
- In-reply-to: <Pine.LNX.4.60.0406300906100.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> <20040630114341.GR2033@xxxxxxxxxxxxx> <Pine.LNX.4.60.0406300906100.5600@xxxxxxxxxxxxxxxxxx>
- Sender: Vincent Lefevre <vincent@xxxxxxxxxx>
On 2004-06-30 09:56:37 -0700, Bart Schaefer wrote:
> On Wed, 30 Jun 2004, Vincent Lefevre wrote:
> > And is it possible to hide the coprocess from the jobs table?
> Older versions of zsh did that -- the coprocess was not managed as a job
> at all, in fact -- but it was changed because (with the old behavior)
> there was no clean way to send termination signals etc. to the coprocess.
> So at present, no, it's not possible to hide the coprocess.
Couldn't the coprocess be marked in a special way, to send termination
> > 1) I type Ctrl-d.
> > 2) "zsh: you have running jobs." is written by zsh to stderr (will be
> > read by the coprocess).
> > 3) precmd() is called (but there are still no bytes sent by the
> > coprocess).
> At this point the "read -p" in precmd() will block, because the coproc
> has not yet executed "print -n $'\0'". So your step (4) won't happen:
> > 4) The new prompt is displayed (sent to the tty).
I don't understand why it will block. The line you gave was:
while read -t -p -k 1; do :; done
and the zshbuiltins(1) man page says:
-t [ num ]
Test if input is available before attempting to read. If
num is present, it must begin with a digit and will be
evaluated to give a number of seconds, which may be a
floating point number; in this case the read times out if
input is not available within this time. If num is not
present, it is taken to be zero, so that read returns
immediately if no input is available. If no input is
available, return status 1 and do not set any variables.
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: