> > ⚠️ STOP USING [[ -v "assoc[$key]" ]]! DO NOT USE IT! ⚠️
> >
> > [...]
> >
> > Use [[ -v 'assoc[$key]' ]] instead, so that -v can expand the variable
> > correctly by itself:
>
> Thank you for the warning, I somehow forgot about this behavior even
> though the manual mentions it explicitly.
> ⚠️ STOP USING [[ -v "assoc[$key]" ]]! DO NOT USE IT! ⚠️
>
> [...]
>
> Use [[ -v 'assoc[$key]' ]] instead, so that -v can expand the variable
> correctly by itself:
Thank you for the warning, I somehow forgot about this behavior even though
the manual mentions it explicitly.
> Also, especiall
> Anyway, that is still correct behaviour; the reason why that happens is
> that when you assign you perform an array expansion on a variable that
> is neither a -a nor a -A variable, the variable is treated as a -a
> (indexed array) variable.
Thank you for the explanation. I was immediately wonde
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-musl
Compiler: gcc
Compilation CFLAGS: -Os -Wformat -Werror=format-security -Werror=int-conversion
-DSYS_BASHRC='/etc/bash/bashrc' -g
uname output: Linux 9c586e87b370 5.15.90.1-microsoft-standard-WSL2 #1