In POSIX mode, Bash disallows names like '1a':
13. Function names must be valid shell names. That is, they may not
contain characters other than letters, digits, and underscores, and may
not start with a digit. Declaring a function with an invalid name
causes a fatal syntax error in non-interactive shells.
14. Function names may not be the same as one of the POSIX special
builtins.
https://www.gnu.org/software/bash/manual/html_node/Bash-POSIX-Mode.html#Bash-POSIX-Mode
The rules are more lax if POSIX mode is not set, but there's nothing
that requires using nonstandard function names even in that case.
The manual could of course mention something about the accepted function
names, e.g. "Function names can contain the characters [...], except in
POSIX mode, where they must be valid shell /names/." I'm not exactly
sure what the accepted characters are, though, so I can't really suggest
anything concrete.
On 20.1. 17:26, Andrey Butirsky wrote:
Andreas, I know it will work with the '-f' flag.
But for others function names, the '-f' unset flag is not required.
Moreover, it seem confronts with Open Group Base Specification.
So I consider it as a bug still.
On 20.01.2019 18:18, Andreas Schwab wrote:
On Jan 20 2019, Andrey Butirsky <butir...@gmail.com> wrote:
|$ unset 1a ||
||bash: unset: `1a': not a valid identifier
Use `unset -f'.
Andreas.
--
Ilkka Virta / itvi...@iki.fi