On Fri, Nov 06, 2020 at 02:07:36PM +0100, Edouard Thiel wrote: > there is an error in the bash documentation: > https://www.gnu.org/software/bash/manual/bash.html#Bash-Builtins > > In the 'declare' builtin, option '-n', last sentence: > "The nameref attribute cannot be applied to array variables" > is actually wrong: it can be applied to indexed and associative arrays > (since bash 4.3+) > > (tested for bash version : 4.3.48(1)-release (x86_64-pc-linux-gnu))
The relevant section in the 5.0 man page under PARAMETERS says: Array variables cannot be given the nameref attribute. However, nameref variables can reference array variables and subscripted array variables. What, exactly, did you test?