[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Prompt color reset after using arrow keys
From: |
Gioele Barabucci |
Subject: |
Prompt color reset after using arrow keys |
Date: |
Wed, 7 Aug 2024 23:05:22 +0200 |
User-agent: |
Mozilla Thunderbird |
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).
Tested with xterm and gnome-termimal, using TERM=xterm-256color.
Regards,
--
Gioele Barabucci
- Prompt color reset after using arrow keys,
Gioele Barabucci <=