[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Local variables for nested function calls
From: |
eduardo-chibas |
Subject: |
Local variables for nested function calls |
Date: |
Wed, 28 Jul 2021 21:10:49 +0200 |
Are there other things to be unsatisfied with in addition to
`: "${fdir:="${@:$#}"}"}` and `fdir=${fdir:-default}`.
You are satisfied with
`bar="${foo:-default}`
Would you also be satisfied with
: ${ctx:=8}
Was the problem mostly related to using a list such as `$@` together with the
other
complications?
Have only started looking about these things a few days ago, so most of my
analysis
on what to use in specific situations is likely wrong. That's why I am asking
for some illumination on this list.
> Sent: Thursday, July 29, 2021 at 5:05 AM
> From: "Greg Wooledge" <greg@wooledge.org>
> To: help-bash@gnu.org
> Subject: Re: Local variables for nested function calls
>
> 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?
>
>
- Re: Local variables for nested function calls, (continued)
- Re: Local variables for nested function calls, eduardo-chibas, 2021/07/28
- Local variables for nested function calls, eduardo-chibas, 2021/07/28
- Re: Local variables for nested function calls, Greg Wooledge, 2021/07/28
- Local variables for nested function calls, eduardo-chibas, 2021/07/28
- Re: Local variables for nested function calls, Greg Wooledge, 2021/07/28
- Local variables for nested function calls, eduardo-chibas, 2021/07/28
- Local variables for nested function calls, eduardo-chibas, 2021/07/28
- Local variables for nested function calls, eduardo-chibas, 2021/07/28
- Local variables for nested function calls, eduardo-chibas, 2021/07/28
- Re: Local variables for nested function calls, Alex fxmbsw7 Ratchev, 2021/07/28
- Local variables for nested function calls,
eduardo-chibas <=
- Are you trolling us?, Greg Wooledge, 2021/07/28
- Re: Are you trolling us?, Dennis Williamson, 2021/07/28
- Are you trolling us?, eduardo-chibas, 2021/07/28
- Re: Are you trolling us?, Lawrence Velázquez, 2021/07/28
- Are you trolling us?, eduardo-chibas, 2021/07/28
- Re: Are you trolling us?, Chet Ramey, 2021/07/28
- Are you trolling us?, eduardo-chibas, 2021/07/29
- Re: Are you trolling us?, Chet Ramey, 2021/07/29
- Are you trolling us?, eduardo-chibas, 2021/07/29
- Are you trolling us?, eduardo-chibas, 2021/07/29