Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: coloring STDERR to terminal
- X-seq: zsh-users 7721
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: coloring STDERR to terminal
- Date: Tue, 20 Jul 2004 20:15:26 -0700 (PDT)
- In-reply-to: <20040720233037.GI28269@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Pine.LNX.4.60.0406300311020.5600@xxxxxxxxxxxxxxxxxx> <20040630114341.GR2033@xxxxxxxxxxxxx> <Pine.LNX.4.60.0406300906100.5600@xxxxxxxxxxxxxxxxxx> <20040701181459.GF2033@xxxxxxxxxxxxx> <Pine.LNX.4.60.0407011645450.16728@xxxxxxxxxxxxxxxxxx> <20040702124259.GS2033@xxxxxxxxxxxxx> <20040720045514.V326@willy_wonka> <Pine.LNX.4.61.0407200805410.7638@xxxxxxxxxxxxxxxxxx> <20040720151617.N326@willy_wonka> <Pine.LNX.4.61.0407201353480.12638@xxxxxxxxxxxxxxxxxx> <20040720233037.GI28269@xxxxxxxxx>
- Reply-to: zsh-users@xxxxxxxxxx
On Tue, 20 Jul 2004, Wayne Davison wrote:
> On Tue, Jul 20, 2004 at 02:15:07PM -0700, Bart Schaefer wrote:
> > yet without mixing the result any differently than it would have been
> > mixed if the writers of all those inputs had instead written directly
> > to that single output.
>
> It's impossible with a single tty (or pty), but if stdout and stderr
> each had their own pty, then a program could merge the two ptys to the
> real terminal, coloring the stderr one.
Yes, I said something about that before. This is as close as you can get
to what was asked for, but (a) it's still not precisely the same [*] as if
both streams went directly to a single TTY, and (b) you can't invoke it
blindly/automatically on every spawned command, because it will play havoc
with any text editor or other fullscreen UI.
[*] E.g. your sample program always writes stdout first and then stderr,
even when both are found to be available by the same call to select().
Messages sorted by:
Reverse Date,
Date,
Thread,
Author