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.