On Wed, Mar 20, 2024, at 7:11 AM, Zachary Santer wrote: > On Wed, Mar 20, 2024 at 12:29 AM Lawrence Velázquez <v...@larryv.me> wrote: >> >> This isn't specific to ${var[@]@k}. >> >> $ kv1='a 1 b 2 c 3' >> $ kv2=(a 1 b 2 c 3) >> $ declare -A aa1=($kv1) aa2=(${kv2[@]}) aa3=("${kv2[@]}") >> $ declare -p aa1 aa2 aa3 >> declare -A aa1=(["a 1 b 2 c 3"]="" ) >> declare -A aa2=(["a 1 b 2 c 3"]="" ) >> declare -A aa3=(["a 1 b 2 c 3"]="" ) >> >> A couple of previous discussions: >> - https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00066.html >> - https://lists.gnu.org/archive/html/bug-bash/2023-06/msg00128.html > > There I go, reporting a bug that isn't a bug again. > > One would think that enabling this behavior would be the entire > purpose of the alternate ( key value ) syntax. If it doesn't do that, > what benefit does it give over the standard ( [key]=value ) syntax? > Maybe it;s easier to use eval with?
https://lists.gnu.org/archive/html/bug-bash/2019-07/msg00056.html -- vq