On Thu, Feb 02, 2023 at 04:47:34PM +1000, 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). > > Hmm, I wonder whether <(:) could be a valid function name, if it expands to > something like /dev/fd/63? > > I agreed, it's better to make the documentation agree with how it actually > behaves, rather than add more weirdness to the behaviour.
I'd be totally OK with restricting the function namespace a bit more. Function names should not be allowed to contain backticks or less-than or greater-than signs (in my opinion). I'm still undecided about parentheses, but I'm leaning toward "denied".