You do realize that there are no "nested functions" in bash, right?
Graycat, talk to me on Libera if you really doubt my understanding.
All functions exist in a single, global function namespace.
>
> unicorn:~$ bash
> unicorn:~$ f() { g() { echo I am g; }; }
> unicorn:~$ f
> unicorn:~$ type g
>
On 10/2/22 4:51 AM, Daniel Castro wrote:
Bash Version: 5.0
Patch Level: 17
Release Status: release
Description:
declare -F yields the wrong line number for a function that has
nested functions declared within. Instead it gives the line number of
the last nested
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
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
On 10/5/22 6:29 PM, Robert Elz wrote:
Date:Wed, 5 Oct 2022 15:36:55 -0400
From:Chet Ramey
Message-ID: <3d89acac-4c0a-64c9-e22c-1a3ca6860...@case.edu>
| Other than that, there's no advantage.
There can be. I have, on occasion (not in bash - I don't
write
Date:Wed, 5 Oct 2022 15:36:55 -0400
From:Chet Ramey
Message-ID: <3d89acac-4c0a-64c9-e22c-1a3ca6860...@case.edu>
| Other than that, there's no advantage.
There can be. I have, on occasion (not in bash - I don't
write bash scripts) had a need to redefine one of
On 10/5/22 3:32 PM, Daniel Castro wrote:
In this case I’m not doing anything too fancy: my use case is I have a main
project script where I declare functions that can get executed
independently with some prefix: e.g. ``x.build()``, ``x.test()`` so I can
call ``myscript test`` or ``myscript
: Re: declare -F incorrect line number
On 10/2/22 4:51 AM, Daniel Castro wrote:
> Bash Version: 5.0
>
> Patch Level: 17
>
> Release Status: release
>
>
> Description:
>
> declare -F yields the wrong line
On 10/2/22 4:51 AM, Daniel Castro wrote:
Bash Version: 5.0
Patch Level: 17
Release Status: release
Description:
declare -F yields the wrong line number for a function that has
nested functions declared within. Instead it gives the line number of
the last
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2
-fdebug-prefix-map=/build/bash-Smvct5/bash-5.0=.
-fstack-protector-strong -Wformat -Werror=format-security -Wall
-Wno-parentheses
10 matches
Mail list logo