Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/bash/src=/usr/src/debug/bash -flto=auto -DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin' -DSTANDARD_UTILS_PATH='/usr/bin' -DSYS_BASHRC='/etc/bash.bashrc' -DSYS_BASH_LOGOUT='/etc/bash.bash_logout' -DNON_INTERACTIVE_LOGIN_SHELLS uname output: Linux fuksilappari 6.6.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 14 Dec 2023 03:45:42 +0000 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 5.2
Patch Level: 21
Release Status: release

Description:
When PS1 contains line break and it sets color with ansi escape code before the line break, then in any terminal emulator after zoom out or in, the color of the second line disappears.
    The color is also missing terminal is opened.

Repeat-By:
    PS1=\[\033[31m\]first line\nsecond line\[\033[0m\]
    zoom in or out and observe disappearing color.

Compare to this which does not have the same problem due setting color again after the linebreak:
    PS1=\[\033[31m\]first line\n\[\033[31m\]second line\[\033[0m\]

  • Multi-line PS1 c... email--- via Bug reports for the GNU Bourne Again SHell

Reply via email to