bug-bash
[Top][All Lists]
Advanced

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

Re: bash 4.4.18 return to new line


From: Chet Ramey
Subject: Re: bash 4.4.18 return to new line
Date: Sun, 4 Feb 2018 10:34:51 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

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;address@hidden;32m\]\h\[\e[m\]
> But if I bracketed sequences some symbols, line break does not work .
> Example:
>>  \[\e[1;address@hidden

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    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

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