[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: declare -F incorrect line number
From: |
Greg Wooledge |
Subject: |
Re: declare -F incorrect line number |
Date: |
Thu, 6 Oct 2022 13:16:44 -0400 |
On Fri, Oct 07, 2022 at 01:28:59AM +1000, Martin D Kealey wrote:
> I write nested functions quite often, usually with a subsequent `unset -f`
> but sometimes (necessarily) without.
>
> Being able to write `local -F funcname { ... }` or `function -L funcname {
> ... }` would be a nice replacement for the former, but the latter is
> usually about different phases of execution, rather than abstractions for
> different data.
You do realize that there are no "nested functions" in bash, right? All
functions exist in a single, global function namespace.
unicorn:~$ bash
unicorn:~$ f() { g() { echo I am g; }; }
unicorn:~$ f
unicorn:~$ type g
g is a function
g ()
{
echo I am g
}
Functions are never "local".
- declare -F incorrect line number, Daniel Castro, 2022/10/02
- Re: declare -F incorrect line number, Chet Ramey, 2022/10/05
- RE: declare -F incorrect line number, Daniel Castro, 2022/10/05
- Re: declare -F incorrect line number, Chet Ramey, 2022/10/05
- Re: declare -F incorrect line number, Robert Elz, 2022/10/05
- Re: declare -F incorrect line number, Chet Ramey, 2022/10/06
- Re: declare -F incorrect line number, Martin D Kealey, 2022/10/06
- Re: declare -F incorrect line number,
Greg Wooledge <=
- Re: declare -F incorrect line number, Martin D Kealey, 2022/10/11
Re: declare -F incorrect line number, Chet Ramey, 2022/10/08