"${array[$key]}"
vs "${array["$key"]}"
?
Typically I quote all bash variables as a default, with purposed exceptions. What about when specifying a key for an associative array? I see that in simple cases, keys can have spaces and there doesn't seem to be any word splitting issues without quotes, but shell frequently has obscure situations where constructs have caveats.
There are lot of extra characters in "${array[$key]}"
and moreso "${array["$key"]}"
. Is there any reason it would be a bad habit to leave variables unquoted in the index field of an associative array reference?