On 12/25/23 5:00 PM, Seth Sabar wrote:
Hi all,

I'm reaching out to report what I believe to be a bug with the
*--pretty-print* feature in bash-5.2. From what I can tell, Bash uses the
utf-8 character */001* as an escape character. However, when using the
pretty-print feature in Bash, this doesn't seem to be considered. So, for
example, in a bash script with character */001* the AST representation
will contain */001/001*, however, when it's printed via the pretty print
feature, this isn't un-escaped.

Thanks for the report. This affects word lists, the word in a case
command, and shell function names. The fix is to dequote those words when
in pretty-printing mode. You could do that for the name in a select
command, too, but that's an invalid identifier to begin with.

Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to