- Introduce the
--optional
option onprereq
,prereq-all
,depends-on
andalways-load
modulefile commands. Expressed optional dependency is considered satisfied even if modulefile is not loaded. If optional requirement is loaded afterward, dependent module is automatically reloaded, unless if theauto_handling
configuration option is disabled. - A dependency expressed in modulefile with
module try-load<module>
command is considered optional. Dependent module is automatically reloaded if the optional requirement is loaded afterward, unless if theauto_handling
configuration option is disabled. - Raise error in case of unknown or misplaced option set on
prereq
,prereq-all
,depends-on
oralways-load
modulefile commands. - Add the
--timer
command-line switch to report the total execution time of themodule
command. Also report the execution time of every internal procedure calls when mixed with--debug
option. - Init: move
PATH
setup (to locate Modules' binaries location) from shell initialization scripts to theautoinit
sub-command. (fix issue #462) - Init: move
MANPATH
setup (to locate Modules' man-pages) from shell initialization scripts to theautoinit
sub-command. (fix issue #462) - Init: move shell completion setup from shell initialization scripts to the
autoinit
sub-command. (fix issue #462) - Enclose installation path references in shell code produced by
autoinit
, in initialization scripts and Makefiles to guaranty correct evaluation in case these paths contain a space character. Note that the quarantine mechanism is not compatible with such installation paths. - Fix
source-sh
andsh-to-mod
when used with fish shell script ifregex-easyesc
fish option is enabled. (fix issue #463) - Add the
protected_envvars
configuration option to define a list of environment variables that cannot be modified by modulefile commands. When set,protected_envvars
definesMODULES_PROTECTED_ENVVARS
environment variable. (fix issue #429 with contribution from Adrien Cotte) - Introduce the
lint
sub-command to statically analyze syntax of modulefiles, modulerc and global/user rc. (fix issue #451) - Add the
tcl_linter
configuration option to define the program used to analyze files withlint
sub-command. This option is set tonagelfar.tcl
by default. When changed from default value, theMODULES_TCL_LINTER
environment variable is defined. Default value can be changed with--with-tcl-linter
and--with-tcl-linter-opts
installation options. - Add the
--enable-nagelfar-addons
installation option (enabled by default) to install specific syntax databases and plugins to lint modulefiles, modulerc and global/user rc with Nagelfar. These files are installed in the directory designated by the--nagelfardatadir
(DATAROOTDIR/nagelfar
by default). - Doc: add
lint-sub-command
design notes. - Install: use
install
command rathercp
ormkdir
to install Modules and guaranty consistent permission modes on deployed files. - Also unset
pushenv
value stacks onclear
sub-command. - Doc: add
mod-to-sh-sub-command
design notes. - Introduce the
mod-to-sh
sub-command to translate designated modulefile(s) into code for specified shell. (fix issue #447) - Make
source
sub-command accepts modulefile specification as argument. If argument does not correspond to a file path, search it among available modulefiles. (fix issue #424) - Doc: clarify
set-alias
only define shell alias and not shell function. - Add the ability to filter the list of collections returned by
savelist
sub-command. Filtering pattern is matched in a case insensitive manner by default. - Add support for
--starts-with
and--contains
options onsavelist
sub-command. - Highlight all search patterns on
list
sub-command output instead of only the first one.. - Highlight all search patterns on
savelist
sub-command output. - Add support for
--all
option onsavelist
sub-command not to limit result to the collection matching currently definedcollection_target
. - Doc: add
Shell support
section inmodulefile(4)
man page to describe how shells support the different kind of environment changes that can be defined in modulefiles. - Record during
autoinit
sub-command the initial environment state in__MODULES_LMINIT
. Enabled modulepaths and loaded modulefiles throughmodulespath
andinitrc
initialization configuration files are recorded in this new environment variable. - Add
reset
sub-command to restore initial environment. It takes recorded environment in__MODULES_LMINIT
and restores it. - Initial environment is restored when collection name specified on
restore
sub-command equals__init__
. - When no argument is provided to
restore
sub-command and if default collection does not exist, initial environment is restored. - Initial environment content is displayed when collection name specified on
saveshow
sub-command equals__init__
. - When no argument is provided to
saveshow
sub-command and if default collection does not exist, initial environment content is displayed. - Add
reset_target_state
configuration option to determine behavior ofreset
sub-command. When set to__init__
(default value) initial environment is restored. When set to__purge__
, apurge
sub-command is performed. Any other value, corresponds to the name of a collection torestore
. When set,reset_target_state
definesMODULES_RESET_TARGET_STATE
environment variable. - Doc: add
initial-environment
design notes. - Unload sticky modules on
restore
andreset
sub-commands to fully set environment in collection or initial state. - Testsuite: add lint testsuite to validate syntax of shell and Tcl scripts of this project. This testsuite can be invoked with
make testlint
orscript/mt lint
. sh, bash and ksh scripts are checked with ShellCheck tool and tcl scripts are checked with Nagelfar. - Update
modulecmd.tcl
code and add Nagelfar inline comments to fix linter reports. - Script: add usage message and support for
-h
/--help
option onmrel
,mpub
,mt
,mtreview
,nglfar2ccov
,mb
andmlprof
development utilities. - Doc: describe
script/mt
andscript/mb
utilities inCONTRIBUTING
guide. - Fix ShellCheck error, warning and info reports over all sh, bash and ksh shell scripts. (fix issue #470 with contribution from Lukáš Zaoral)
- Init: update profile script for sh-like shells to only source sh or bash initialization script when BASH environment variable is found set. (fix issue #473)
- Add
stash
sub-command to save current environment and restore initial one. - Add
stashpop
sub-command to restore stash collection then delete this collection file. - Add
stashrm
sub-command to delete stash collection file. - Add
stashshow
sub-command to display stash collection file. - Add
stashclear
sub-command to delete all stash collection files. - Add
stashlist
sub-command to list all stash collection files. - Update
savelist
sub-command to filter out stash collections unless if--all
option is set. - Doc: ensure current user environment does not break logging system in
log-module-command
recipe. (fix issue #475) - Rename the default git branch from master to main to use inclusive terminology.
- Mark loaded modules that could benefit from a refresh evaluation in the
__MODULES_LMREFRESH
environment variable. - Optimize
refresh
sub-command to only evaluate loaded modules that defines volatile environment changes (shell completion, alias or function). (fix issue #477) - Add
modulefile_extra_cmds
hook variable that could be defined insiteconfig.tcl
file to define specific commands in modulefile interpreter context.modulefile_extra_cmds
is a list of command name and relative procedure pairs. (fix issue #286) - Add
modulefile_extra_vars
hook variable that could be defined insiteconfig.tcl
file to define specific variables in modulefile interpreter context.modulefile_extra_vars
is a list of variable name and value pairs. (fix issue #286) - Add
modulerc_extra_cmds
hook variable that could be defined insiteconfig.tcl
file to define specific commands in modulerc interpreter context.modulerc_extra_cmds
is a list of command name and relative procedure pairs. (fix issue #286) - Add
modulerc_extra_vars
hook variable that could be defined insiteconfig.tcl
file to define specific variables in modulerc interpreter context.modulerc_extra_vars
is a list of variable name and value pairs. (fix issue #286) - Doc: Add
Site-specific configuration
section inmodule(1)
man page. - Doc: extend
Collections
section with examples inmodule(1)
man page.