bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: info missing in output of declare -a in 4.4.x


From: Andreas Schwab
Subject: Re: info missing in output of declare -a in 4.4.x
Date: Mon, 18 Feb 2019 10:03:11 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.91 (gnu/linux)

On Feb 17 2019, Dennis Williamson <address@hidden> 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, address@hidden
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]