[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash Bug - Incorrect Printing of Escaped Characters
From: |
Seth Sabar |
Subject: |
Re: Bash Bug - Incorrect Printing of Escaped Characters |
Date: |
Tue, 16 Jan 2024 11:00:42 -0500 |
Are you planning on releasing a patch for this? If you'd like me to try to
prepare a patch, I'd appreciate some guidance around the various
dequote_... functions in subst.c. Thanks!
Best,
Seth
On Wed, Dec 27, 2023 at 1:03 PM Chet Ramey <chet.ramey@case.edu> wrote:
> 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 chet@case.edu http://tiswww.cwru.edu/~chet/
>
>
- Re: Bash Bug - Incorrect Printing of Escaped Characters,
Seth Sabar <=