help-bash
[Top][All Lists]
Advanced

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

Re: Bash-5.2 Release available


From: Chet Ramey
Subject: Re: Bash-5.2 Release available
Date: Mon, 31 Oct 2022 11:25:25 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.0

On 10/28/22 9:22 PM, Corey Hickey wrote:
On 2022-09-26 12:33, Chet Ramey wrote:
There are a few incompatible changes between bash-5.1 and bash-5.2. Here-
documents and here-strings use temporary files if the shell compatibility
level is 50 or lower. The `unset' builtin in bash-5.2 treats array subscripts
`@' and `*' differently than previous versions, and differently depending on
whether the array is indexed or associative. Bash-5.2 attempts to prevent
double-expansion of array subscripts under certain circumstances, especially
arithmetic evaluation, by acting as if the `assoc_expand_once' shell option
were set. Set the compatibility level appropriately to revert to previous
behavior; details are in the file COMPAT.

I think I encountered the array subscript change, and I'm having some trouble.

Thanks for the report. I left the arithmetic evaluation of associative arrays using `@' and `*' as keys alone for backwards compatibility, but
it needs to move up with the rest of the compatibility level code. Here's
a patch that does that.

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: arith-exprs-assoc-atstar.patch
Description: Text document


reply via email to

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