Re: PS0 vs. \[ \] followup

Chet Ramey <[email protected]> Wed, 10 Jun 2026 12:04:09 -0400
Newsgroups gmane.comp.shells.bash.bugs
Organization ITS, Case Western Reserve University
Message-ID <[email protected]>
On 6/8/26 10:16 AM, Koichi Murase wrote:
> 2026年6月8日(月) 22:39 Chet Ramey <[email protected]>:
>> The behavior of PS0 is the same as PS4
> 
> PS4 behaved differently before the latest commit in the devel branch
> was applied. In the latest commit 1e9f5e10,

PS0 and PS4 behaved the same before the latest commit, and they behave
the same after the commit. They should behave consistently, since they are
not passed to readline.

> $ PS4='+\[$\]-'

Why do this, other than to cause yourself problems? The purpose of these
two escapes is to help readline; why use them in any other context?

Maybe a simple admonishment in the man page will be sufficient.

-- 
``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-----

wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCaimK+gUDAAAAAAAKCRC7WGnwZOp0q4No
AJ9Qr7tNnxlYsw9nEFqpMhHT1ust9QCgmGt+yF1iTrCT1UbU+bBJzQqfbos=
=/oJb
-----END PGP SIGNATURE-----