- Extend stderr output redirection on sh-kind shells to all terminal-attached shell session, not only interactive shell session.
- Extend shell code produced by the
autoinit
command to perform the same environment initialization as done ininit
shell scripts (default value set for module-specific environment variables, parse or source of configuration files). - Make init shell scripts rely on
autoinit
command to define themodule
command and setup its default environment. - Fix error rendering code for Tcl shell by producing a call to the
error
procedure. - Introduce pager support to handle informational messages, using
less
command with-eFKRX
options by default. Environment variableMODULES_PAGER
orPAGER
may be used to supersede default pager command and options.--paginate
and--no-pager
switches enable or disable pager from the command line. - Install: add
--with-pager
and--with-pager-opts
configure options to define default pager command and its relative command-line options. - Introduce quarantine mechanism to protect module execution against side effect coming from the current environment definition. Variables whose name has been put in
MODULES_RUN_QUARANTINE
will be emptied or set to the value hold byMODULES_RUNENV_<VAR>
in the modulecmd.tcl run-time environment. Quarantine variable original value is then restored within modulecmd.tcl execution context once it has started. - Install: add
--with-quarantine-vars
configure option to define at build time theMODULES_RUN_QUARANTINE
andMODULES_RUNENV_<VAR>
environment variables set in initialization scripts. - Add
MODULES_SILENT_SHELL_DEBUG
environment variable to disable on sh shell and derivatives anyxtrace
orverbose
debugging property for the duration of either the module command or the module shell initialization script. (fix issue#121) - Change error code produced by modulecmd.tcl for the Tcl, Perl, Python, Ruby, CMake and R scripting languages to return a 'false' boolean value in case of error rather raising a fatal exception.
- Adapt module function definition for Tcl, Perl, Python, Ruby, CMake and R scripting languages to always return a value, result of the modulecmd.tcl run. When modulecmd.tcl run does not produce a specific status, a 'true' boolean value is returned. On CMake, resulting value is returned though a
module_result
global variable. - Spool content sent to the stdout channel with
puts
command during a modulefile interpretation, to effectively transmit this content to stdout after rendering the environment changes made by this modulefile. (fix issue#113) - Introduce
append-path
,prepend-path
,remove-path
andis-loaded
module sub-commands, based on existing modulefile-specific Tcl commands. (fix issue#116) - Introduce
is-saved
,is-used
andis-avail
modulefile Tcl commands and module sub-commands to test availability of collection, modulepath or modulefile. - Raise error when a call to
path
orpaths
module sub-commands is attempted during a modulefile interpretation. Both commands now return text rather print text on scripting languages. An empty string is returned in no match case instead of a false boolean value. - Introduce
module-info loaded
modulefile command and its module sub-command counterpartinfo-loaded
. This new command returns name of the modules currently loaded corresponding to the name passed as argument. (fix issue#3) - Fix
is-loaded
command to correctly handle multiple module names passed as argument (fix issue#138) - Support no argument on
is-loaded
,is-saved
andis-used
commands to return if anything is respectively loaded, saved or used. - Interpret
module source
command set in modulefile inunload
mode when the modulefile itself is interpreted in this mode. - Consider a modulefile passed with name starting by
./
or../
a full path name modulefile, like those starting by/
. These kind of names are converted to absolute path names, for instance to register them in loaded modulefile list during aload
command. - Correlate modulefile passed as full path name (starting by either
./
,../
or/
) to already loaded modulefile registered with regular module name (file name without its modulepath prefix) to prevent for instance from loading twice same modulefile. Correlate in the same way regular module name to already loaded full path name modulefile. - Introduce
MODULES_COLLECTION_PIN_VERSION
environment variable to record modulefile version number when saving collections even if version corresponds to the default one. (fix issue#89) - Fix location of
etc/rc
global RC file to@prefix@/etc/rc
instead of$MODULESHOME/etc/rc
not to depend onMODULESHOME
environment variable value. - Strengthen argument check for
append-path
,prepend-path
andremove-path
modulefile Tcl commands and module sub-commands. Raise error if argument list is not correct. - Fix support for the
--delim=C
argument form onappend-path
,prepend-path
andremove-path
commands. - Fix path reference counter handling in case path element is an empty string. Distinguish an empty path element from a variable set empty to clear it.
- Pass multiple path elements separated by delimiter character as one string on
append-path
,prepend-path
andremove-path
commands. - Accept multiple path element arguments on
append-path
,prepend-path
andremove-path
commands. - Introduce the
--duplicates
argument option toappend-path
andprepend-path
commands to add a path element already registered in variable. - Introduce the
--index
argument option toremove-path
command to delete a path entry by passing its position index in variable. - Provide the ability to setup a site-specific configuration sourced at the start of
modulecmd.tcl
main procedure. This configuration is a Tcl script namedsiteconfig.tcl
which enables to supersede any Tcl definition made inmodulecmd.tcl
. Location of this file is controlled at configure time with the--etcdir
option. - Add the ability to handle paths containing reference to environment variable in
MODULEPATH
. When these kind of paths are used bymodule
command, the variable references are converted to their corresponding value or to an empty string if they are not defined. - Enclose value set to environment variable on Tcl within curly braces rather double quotes to protect special characters in it from interpretation.
- Correctly parse
.modulespath
initialization file to handle lines without any#
character or to handle files with no content to extract. - Re-introduce the
--enable-versioning
configure option, which appends Modules version to installation prefix and deploy aversions
modulepath shared between all versioning enabled Modules installation. A modulefile corresponding to Modules version is added to the shared modulepath and enables to switch from one Modules version to another. - Fix removal of CMake generated temporary script file by stripping newline character from script file name.
- Add
MODULES_CMD
environment variable to expose path to the currently active module command script. This variable is set at initialization time. - Introduce
modulecmd
wrapper script, installed in binary directory, which executes the active module command. - Fix modulefile Tcl interpreter reset when handling list variables. (fix issue#145)
- Introduce 'module-virtual' modulefile Tcl command to associate a virtual module name to a modulefile. This module can be located with its virtual name and the associated modulefile is the script interpreted when loading, unloading, etc.
- Resolution of relative paths occurring during a modulefile interpretation to target a modulefile or a modulepath now takes the directory of the currently interpreted modulefile as the current working directory to solve the relative paths.