Re: Prompt overwrites command output if prompt contains unicode character and non-printing escape sequence
Grisha Levit <[email protected]> Mon, 18 May 2026 14:53:07 -0400
| Newsgroups | gmane.comp.shells.bash.bugs |
|---|---|
| Message-ID | <CAMu=Brp-XeST6Hi2-PV3EbReRM8CyHhiTHz0pMcCmvC+tX5kFQ@mail.gmail.com> |
On Mon, May 18, 2026 at 12:24 PM Lennart Ackermans via Bug reports for the GNU Bourne Again SHell <[email protected]> wrote: > > Dear Chet, > > Do you mean that commands should output a newline at the end? I don't > have control over what all commands do that I run, and sometimes they > don't end with a newline. It would be nice if I could still read their > last lines, like in bash 5.2. > Specifically, this looks to have been introduced as part of [1], after which a \r is output while printing the prompt: $ PS1='€ \[\e[0m\]' bash --norc -i <<< 'echo -n X' |& bat -A \u{20ac}·␛␍\u{20ac}·␛echo·-n·X␊ X\u{20ac}·␛␍\u{20ac}·␛exit␊ [1] https://git.gnu.org/cgit/bash.git/diff/lib/readline/display.c?id=25e213a5