Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
On 10/25/16 4:09 PM, Stuart Shelton wrote:
> The cases appear, purely by inspection, to be:
>
> Not declared: trivially, `typeset -p` doesn’t include the value;
> Declared (even as local) but unassigned: `typeset -p` includes "declare --
> varname";
> Declared and assigned: `typeset -p` includes "declare -- varname=‘value’”
>
> … although how much of this is by design and how much by chance I’m not sure
> ;)
It's all by design. The idea is that you can use `typeset -p' to save and
restore the variable state. It's imperfect, I'm sure, and there are
probably missing edge cases, but that's the idea.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/