On 3/2/22 10:16 AM, Chet Ramey wrote:
> On 2/28/22 2:51 PM, Andreas Schwab wrote:
>> With
>>
>> PS1="\[$(tput bold)\]\h:\w/:[\$?]\\\$\[$(tput sgr0)$(tput cnorm)\] "
>>
>> if \w expands to such a long string so that the right margin is exactly
>> before the final space in the prompt (ie. the second line starts with
>> that space), display becomes erratic: the display of the input line is
>> shifted to the right by a few spaces on the second line, with the cursor
>> stuck on the left margin.  Note that when the final space is removed
>> from the prompt the display works fine.  This is a regression from
>> readline 8.1.
> 
> I can't reproduce this using macOS Terminal:
> 
> chet-mail:/usr/local/build/chet/bash/bash-current.rhe7/examples/loadables1/:[0]$
> eifueifutwekadicas adjb ashbcasdhb cadhbcashd jadh chasd ohafs
> 
> (you might have to enlarge your message display window to get the wrapping
> right). I'll have to look at some other terminal emulators.

OK, I found a way to reproduce it.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://tiswww.cwru.edu/~chet/

Reply via email to