help-bash
[Top][All Lists]
Advanced

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

Re: colored verbose


From: lacsaP Patatetom
Subject: Re: colored verbose
Date: Wed, 8 Nov 2023 14:48:25 +0100

Le mer. 8 nov. 2023 à 14:10, alex xmb sw ratchev <fxmbsw7@gmail.com> a
écrit :

> another candidate , using xtracefd
> it seems work perfect
> just cant copypaste
>
> greets
>
> On Wed, Nov 8, 2023, 11:27 AM lacsaP Patatetom <patatetom@gmail.com>
> wrote:
>
>> hi,
>>
>> is it possible to distinguish the lines displayed by bash's verbose mode
>> by
>> coloring them ?
>>
>> for example, with this little script, make the first and third displayed
>> lines stand out by coloring them :
>>
>> bash -v <<~~~
>> echo hello world
>> seq 5
>> ~~~
>> echo hello world
>> hello world
>> seq 5
>> 1
>> 2
>> 3
>> 4
>> 5
>>
>> I can color script comments by adding control characters (#\[1;34m colored
>> comment\[0m) that are executed when a comment is displayed, but it's not
>> very practical or aesthetic...
>>
>> regards, lacsaP.
>>
>
thank you !
we come very close with these few lines of code using BASH_XTRACEFD (which
must however be placed after the call to exec).


reply via email to

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