Ok. But I not understand, because my PS1 work well in bash-4.3.30 and failed in bash-4.4.18. -- Best regards Alexandr Kozlenkov
вс, 4 февр. 2018 г. в 18:34, Chet Ramey <chet.ra...@case.edu>: > On 2/4/18 10:09 AM, Alexander Kozlenkov wrote: > > 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\] > > You need to identify non-printing sequences so readline knows the visible > length of the prompt and can accurately calculate the cursor position. > > > -- > ``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/ >