help-bash
[Top][All Lists]
Advanced

[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: Mon, 5 Jul 2021 07:53:03 +0200 (CEST)

Understood


From: David <bouncingcats@gmail.com>
To: help-bash <help-bash@gnu.org>
Subject: Re: Changing PSI and PS0 leads to four characters at beginning of user 
input
Date: 05/07/2021 07:44:28 Europe/Paris

On Mon, 5 Jul 2021 at 05:12, <lisa-asket@perso.be> wrote:

> \[ \] to enclose the tput commands? I thought those were only used when using
> escape sequences only.

On Mon, 5 Jul 2021 at 06:05, <lisa-asket@perso.be> wrote:

> Strange thing that one sometimes uses \[ and \], and sometimes not.

Each of your tput commands query the database to ask what
escape sequence is required, to activate the capability you
specify, on the terminal you are using.

The output of each of your tput commands is the answer to that question.
So, the output of each of your tput commands is an escape sequence.

So you need \[ \] around each tput output, because each of your tput
output is an escape sequence.




reply via email to

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