Quoting is necessary in a few cases: $ var=foo; declare -A "arr$var=([x]=y)" bash: warning: arrfoo=([x]=y): quoted compound array assignment deprecated $ var=foo; declare -A arr$var=([x]=y) bash: syntax error near unexpected token `(' $ var=foo; declare -A "arr$var"=([x]=y) bash: syntax error near unexpected token `('
I don't think this should be the default behaiour... --- xoxo iza