help-bash
[Top][All Lists]
Advanced

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

Re: Changing PSI and PS0 leads to four characters at beginning of user i


From: Greg Wooledge
Subject: Re: Changing PSI and PS0 leads to four characters at beginning of user input
Date: Sun, 4 Jul 2021 15:53:55 -0400

On Sun, Jul 04, 2021 at 09:45:18PM +0200, lisa-asket@perso.be wrote:
> Have now changed the code to include \[ and \]
> 
> 
> 
>     tfb_normal=$(tput sgr0)
>     taf_red=$(tput setaf 9)
>     taf_cyan1=$(tput setaf 51)
>     taf_gold1=$(tput setaf 220)
>     PS1='\n\[${taf_cyan1}\]\u@\h:\n'
>     PS1=$PS1'+ \[${taf_gold1}\]\w\n\[${taf_red}\]'
>     PS0='\[${tfb_normal}\]'  # use regular foreground color

You don't want them in PS0.  Only in PS1.



reply via email to

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