On 8/18/11 11:58 AM, Greg Wooledge wrote:

> It would appear "declare -g" does NOT allow you to "jump over" a local
> variable that is shadowing a global.  That's disappointing.

That is not its intent.  The very narrow purpose of declare -g is to
allow you to declare a variable with attributes in a function without
the variable becoming local.  It doesn't change variable scoping rules
or variable name resolution behavior.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to