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 10:39:23 -0400
User-agent: Mozilla Thunderbird

On 5/15/26 7:34 AM, Egmont Koblinger wrote:
Hello,

The manual's PROMPTING section says that PS[0124] support a long list of
escaped characters, including \[ and \].

Actually, in bash-5.3.9, PS0 does not support \[ and \]. If these are
present in its value, their corresponding raw 0x01 and 0x02 bytes do get
printed, rather than getting eliminated.

The \[ and \] escapes only matter to readline, so it's reasonable to ignore
them for PS0 and PS4 (though it makes no sense to include them in $PS4,
at least). Bash already ignores them when line editing isn't enabled.

Chet

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