On 12/21/23 11:40 AM, email--- via Bug reports for the GNU Bourne Again SHell wrote:

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.

The way prompting works is that readline prints the entire prompt string
once, but only (potentially) reprints the last line of a multi-line prompt.
That's the only line that will change due to input or redisplay; there's no
reason to move up and reprint the rest. You can force readline to redisplay
the entire prompt by using ^L (clear-screen), but that has obvious side
effects.

Think of the portion of a multi-line prompt before the final newline as a
static string that will not affect the display of the last line.

If you want colors in both portions, specify them separately.

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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

  • Multi-line PS1 c... email--- via Bug reports for the GNU Bourne Again SHell
    • Re: Multi-l... alex xmb sw ratchev
    • Re: Multi-l... Chet Ramey
      • Re: Mul... email--- via Bug reports for the GNU Bourne Again SHell
        • Re:... Greg Wooledge
        • Re:... Chet Ramey
          • ... Miro Palmu via Bug reports for the GNU Bourne Again SHell

Reply via email to