[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hightlighting in bash

From: Chet Ramey
Subject: Re: Hightlighting in bash
Date: Thu, 10 Mar 2011 15:55:44 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv: Gecko/20101207 Thunderbird/3.1.7

On 3/10/11 3:49 PM, Micah Cowan wrote:
> (03/10/2011 12:07 PM), Chet Ramey wrote:
>> On 3/10/11 2:42 PM, Philip Prindeville wrote:
>>> My request is simple.  Using termcap/ncurses info (which you need anyway
>>> for the readline stuff), it would be nice to have the option of running
>>> commands in a pseudo-tty and then bracketing the output from STDERR with
>>> <highlight on>...<highlight off>.
>>> Of course, that also implies that your writes to wherever STDERR eventually
>>> goes are atomic and won't be interspersed with output from STDOUT.  I'll
>>> let someone more intimate with the particulars of stdio and tty drivers and
>>> line disciplines figure that bit out.
>>> This would be nice because it would allow one to quickly identify and
>>> isolate potentially detrimental error messages from mundane but profuse
>>> output that logs commands being invoked, etc.
>> This doesn't seem like it has to be done in bash.  A small program that
>> allocated and opened a pty, ran bash in the pty (or an arbitrary command
>> and arguments specified on the command line), and managed input and output
>> would be acceptable.
>> There look to be a few packages out there that could be adapted for this.
>> Even a pty sniffing program would do the trick.
> When both stdout and stderr are the same tty, how do you expect to use
> this method to detect which text should be hilighted and which shouldn't?

Obviously, you have to separate them.  We're all saying the same thing: the
key to making this work is a program that sits in front of make and manages
its input and output.


``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]