On Wed, Jan 13, 2021 at 07:00:42PM +0200, Oğuz wrote:
$ declare -n b=a[0]
I can't see any documentation that supports the idea that this should
be allowed in the first place.
-n Give each name the nameref attribute, making it a name
reference to another variable. That other variable is
defined by the value of name. All references, assign‐
ments, and attribute modifications to name, except those
using or changing the -n attribute itself, are performed
on the variable referenced by name's value.
In at least three places there, it says that that "target" of the
name reference is a variable. a[0] isn't a variable.