On 1/13/21 12:00 PM, Oğuz wrote:
See:
$ declare -ai a=1
$ declare -n b=a[0]
$ b+=1
bash: a[0]1: syntax error in expression (error token is "1")
Reproducible on 5.1.4 too
Interesting. The root cause of this problem has existed since June, 2012,
when I first added namerefs. When I went looking for the reason it seemed
to work in bash-4.4 but not bash-5.0, I discovered it was masked until
March, 2017, so it `worked' in bash-4.3 and bash-4.4, until that dependency
was fixed.
I agree that it should work -- there doesn't seem to be any reason it
shouldn't -- so I will make it work again in the next devel branch push.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/