$ echo ${BASH_CMDS@a}; compgen -A arrayvar BASH_CMDS; echo $?
A
1
The description doesn't specify that the output is limited to indexed
arrays only and it would be nice to have associative array variables
included as well.I had a recent use case for this when adding array index completion to bash-completion.
