diff --git a/easybuild/tools/module_generator.py b/easybuild/tools/module_generator.py index 70ee2ff7d5..316ff76d03 100644 --- a/easybuild/tools/module_generator.py +++ b/easybuild/tools/module_generator.py @@ -514,6 +514,12 @@ def set_alias(self, key, value): """ raise NotImplementedError + def set_shell_function(self, key, bashStr, cshStr): + """ + Generate set_shell_function statement in modulefile for the given key/value pair. + """ + raise NotImplementedError + def set_as_default(self, module_dir_path, module_version, mod_symlink_paths=None): """ Set generated module as default module @@ -1005,6 +1011,12 @@ def set_alias(self, key, value): # quotes are needed, to ensure smooth working of EBDEVEL* modulefiles return 'set-alias\t%s\t\t%s\n' % (key, quote_str(value, tcl=True)) + def set_shell_function(self, key, bashStr, cshStr): + """ + Generate set_shell_function statement in modulefile for the given key/value pair. + """ + raise NotImplementedError + def set_as_default(self, module_dir_path, module_version, mod_symlink_paths=None): """ Create a .version file inside the package module folder in order to set the default version for TMod @@ -1480,6 +1492,13 @@ def set_alias(self, key, value): # quotes are needed, to ensure smooth working of EBDEVEL* modulefiles return 'set_alias("%s", %s)\n' % (key, quote_str(value)) + def set_shell_function(self, key, bashStr, cshStr): + """ + Generate set_shell_function statement in modulefile for the given key/value pair. + """ + # quotes are needed, to ensure smooth working of EBDEVEL* modulefiles + return 'set_shell_function("%s", %s, %s)\n' % (key, quote_str(bashStr), quote_str(cshStr)) + def set_as_default(self, module_dir_path, module_version, mod_symlink_paths=None): """ Create a symlink named 'default' inside the package's module folder in order to set the default module version