|
From: | Greg Wooledge |
Subject: | Re: feature request, vars local only to function running, not sub functions running |
Date: | Wed, 12 May 2021 23:02:33 -0400 |
On Thu, May 13, 2021 at 04:07:49AM +0200, Alex fxmbsw7 Ratchev wrote: > .. > > how to explain in other words.. > > func1() { declare -L foo=bar ; func2 ; } > func2() { printf %s "$foo" ; } # <-- should print empty If you want that, simply declare foo locally in func2.
[Prev in Thread] | Current Thread | [Next in Thread] |