Skip to content

'not a valid identifier' error when defining shell function on bash #401

@xdelaruelle

Description

@xdelaruelle

When defining on Bash a shell function including a - in its name, a not valid identifier error is obtained:

$ ml -V
Modules Release 4.7.1 (2021-04-06)
$ cat test
#%Module
set-function foo-bar {echo foo bar}
$ ml ./test
bash: export: `foo-bar': not a valid identifier

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions