Chet Ramey wrote:
No. The shell doesn't perform any word expansions on the `name' when
executing a function definition command. Since the documentation doesn't
say it performs any expansions, why would you assume it does?
Because it does quote quote removal on other statements that _seem_ to be
of similar syntax.
I.e.:
declare "ab=1" "ab"=1 ab"=1" a"b=1" "a"b=1 a"b"=1 ab"=1"
all appear to do quote removal, making them equivalent to
declare ab=1
vs. for function, where
one has:
function a {(echo hi)}
then one might think, _at least_, that some similar syntax would
work like:
function "a" {(echo hi)} function "a" "{(echo hi)}"
or even
declare -f a="{(echo hi)}"
_might_ work.
Also, from a documentation standpoint, not all behaviors are documented
in the manpage, like:
echo $[1+2]
as far as I can tell, isn't documented, yet not supporting
its behavior would break many older scripts....