[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hightlighting in bash
From: |
Micah Cowan |
Subject: |
Re: Hightlighting in bash |
Date: |
Thu, 10 Mar 2011 12:28:56 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 |
(03/10/2011 12:27 PM), Philip Prindeville wrote:
> On 3/10/11 11:53 AM, Micah Cowan wrote:
>> (03/10/2011 11:42 AM), 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>.
>> This doesn't strike me as remotely within the domain of responsibilities
>> that should belong to bash, mainly because:
>>
>> 1. it has nothing to do with anything that shells normally do.
>> 2. putting it in bash specifically, would rob other, non-bash related
>> commands, the possibility of having such a feature.
>>
>> It wouldn't be difficult to write as a separate program, which is really
>> how this should be handled. You could redirect a pipeline's STDOUT and
>> STDERR to individual named pipes (FIFOs), and have a separate program
>> read from both pipes, inserting highlights around any data it copies
>> from the STDERR pipe.
>>
> You could, but that would entail modifying every Makefile (a couple of
> hundred), plus automake, etc.
Nonsense. Just use shell redirections over the full command you're running.
--
Micah J. Cowan
http://micah.cowan.name/
Re: Hightlighting in bash, Derek Fawcus, 2011/03/12
Re: Hightlighting in bash, Greg Wooledge, 2011/03/10
Re: Hightlighting in bash, Chet Ramey, 2011/03/10