bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PS0 vs. \[ \]


From: Chet Ramey
Subject: Re: PS0 vs. \[ \]
Date: Mon, 18 May 2026 11:21:41 -0400
User-agent: Mozilla Thunderbird

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    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]