bug-bash
[Top][All Lists]
Advanced

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

Re: Prompt color reset after using arrow keys


From: Chet Ramey
Subject: Re: Prompt color reset after using arrow keys
Date: Fri, 9 Aug 2024 11:16:44 -0400
User-agent: Mozilla Thunderbird

On 8/7/24 5:05 PM, Gioele Barabucci wrote:
Hi,

in bash 5.2.21 the following PS1 assignment

     PS1=$'\[\e[0;34;42m\]'$(printf x%.0s {1..111})$'\[\e[0m\]\$ '

should make the prompt a long list of "x", displayed in blue on a red background. This is in fact the case.

However, if the terminal window is smaller than 111 characters and, thus, the prompt is split onto two lines, the following bug will appear:

Pressing the up arrow and then the down arrow, will reset the part of the prompt in the last line. The last line will no longer be styled with blue- on-green colors, but it will use the standard colors (white on black, in my case).

I can't reproduce this on macOS with the current devel sources using
Terminal, xterm (from XQuartz), or iTerm.

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



reply via email to

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