I put a bug report into an emacs group because the bash syntax highlighter
failed to recognize functions whose names have dashes in them.
The maintainer came back with this:
I can reproduce this behaviour, but is it really a bug? Aren't the
names with '-' invalid?
The Bash Reference Manual says:
name
A word consisting solely of letters, numbers, and underscores, and
beginning with a letter or underscore. Names are used as shell
variable and function names. Also referred to as an identifier.
https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html
I looked at the manual and I didn't see positive or negative
acknowledgement that dashes can be used in function names. But it does work.
Update to manual?
name
A word consisting solely of letters, numbers, and underscores, and
beginning with a letter or underscore. Names are used as shell
variables. Also referred to as an identifier.
function name
A word consisting solely of letters, numbers, underscores, dashes, and
beginning with a letter or underscore. Function names are used to label
shell
functions.
--
Matthew O. Persico