bug-bash
[Top][All Lists]
Advanced

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

Re: conditional aliases are broken


From: Chet Ramey
Subject: Re: conditional aliases are broken
Date: Thu, 18 Aug 2011 14:46:40 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0

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



reply via email to

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