bug-bash
[Top][All Lists]
Advanced

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

Re: Passing variables by reference conflicts with local


From: Chet Ramey
Subject: Re: Passing variables by reference conflicts with local
Date: Mon, 03 May 2010 08:57:58 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

On 5/3/10 8:21 AM, Greg Wooledge wrote:
> On Sat, May 01, 2010 at 04:26:16AM -0500, Dennis Williamson wrote:
>> I prefer to avoid using eval by using declare, but declare inside a
>> function makes the variable local. Wouldn't it be nice to have a
>> global flag (declare -g) like zsh's typeset -g.
> 
> Yeah.  It definitely would.  (This comes up every once in a while in
> IRC, too.)

I am planning a feature like this for a future release.  It may end up
in bash-4.2.

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]