[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PS1 multiline with colors
From: |
Dan Douglas |
Subject: |
Re: PS1 multiline with colors |
Date: |
Tue, 09 Jul 2013 14:37:01 -0500 |
User-agent: |
KMail/4.10.5 (Linux/3.9.5-pf+; KDE/4.10.5; x86_64; ; ) |
On Monday, July 08, 2013 02:39:52 PM Linda Walsh wrote:
>
> Greg Wooledge wrote:
>
> > normal=$(tput sgr0) red=$(tput setaf 1) green=$(tput setaf 2) ...
> ---
>
> BTW If you ever trace your code with "-x", tracing through
> the above will change your terminal text color.
>
> You can get around that by using read:
>
>
> read _CRST < <(tput sgr0) #Reset
> read _CRed < <(tput setaf 1) #Red
> read _CBLD < <(tput bold) #Bold
Can also give all the debug output %q formatting.
exec {BASH_XTRACEFD}> >(set +x; while IFS= read -r x; do printf %q\\n "$x";
done)
--
Dan Douglas
- PS1 multiline with colors, BASTIDON , Stéphane, 2013/07/04
- Re: PS1 multiline with colors, Chris Down, 2013/07/04
- Re: PS1 multiline with colors, Greg Wooledge, 2013/07/05
- Message not available
- Re: PS1 multiline with colors, Greg Wooledge, 2013/07/05
- RE: PS1 multiline with colors, BASTIDON , Stéphane, 2013/07/05
- Re: PS1 multiline with colors, Linda Walsh, 2013/07/08
- Re: PS1 multiline with colors,
Dan Douglas <=
- Re: PS1 multiline with colors, Geir Hauge, 2013/07/09
- Re: PS1 multiline with colors, Dan Douglas, 2013/07/05