Re: Prompt overwrites command output if prompt contains unicode character and non-printing escape sequence

Chet Ramey <[email protected]> Mon, 18 May 2026 15:19:33 -0400
Newsgroups gmane.comp.shells.bash.bugs
Organization ITS, Case Western Reserve University
Message-ID <[email protected]>
On 5/18/26 2:53 PM, Grisha Levit wrote:
> 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:

That fixed this:

https://lists.gnu.org/archive/html/bug-bash/2025-01/msg00002.html

I'll see if there's a way to accommodate both cases. The bottom line is
still that if you start with the cursor in some column other than 0,
you're going to eventually have faulty redisplay due to readline's
assumption that it starts with the cursor in column 0.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc (application/pgp-signature, 203 B)
-----BEGIN PGP SIGNATURE-----

wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCagtmRQUDAAAAAAAKCRC7WGnwZOp0q2NH
AJ9+YC/FMDnL0X8q/EaRU4WOWT++ggCghHR0FrBW4XXE8Uuo/P+w7/OykB8=
=Bs4O
-----END PGP SIGNATURE-----