Re: PS0 vs. \[ \]
Chet Ramey <[email protected]> Mon, 18 May 2026 11:21:41 -0400
| Newsgroups | gmane.comp.shells.bash.bugs |
|---|---|
| Organization | ITS, Case Western Reserve University |
| Message-ID | <[email protected]> |
On 5/15/26 7:47 AM, Koichi Murase wrote:
> I think ${var@P} should also remove \x01 and \x02 at the final step.
This transformation is often used with the `read' builtin (read -p). One of
the reasons I added it in 2014 was in response to requests to use the
prompt expansions with read -p.
Bash can't know at expansion time whether the user intends to use the
expanded value with readline (read -e) or not. It's up to the user to
differentiate the cases.
--
``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----- wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCagsuhQUDAAAAAAAKCRC7WGnwZOp0q1Kx AKCIr2DJzys9Ru/owbwggGCZmzPAagCfai6LfZtOkC6rrSV6gb8ss1QYnX4= =AE/u -----END PGP SIGNATURE-----