Andreas Schwab writes:
>> In default mode, you actually can do
>> $ function a=b { printf hi\\n; }
>> though you can't execute it:
>> $ a=b foo
>> bash: foo: command not found
>
> You just have to quote any part of the function name upto the equal sign
> to stop if from being
On 12/3/22 6:18 AM, Emanuele Torre wrote:
`declare -f "something="' fails with the following error:
Thanks for the report.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.edu
On Dez 04 2022, Dale R. Worley wrote:
> In default mode, you actually can do
> $ function a=b { printf hi\\n; }
> though you can't execute it:
> $ a=b foo
> bash: foo: command not found
You just have to quote any part of the function name upto the equal sign
to stop if from being
Emanuele Torre writes:
> `declare -f "something="' fails with the following error:
>
> $ declare -f 'a=x'
> bash: declare: cannot use `-f' to make functions
> That error is not very useful. Bash makes `declare -f' fail with that
> error when an argument looks like an assignment.
It's an
`declare -f "something="' fails with the following error:
$ declare -f 'a=x'
bash: declare: cannot use `-f' to make functions
$ f=a=x
$ decalre -f -- "$f"
bash: declare: cannot use `-f' to make functions
That error is not very useful. Bash makes `declare -f' fail with that