* Re: Adding --color option to script?
[not found] ` <20101231000329.GB17311@nb.net.home>
@ 2011-03-10 22:18 ` Philip Prindeville
0 siblings, 0 replies; only message in thread
From: Philip Prindeville @ 2011-03-10 22:18 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
On 12/30/10 4:03 PM, Karel Zak wrote:
> On Thu, Dec 23, 2010 at 02:25:02PM -0800, Philip Prindeville wrote:
>> I would love to see an option like --color which used terminal
>> colors to highlight STDERR output (or, in a pinch, maybe bold it on
>> terminals that don't support color... if they still exist).
> The script(1) command does not work on this level. It reads data
> directly from master side of the terminal. It means that we are not
> able to distinguish between stdout and stderr.
>
>> Sound reasonable?
> Yes, but I don't see a way how to implement it.
>
> Karel
>
I just realized... it can be done by having two ptys, one for stdin/stdout, and another just for stderr.
-Philip
^ permalink raw reply [flat|nested] only message in thread