Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: coloring STDERR to terminal



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 <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