help-bash
[Top][All Lists]
Advanced

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

Re: Local variables for nested function calls


From: Greg Wooledge
Subject: Re: Local variables for nested function calls
Date: Wed, 28 Jul 2021 13:05:44 -0400

On Wed, Jul 28, 2021 at 06:55:19PM +0200, eduardo-chibas@caramail.com wrote:
> Some object to this one,
> 
> local foo=${foo:-default}

Well, yeah, you can see why.  What was 'foo' set to previously?  Why are
you only declaring it local *now*, after it possibly already had some
value?

I don't understand the intent of this command, at least not without
some context, so it's difficult for me to approve of it.

What are you actually trying to do?



reply via email to

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