2015-07-02 00:22:08 -0700, Marcus Hildum: [...] > Description: > It is possible to supply many ascii control characters as function > names. This allows obfuscation of function calls because the majority of > these are non printing characters. > > > https://github.com/airencracken/why/blob/master/control_character_functions.sh > > Repeat-By: > Define a function with a control character, then call it. > Fix: > Disallow functions to be named after control characters or non-printing > characters in general. [...]
(note that I am not a bash developer, this opinion is just mine) Files (so commands on the file system) can have any character in their name, functions share the same name space as other commands (files), so I don't see the point in restricting one and not the other. If one wants to obfuscate his scripts, who are we to stop him doing that, on what ground? Note that zsh allows any string as a function name including things that can't be file paths like the empty string or strings containing NUL bytes: $ ''() echo test $ '' test $ $'\0'() echo foo $ $'\0' foo -- Stephane