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    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to