> 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 <torreemanue...@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.

Before that patch, it was possible to expand a brace expansion in the
subscript of a quoted array parameter expansion if it the brace
expansion was surrounded by double quotes.

    bash-5.1$ letters=( {a..z} ); echo "${letters["{10..15}"]}"
    k l m n o p

    bash-5.3$ letters=( {a..z} ); echo "${letters["{10..15}"]}"
    bash: {10..15}: arithmetic syntax error: operand expected (error token is 
"{10..15}")

o/
 emanuele6

Reply via email to