[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changing PSI and PS0 leads to four characters at beginning of user input
From: |
lisa-asket |
Subject: |
Changing PSI and PS0 leads to four characters at beginning of user input |
Date: |
Sun, 4 Jul 2021 22:04:46 +0200 (CEST) |
>From: Greg Wooledge <greg@wooledge.org>
>To: help-bash@gnu.org
>Subject: Re: Changing PSI and PS0 leads to four characters at beginning of
>user input
>Date: 04/07/2021 21:53:55 Europe/Paris
>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.
Thank you, the two strange characters no longer show up after removing \[ and \]
from PS0. Strange thing that one sometimes uses \[ and \], and sometimes not.
- Changing PSI and PS0 leads to four characters at beginning of user input, lisa-asket, 2021/07/04
- Re: Changing PSI and PS0 leads to four characters at beginning of user input, Greg Wooledge, 2021/07/04
- Changing PSI and PS0 leads to four characters at beginning of user input, lisa-asket, 2021/07/04
- Re: Changing PSI and PS0 leads to four characters at beginning of user input, Lawrence Velázquez, 2021/07/04
- Re: Changing PSI and PS0 leads to four characters at beginning of user input, Greg Wooledge, 2021/07/04
- Changing PSI and PS0 leads to four characters at beginning of user input, lisa-asket, 2021/07/04
- Re: Changing PSI and PS0 leads to four characters at beginning of user input, Greg Wooledge, 2021/07/04
- Changing PSI and PS0 leads to four characters at beginning of user input,
lisa-asket <=
- Re: Changing PSI and PS0 leads to four characters at beginning of user input, Greg Wooledge, 2021/07/04
- Re: Changing PSI and PS0 leads to four characters at beginning of user input, David, 2021/07/05
- Changing PSI and PS0 leads to four characters at beginning of user input, lisa-asket, 2021/07/05
- Re: Changing PSI and PS0 leads to four characters at beginning of user input, Lawrence Velázquez, 2021/07/04
- Re: Changing PSI and PS0 leads to four characters at beginning of user input, Chet Ramey, 2021/07/06