bug-bash
[Top][All Lists]
Advanced

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

Re: bash tries to parse comsub in quoted PE pattern


From: Chet Ramey
Subject: Re: bash tries to parse comsub in quoted PE pattern
Date: Wed, 18 Oct 2023 09:50:00 -0400
User-agent: Mozilla Thunderbird

On 10/17/23 5:55 PM, Emanuele Torre wrote:
braces.c
        - brace_gobbler: use extract_dollar_brace_string if we see ${ with
          the appropriate value of QUOTING, so we don't have to teach brace
          expansion more shell syntax.
          Report from Emanuele Torre <torreemanuele6@gmail.com>
        - brace_gobbler: call the word extraction functions with SX_NOALLOC
          so we don't have to allocate memory we're just going to free

That patch fixed the bug with "${foo#'$('}", but it also broke the
"${arr["{start..end}"]}" / "${arr["{foo,bar}"]}" patterns.

How much shell syntax do you want? You want brace expansion to detect
some issues with parameter expansion but ignore others, and detect
some expansions but not others, without supplying requirements.

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




reply via email to

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