On 2/2/23 1:47 AM, Martin D Kealey wrote:
...in posix mode, fname must be a valid shell name and may not be the name
of one of the POSIX special builtins.
In default mode, a function name can be any unquoted shell word that does
not contain $. ...
I'm guessing the intention is that it shouldn't contain any expansions, so
it also shouldn't contain `backticks` or <(command substitutions).
Why not? If you want a shell function name that contains characters that
are special to word expansions, quote them on invocation:
`backtick` ()
{
echo $FUNCNAME
}
\`backtick\`
They're just nonsensical.
Hmm, I wonder whether <(:) could be a valid function name, if it expands to
something like /dev/fd/63?
Bash doesn't allow that; it treats the < like a $ in this case.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/