On Feb 17 2019, Dennis Williamson <dennistwilliam...@gmail.com> wrote:

> Oh, interesting! In Bash 4 and 5, I just did declare -p with no args and it
> showed BASH_ALIASES empty. But with declare -p BASH_ALIASES it shows the
> contents (as does the alias command).
>
> Other arrays that show this difference for me:
>
> BASH_CMDS
> DIRSTACK
> GROUPS
>
> Scalars that exhibit this issue:
>
> BASHPID
> BASH_COMMAND
> BASH_SUBSHELL
> COMP_WORDBREAKS
> HISTCMD
> LINENO
> RANDOM
> SECONDS

All these dynamic variables are displayed with values by declare -p
after the variable is accessed once.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

Reply via email to