I'm trying to write a modulefile to load a program, and I would like to include multiple aliases users can call the program with, as they know it under different names. How can I modify this command for setting a single alias to point multiple aliases towards the same executable?
# Set alias for the executable
set-alias "nickname1" "path/to/the/executable -other-command-line-arguments"
Thanks in advance!
You may add a Tcl variable to your modulefile to hold the executable path name and arguments, then define all the nickname aliases with this Tcl variable value as target:
# Set aliases for the executable
set cmd_name_and_args "path/to/the/executable -other-command-line-arguments"
set-alias nickname1 $cmd_name_and_args
set-alias nickname2 $cmd_name_and_args
set-alias nickname3 $cmd_name_and_args