I bracketed \[ and \] each prompt variables and simple symbols and line
break does work right.
Example:
> \[\e[1;32m\]\u\[\e[m\]\[\e[1;32m\]@\[\e[m\]\[\e[1;32m\]\h\[\e[m\]
But if I bracketed sequences some symbols, line break does not work .
Example:
>  \[\e[1;32m\]\u@\h\[\e[m\]

And thanks for You help!
--
Best regards
Alexandr Kozlenkov

вс, 4 февр. 2018 г. в 2:04, Chet Ramey <chet.ra...@case.edu>:

> On 2/3/18 2:21 AM, Alexander Kozlenkov wrote:
> > I changed my PS1 to:
> > (cmd):09:37:53:sah4ez@PC001:~$ printenv PS1
> > \e[1;95m\t\]\e[0m:\]\e[0;92m\u@\h\]\e[0m:\]\e[0;34m\w\a\]\]\e[0m$ \]
>
> The output of printenv indicates that you have non-printing characters in
> PS1 that are not bracketed by \[ and \]. In fact, there don't seem to be
> any \[ sequences in the prompt string at all (and you have two \] in a
> row?).
>
> The mode strings appear to be properly bracketed using \1 and \2.
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/
>

Reply via email to