- Introduce the
edit
sub-command that opens modulefile passed as argument in a text editor. Modulefile can be specified like with any other sub-command, leveraging defined symbolic versions, aliases or using advanced version specifiers. - Add the
editor
configuration option to select the text editor to use withedit
sub-command. When this option is set through theconfig
sub-command, theMODULES_EDITOR
environment variable is set. The--with-editor
installation option controls the default value ofeditor
configuration option. If not set at installation time,vi
is set as default editor. - Default value of
editor
configuration option is overridden by theVISUAL
or theEDITOR
environment variables, which are both in turn overridden by theMODULES_EDITOR
environment variable. - Doc: fix
modulecmd.tcl
internal state check in recipes example codes. (fix issue #396) - The
Advanced module version specifiers
mechanism now allows the use of version range in version list (for instancemod@:1.2,1.4:1.6,1.8:
). Such specification helps to exclude specific versions. (fix issue #397) - Install: fix installation scripts to allow building Modules when its repository is set as a git submodule. (fix issue #398)
- Doc: demonstrate in the
source-script-in-modulefile
recipe how to use thesource-sh
command when software provide a specific initialization script for each shell it supports. (fix issue #399) - When defining a shell function with the
set-function
modulefile command, only export this function when using the Bash shell (using theexport -f
shell command) to make it available in sub-shell contexts. Shell function export is not supported on other kind of sh shell (sh, ksh and zsh). (fix issue #401) - Doc: add
variants
design notes. - Add the
variant
modulefile command that enables to pass down arguments, specified when designating the module to evaluate, within modulefile evaluation context. This command defines a variant name and a list of allowed values. When evaluated,variant
instantiates an element in theModuleVariant
array whose name equals variant name and value is set with value specified for variant when module is designated. If specified value does not correspond to an allowed value or if no value is specified for variant an error is raised. - Enhance the
Advanced module version specifiers
to handle variant specification followingSpack
_'s syntax (e.g., name=value). When theadvanced_version_spec
configuration is enabled, variant could be specified anywhere a module can be specified. - Add the
--default
option to thevariant
modulefile command to indicate the default value of the variant to apply when the designation of the evaluating module does not mention this variant. - Add the
--boolean
option to thevariant
modulefile command to indicate that the variant defined is of the Boolean type, thus no list of accepted value is expected. - Enhance the
Advanced module version specifiers
to handle Boolean variant specification followingSpack
_'s syntax (e.g., +name, ~name and -name). The -name syntax is not supported onml(1)
command as the minus sign already means to unload designated module. - Accept any minus argument (-word) set after the sub-command name when the
advanced_version_spec
configuration is enabled and if sub-command acceptsAdvanced module version specifiers
(likeload
orunload
sub-commands). A false value may be set to Boolean variant this way. - Add the
variant_shortcut
configuration option to define shortcut characters that could be used to specify and report module variants. Default value for this option could be set at installation time with the--with-variant-shortcut
option. No variant shortcut is defined by default. This value could be superseded by setting up thevariant_shortcut
option withconfig
sub-command. Which sets theMODULES_VARIANT_SHORTCUT
environment variable. - Enhance the
Advanced module version specifiers
to handle variant shortcut specification (e.g., value). - Record in user loaded environment, with
MODULES_LMVARIANT
environment variable, the value specified for the variants defined in the loaded modulefiles and their properties (if it is a Boolean variant and if the value set is the default one). - Add the
variant
element in the allowed value list of thelist_output
andlist_terse_output
configuration options. Set this new element in the default value list of thelist_output
option. When set, the variant defined for loaded modules are reported on modulelist
command output. - Add the
va
color key in default light and dark color palettes to graphically enhance the report of variant value. - Update the key section to explain on
list
sub-command output the reported variant elements (name=value, +name, -name or value) - Record variant specification of loaded modules when saving collections and reload specified variants when restoring these collections.
- When
collection_pin_version
configuration is disabled, only record in collections the variants whose value is not the default one. - Update module designation in error, warning or informational messages to report variant specification enclosed in curly braces ({}), enclose module name and version or variant specification in single quotes ('') if they contain a space character and highlight the module designation in report message if configured.
- Introduce the
getvariant
modulefile command to query for currently evaluating module the value of a given variant name. - When translating the
@loaded
version specifier also retrieve the variant specified for corresponding loaded module. - Update hide, forbid and tag mechanisms to apply them only if they match selected module variant.
- Any variant defined in module specification passed as argument to search sub-commands (
avail
,whatis
,is-avail
,path
andpaths
) is ignored. - Raise an error if a variant named
version
is declared in a modulefile to let room for the future implementation of this specific variant. - Doc: describe in the
diff_v3_v4
document argument handling change onsetenv
since v3.2. (fix issue #402) - Introduce the
try-load
sub-command which likeload
sub-command tries to load the modulefile passed as argument, but does not complain if this modulefile cannot be found. (fix issue #392) - Init: fix stderr redirection in fish shell initialization script, now that use of the
^
character to redirect stderr is disabled by default (fish >=3.3). - Protect quarantine mechanism code from
rcexpandparam
Zsh option when initializing themodule
command on this shell. (fix issue #403)