bug-bash
[Top][All Lists]
Advanced

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

Re: in bash 4.4.12,want to verify a behavior...


From: L A Walsh
Subject: Re: in bash 4.4.12,want to verify a behavior...
Date: Mon, 18 Feb 2019 10:44:16 -0800
User-agent: Thunderbird


On 2/17/2019 6:54 PM, Chet Ramey wrote:
> Not quite. Dynamic variables are only defined to return the correct value
> when they are referenced. The rest of the time, the values are
> indeterminate (and possibly stale). The idea is that you can get an element
> given the right index, or all the elements with the `*' or `@' subscripts.
>
> ...
>
> `declare -p' just lists variables and any existing values. It doesn't cause
> values to be generated. `declare -p BASH_ALIASES' counts as asking for the
> value.
>
>   
Thanks for the more thorough explanation. 

Was wondering if it would be possible (or worth it) on arrays and
hashes, where the current value isn't shown, if the number of entries
stored, might be shown?  That way more people might know that the
declare -p output may only be giving names (and, maybe size) even if
not enumerated.

I would strictly think such a change to be a 'bell/whistle', since
everything seems functional as it is and it may not be worth it to
even makes such a minor change.

Thanks for the explanation!
-l






reply via email to

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