bug-bash
[Top][All Lists]
Advanced

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

Re: add a way to declare global variables


From: Chet Ramey
Subject: Re: add a way to declare global variables
Date: Sat, 12 Dec 2009 15:41:56 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0

On 12/12/09 5:28 AM, Bernd Eggink wrote:
> Am 10.12.2009 10:40, schrieb konsolebox:
> 
>> I hope the development team will also consider adding a way in bash to
>> declare global variables inside a function perhaps either with an
>> option in typeset or declare like -g (same as zsh) and/or a builtin
>> function like global as similar to local.
> 
> I second that. I'm missing this feature badly. Presently, you can only
> get around this restriction by using a lot of ugly and dangerous 'eval's.

OK.  I'm interested in use cases for this feature.  What are you trying
to do that you're missing it "badly?"

Chet


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




reply via email to

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