bug-bash
[Top][All Lists]
Advanced

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

add a way to declare global variables


From: konsolebox
Subject: add a way to declare global variables
Date: Thu, 10 Dec 2009 11:40:40 +0200

Good day,

The new feature, associative arrays in bash 4.0 was very useful but I
can't find any way to declare them as global when declaring inside a
function.  By default all variables are set local when using declare
and typeset and there are no other ways to declare an associative
array but through the said functions.

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.

Cheers,
konsolebox




reply via email to

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