"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "doc/source/module.rst" between
modules-5.1.1.tar.bz2 and modules-5.2.0.tar.bz2

About: The Environment Modules package provides for the dynamic modification of a user’s environment via modulefiles.

module.rst  (modules-5.1.1.tar.bz2):module.rst  (modules-5.2.0.tar.bz2)
skipping to change at line 71 skipping to change at line 71
a :subcmd:`module refresh<refresh>` is automatically applied to restore in the a :subcmd:`module refresh<refresh>` is automatically applied to restore in the
current environment all non-persistent components set by loaded modules. current environment all non-persistent components set by loaded modules.
The :command:`module` alias or function executes the :file:`modulecmd.tcl` The :command:`module` alias or function executes the :file:`modulecmd.tcl`
program and has the shell evaluate the command's output. The first argument to program and has the shell evaluate the command's output. The first argument to
:file:`modulecmd.tcl` specifies the type of shell. :file:`modulecmd.tcl` specifies the type of shell.
The initialization scripts are kept in |file initdir_shell| where The initialization scripts are kept in |file initdir_shell| where
*<shell>* is the name of the sourcing shell. For example, a C Shell user *<shell>* is the name of the sourcing shell. For example, a C Shell user
sources the |file initdir_csh| script. The sh, csh, tcsh, bash, ksh, sources the |file initdir_csh| script. The sh, csh, tcsh, bash, ksh,
zsh and fish shells are supported by :file:`modulecmd.tcl`. In addition, zsh, fish and cmd shells are supported by :file:`modulecmd.tcl`. In addition,
python, perl, ruby, tcl, cmake, r and lisp "shells" are supported which python, perl, ruby, tcl, cmake, r and lisp "shells" are supported which
writes the environment changes to stdout as python, perl, ruby, tcl, lisp, writes the environment changes to stdout as python, perl, ruby, tcl, lisp,
r or cmake code. r or cmake code.
Initialization may also be performed by directly calling the Initialization may also be performed by directly calling the
:subcmd:`autoinit` sub-command of the :file:`modulecmd.tcl` program. :subcmd:`autoinit` sub-command of the :file:`modulecmd.tcl` program.
A :command:`ml` alias or function may also be defined at initialization time A :command:`ml` alias or function may also be defined at initialization time
if enabled (see :envvar:`MODULES_ML` section). :command:`ml` is a handy if enabled (see :envvar:`MODULES_ML` section). :command:`ml` is a handy
frontend leveraging all :command:`module` command capabilities with less frontend leveraging all :command:`module` command capabilities with less
skipping to change at line 128 skipping to change at line 128
.. parsed-literal:: .. parsed-literal::
eval "$(\ |libexecdir|\ /modulecmd.tcl sh autoinit)" eval "$(\ |libexecdir|\ /modulecmd.tcl sh autoinit)"
.. _Modulecmd startup: .. _Modulecmd startup:
Modulecmd startup Modulecmd startup
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Upon invocation :file:`modulecmd.tcl` sources a site-specific configuration Upon invocation :file:`modulecmd.tcl` sources a site-specific configuration
script if it exists. The location for this script is script if it exists. Siteconfig script is a Tcl script located at
|file etcdir_siteconfig|. An additional siteconfig script may be |file etcdir_siteconfig|. It enables to supersede any global variable or
specified with the :envvar:`MODULES_SITECONFIG` environment variable, if procedure definition of :file:`modulecmd.tcl`. See :ref:`Site-specific
allowed by :file:`modulecmd.tcl` configuration, and will be loaded if it configuration` for detailed information.
exists after |file etcdir_siteconfig|. Siteconfig is a Tcl script that enables
to supersede any global variable or procedure definition of
:file:`modulecmd.tcl`.
Afterward, :file:`modulecmd.tcl` sources rc files which contain global, Afterward, :file:`modulecmd.tcl` sources rc files which contain global,
user and *modulefile* specific setups. These files are interpreted as user and *modulefile* specific setups. These files are interpreted as
*modulefiles*. See :ref:`modulefile(4)` for detailed information. *modulefiles*. See :ref:`modulefile(4)` for detailed information.
Upon invocation of :file:`modulecmd.tcl` module run-command files are sourced Upon invocation of :file:`modulecmd.tcl` module run-command files are sourced
in the following order: in the following order:
1. Global RC file as specified by :envvar:`MODULERCFILE` variable or 1. Global RC file as specified by :envvar:`MODULERCFILE` variable or
|file etcdir_rc|. If :envvar:`MODULERCFILE` points to a directory, the |file etcdir_rc|. If :envvar:`MODULERCFILE` points to a directory, the
skipping to change at line 181 skipping to change at line 178
parameter. These may be used to control output format of all information parameter. These may be used to control output format of all information
displayed and the :command:`module` behavior in case of locating and displayed and the :command:`module` behavior in case of locating and
interpreting *modulefiles*. interpreting *modulefiles*.
All switches may be entered either in short or long notation. The following All switches may be entered either in short or long notation. The following
switches are accepted: switches are accepted:
.. option:: --all, -a .. option:: --all, -a
Include hidden modules in search performed with :subcmd:`avail`, Include hidden modules in search performed with :subcmd:`avail`,
:subcmd:`aliases`, :subcmd:`list`, :subcmd:`search` or :subcmd:`whatis` :subcmd:`aliases`, :subcmd:`list`, :subcmd:`lint`, :subcmd:`savelist`,
sub-commands. Hard-hidden modules are not affected by this option. :subcmd:`search` or :subcmd:`whatis` sub-commands. Hard-hidden modules are
not affected by this option.
.. only:: html .. only:: html
.. versionadded:: 4.6 .. versionadded:: 4.6
.. versionchanged:: 4.7
Support for :subcmd:`list` sub-command added
.. versionchanged:: 5.2
Support for :subcmd:`lint` and :subcmd:`savelist` sub-commands added
.. option:: --auto .. option:: --auto
On :subcmd:`load`, :subcmd:`unload` and :subcmd:`switch` sub-commands, enable Enable automated module handling mode on sub-commands that load or unload
automated module handling mode. See also :envvar:`MODULES_AUTO_HANDLING` modulefiles. See also :envvar:`MODULES_AUTO_HANDLING` section.
section.
.. only:: html .. only:: html
.. versionadded:: 4.2 .. versionadded:: 4.2
.. option:: --color=<WHEN> .. option:: --color=<WHEN>
Colorize the output. *WHEN* defaults to ``always`` or can be ``never`` or Colorize the output. *WHEN* defaults to ``always`` or can be ``never`` or
``auto``. See also :envvar:`MODULES_COLOR` section. ``auto``. See also :envvar:`MODULES_COLOR` section.
.. only:: html .. only:: html
.. versionadded:: 4.3 .. versionadded:: 4.3
.. option:: --contains, -C .. option:: --contains, -C
On :subcmd:`avail` and :subcmd:`list` sub-commands, return modules whose On :subcmd:`avail`, :subcmd:`list` and :subcmd:`savelist` sub-commands,
fully qualified name contains search query string. return modules or collections whose fully qualified name contains search
query string.
.. only:: html .. only:: html
.. versionadded:: 4.3 .. versionadded:: 4.3
.. versionchanged:: 5.1 .. versionchanged:: 5.1
Support for :subcmd:`list` sub-command added Support for :subcmd:`list` sub-command added
.. versionchanged:: 5.2
Support for :subcmd:`savelist` sub-command added
.. option:: --debug, -D, -DD .. option:: --debug, -D, -DD
Debug mode. Causes :command:`module` to print debugging messages about its Debug mode. Causes :command:`module` to print debugging messages about its
progress. Multiple :option:`-D` options increase the debug verbosity. The progress. Multiple :option:`-D` options increase the debug verbosity. The
maximum is 2. maximum is 2.
.. only:: html .. only:: html
.. versionadded:: 4.0 .. versionadded:: 4.0
skipping to change at line 247 skipping to change at line 254
:mconfig:`implicit_default` is enabled (see :ref:`Locating Modulefiles` :mconfig:`implicit_default` is enabled (see :ref:`Locating Modulefiles`
section in the :ref:`modulefile(4)` man page for further details on implicit section in the :ref:`modulefile(4)` man page for further details on implicit
default version). default version).
.. only:: html .. only:: html
.. versionadded:: 4.0 .. versionadded:: 4.0
.. option:: --force, -f .. option:: --force, -f
On :subcmd:`load`, :subcmd:`unload` and :subcmd:`switch` sub-commands, On :subcmd:`load`, :subcmd:`unload`, :subcmd:`switch`, :subcmd:`load-any`,
:subcmd:`try-load`, :subcmd:`mod-to-sh` and :subcmd:`source` sub-commands
by-pass any unsatisfied modulefile constraint corresponding to the declared by-pass any unsatisfied modulefile constraint corresponding to the declared
:mfcmd:`prereq` and :mfcmd:`conflict`. Which means for instance that a :mfcmd:`prereq` and :mfcmd:`conflict`. Which means for instance that a
*modulefile* will be loaded even if it comes in conflict with another loaded *modulefile* will be loaded even if it comes in conflict with another loaded
*modulefile* or that a *modulefile* will be unloaded even if it is required *modulefile* or that a *modulefile* will be unloaded even if it is required
as a prereq by another *modulefile*. as a prereq by another *modulefile*.
On :subcmd:`clear` sub-command, skip the confirmation dialog and proceed. On :subcmd:`clear` sub-command, skip the confirmation dialog and proceed.
On :subcmd:`purge` sub-command also unload `sticky modules`_ and modulefiles
that are depended by non-unloadable modules.
.. only:: html .. only:: html
.. versionadded:: 4.3 .. versionadded:: 4.3
:option:`--force`/:option:`-f` support was dropped on version `4.0` :option:`--force`/:option:`-f` support was dropped on version `4.0`
but reintroduced starting version `4.2` with a different meaning: but reintroduced starting version `4.2` with a different meaning:
instead of enabling an active dependency resolution mechanism instead of enabling an active dependency resolution mechanism
:option:`--force` command line switch now enables to by-pass dependency :option:`--force` command line switch now enables to by-pass dependency
consistency when loading or unloading a *modulefile*. consistency when loading or unloading a *modulefile*.
.. versionchanged:: 4.7
Support for :subcmd:`purge` sub-command added
.. versionchanged:: 4.8
Support for :subcmd:`try-load` sub-command added
.. versionchanged:: 5.1
Support for :subcmd:`load-any` sub-command added
.. versionchanged:: 5.2
Support for :subcmd:`mod-to-sh` sub-command added
.. option:: --help, -h .. option:: --help, -h
Give some helpful usage information, and terminates the command. Give some helpful usage information, and terminates the command.
.. option:: --icase, -i .. option:: --icase, -i
Match module specification arguments in a case insensitive manner. Match module specification arguments in a case insensitive manner.
.. only:: html .. only:: html
skipping to change at line 293 skipping to change at line 316
On :subcmd:`avail` sub-command, include in search results the matching On :subcmd:`avail` sub-command, include in search results the matching
modulefiles and directories and recursively the modulefiles and directories modulefiles and directories and recursively the modulefiles and directories
contained in these matching directories. contained in these matching directories.
.. only:: html .. only:: html
.. versionadded:: 4.3 .. versionadded:: 4.3
.. option:: --json, -j .. option:: --json, -j
Display :subcmd:`avail`, :subcmd:`list`, :subcmd:`savelist`, :subcmd:`whatis` Display :subcmd:`avail`, :subcmd:`list`, :subcmd:`savelist`,
and :subcmd:`search` output in JSON format. :subcmd:`stashlist`, :subcmd:`whatis` and :subcmd:`search` output in JSON
format.
.. only:: html .. only:: html
.. versionadded:: 4.5 .. versionadded:: 4.5
.. option:: --latest, -L .. option:: --latest, -L
On :subcmd:`avail` sub-command, display only the highest numerically sorted On :subcmd:`avail` sub-command, display only the highest numerically sorted
version of each module name (see :ref:`Locating Modulefiles` section in the version of each module name (see :ref:`Locating Modulefiles` section in the
:ref:`modulefile(4)` man page). :ref:`modulefile(4)` man page).
.. only:: html .. only:: html
.. versionadded:: 4.0 .. versionadded:: 4.0
.. option:: --long, -l .. option:: --long, -l
Display :subcmd:`avail`, :subcmd:`list` and :subcmd:`savelist` output in long Display :subcmd:`avail`, :subcmd:`list`, :subcmd:`savelist` and
format. :subcmd:`stashlist` output in long format.
.. option:: --no-auto .. option:: --no-auto
On :subcmd:`load`, :subcmd:`unload` and :subcmd:`switch` sub-commands, Disable automated module handling mode on sub-commands that load or unload
disable automated module handling mode. See also modulefiles. See also :envvar:`MODULES_AUTO_HANDLING` section.
:envvar:`MODULES_AUTO_HANDLING` section.
.. only:: html .. only:: html
.. versionadded:: 4.2 .. versionadded:: 4.2
.. option:: --no-indepth .. option:: --no-indepth
On :subcmd:`avail` sub-command, limit search results to the matching On :subcmd:`avail` sub-command, limit search results to the matching
modulefiles and directories found at the depth level expressed by the search modulefiles and directories found at the depth level expressed by the search
query. Thus modulefiles contained in directories part of the result are query. Thus modulefiles contained in directories part of the result are
skipping to change at line 410 skipping to change at line 433
output result is not affected by silent mode. output result is not affected by silent mode.
.. only:: html .. only:: html
.. versionadded:: 4.3 .. versionadded:: 4.3
:option:`--silent`/:option:`-s` support was dropped on version `4.0` :option:`--silent`/:option:`-s` support was dropped on version `4.0`
but reintroduced starting version `4.3`. but reintroduced starting version `4.3`.
.. option:: --starts-with, -S .. option:: --starts-with, -S
On :subcmd:`avail` and :subcmd:`list` sub-commands, return modules whose name On :subcmd:`avail`, :subcmd:`list` and :subcmd:`savelist` sub-commands,
starts with search query string. return modules or collections whose name starts with search query string.
.. only:: html .. only:: html
.. versionadded:: 4.3 .. versionadded:: 4.3
.. versionchanged:: 5.1 .. versionchanged:: 5.1
Support for :subcmd:`list` sub-command added Support for :subcmd:`list` sub-command added
.. versionchanged:: 5.2
Support for :subcmd:`savelist` sub-command added
.. option:: --tag=LIST .. option:: --tag=LIST
On :subcmd:`load`, :subcmd:`load-any`, :subcmd:`switch` and On :subcmd:`load`, :subcmd:`load-any`, :subcmd:`switch` and
:subcmd:`try-load` sub-commands, apply LIST of module tags to the loading :subcmd:`try-load` sub-commands, apply LIST of module tags to the loading
*modulefile*. *LIST* corresponds to the concatenation of multiple tags *modulefile*. *LIST* corresponds to the concatenation of multiple tags
separated by colon character (``:``). *LIST* should not contain tags separated by colon character (``:``). *LIST* should not contain tags
inherited from *modulefile* state or from other modulefile commands. If inherited from *modulefile* state or from other modulefile commands. If
module is already loaded, tags from *LIST* are added to the list of tags module is already loaded, tags from *LIST* are added to the list of tags
already applied to this module. already applied to this module.
.. only:: html .. only:: html
.. versionadded:: 5.1 .. versionadded:: 5.1
.. option:: --terse, -t .. option:: --terse, -t
Display :subcmd:`avail`, :subcmd:`list` and :subcmd:`savelist` output in Display :subcmd:`avail`, :subcmd:`list`, :subcmd:`savelist` and
short format. :subcmd:`stashlist` output in short format.
.. option:: --timer
Prints at the end of the output an evaluation of the total execution time of
the :command:`module` command. When mixed with a single or multiple
:option:`--debug` options, replaces regular debug messages by reports of the
execution time of every internal procedure calls.
.. only:: html
.. versionadded:: 5.2
.. option:: --trace, -T .. option:: --trace, -T
Trace mode. Report details on module searches, resolutions, selections and Trace mode. Report details on module searches, resolutions, selections and
evaluations in addition to printing verbose messages. evaluations in addition to printing verbose messages.
.. only:: html .. only:: html
.. versionadded:: 4.6 .. versionadded:: 4.6
skipping to change at line 802 skipping to change at line 839
variable is defined by :subcmd:`config` sub-command when changing this variable is defined by :subcmd:`config` sub-command when changing this
configuration option from its default value. See :envvar:`MODULES_EDITOR` configuration option from its default value. See :envvar:`MODULES_EDITOR`
description for details. description for details.
.. only:: html .. only:: html
.. versionadded:: 4.8 .. versionadded:: 4.8
.. mconfig:: extra_siteconfig .. mconfig:: extra_siteconfig
Additional site-specific configuration script location. Additional site-specific configuration script location. See
:ref:`Site-specific configuration` section for details.
This configuration option is unset by default. The This configuration option is unset by default. The
:envvar:`MODULES_SITECONFIG` environment variable is defined by :envvar:`MODULES_SITECONFIG` environment variable is defined by
:subcmd:`config` sub-command when changing this configuration option from :subcmd:`config` sub-command when changing this configuration option from
its default value. See :envvar:`MODULES_SITECONFIG` description for details. its default value. See :envvar:`MODULES_SITECONFIG` description for details.
.. mconfig:: home .. mconfig:: home
Location of Modules package main directory. Location of Modules package main directory.
skipping to change at line 988 skipping to change at line 1026
.. mconfig:: pager .. mconfig:: pager
Text viewer to paginate message output. Text viewer to paginate message output.
Default value is ``less -eFKRX``. It can be changed at installation time Default value is ``less -eFKRX``. It can be changed at installation time
with :instopt:`--with-pager` and :instopt:`--with-pager-opts` options. The with :instopt:`--with-pager` and :instopt:`--with-pager-opts` options. The
:envvar:`MODULES_PAGER` environment variable is defined by :subcmd:`config` :envvar:`MODULES_PAGER` environment variable is defined by :subcmd:`config`
sub-command when changing this configuration option from its default value. sub-command when changing this configuration option from its default value.
See :envvar:`MODULES_PAGER` description for details. See :envvar:`MODULES_PAGER` description for details.
.. mconfig:: protected_envvars
Prevents any modification of listed environment variables (colon `:`
separator).
This configuration option is unset by default. The
:envvar:`MODULES_PROTECTED_ENVVARS` environment variable is defined by
:subcmd:`config` sub-command when changing this configuration option from
its default value. See :envvar:`MODULES_PROTECTED_ENVVARS` description for
details.
.. only:: html
.. versionadded:: 5.2
.. mconfig:: quarantine_support .. mconfig:: quarantine_support
Defines if code for quarantine mechanism support should be generated in Defines if code for quarantine mechanism support should be generated in
:command:`module` shell function definition. :command:`module` shell function definition.
Default value is ``0``. It can be changed at installation time with Default value is ``0``. It can be changed at installation time with
:instopt:`--enable-quarantine-support` option. The :instopt:`--enable-quarantine-support` option. The
:envvar:`MODULES_QUARANTINE_SUPPORT` environment variable is defined by :envvar:`MODULES_QUARANTINE_SUPPORT` environment variable is defined by
:subcmd:`config` sub-command when changing this configuration option from :subcmd:`config` sub-command when changing this configuration option from
its default value. See :envvar:`MODULES_QUARANTINE_SUPPORT` description for its default value. See :envvar:`MODULES_QUARANTINE_SUPPORT` description for
skipping to change at line 1029 skipping to change at line 1082
variable is defined by :subcmd:`config` sub-command when changing this variable is defined by :subcmd:`config` sub-command when changing this
configuration option from its default value. The :option:`--redirect` and configuration option from its default value. The :option:`--redirect` and
:option:`--no-redirect` command line switches change the value of this :option:`--no-redirect` command line switches change the value of this
configuration option. See :envvar:`MODULES_REDIRECT_OUTPUT` description for configuration option. See :envvar:`MODULES_REDIRECT_OUTPUT` description for
details. details.
.. only:: html .. only:: html
.. versionadded:: 5.1 .. versionadded:: 5.1
.. mconfig:: reset_target_state
Control behavior of :subcmd:`reset` sub-command. Whether environment should
be purged (``__purge__``), initial environment (``__init__``) or a named
collection (any other value) should restored.
Default value is ``__init__``. The :envvar:`MODULES_RESET_TARGET_STATE`
environment variable is defined by :subcmd:`config` sub-command when
changing this configuration option from its default value. See
:envvar:`MODULES_RESET_TARGET_STATE` description for details.
.. only:: html
.. versionadded:: 5.2
.. mconfig:: run_quarantine .. mconfig:: run_quarantine
Environment variables to indirectly pass to :file:`modulecmd.tcl`. Environment variables to indirectly pass to :file:`modulecmd.tcl`.
This configuration option is set to an empty value by default. It can be This configuration option is set to an empty value by default. It can be
changed at installation time with :instopt:`--with-quarantine-vars` option changed at installation time with :instopt:`--with-quarantine-vars` option
that sets :envvar:`MODULES_RUN_QUARANTINE`. This environment variable is that sets :envvar:`MODULES_RUN_QUARANTINE`. This environment variable is
also defined by :subcmd:`config` sub-command when changing this also defined by :subcmd:`config` sub-command when changing this
configuration option. See :envvar:`MODULES_RUN_QUARANTINE` description for configuration option. See :envvar:`MODULES_RUN_QUARANTINE` description for
details. details.
skipping to change at line 1093 skipping to change at line 1161
Default value is ``0``. It can be changed at installation time with Default value is ``0``. It can be changed at installation time with
:instopt:`--enable-silent-shell-debug-support` option. The :instopt:`--enable-silent-shell-debug-support` option. The
:envvar:`MODULES_SILENT_SHELL_DEBUG` environment variable is defined by :envvar:`MODULES_SILENT_SHELL_DEBUG` environment variable is defined by
:subcmd:`config` sub-command when changing this configuration option from :subcmd:`config` sub-command when changing this configuration option from
its default value. See :envvar:`MODULES_SILENT_SHELL_DEBUG` description for its default value. See :envvar:`MODULES_SILENT_SHELL_DEBUG` description for
details. details.
.. mconfig:: siteconfig .. mconfig:: siteconfig
Primary site-specific configuration script location. Primary site-specific configuration script location. See
:ref:`Site-specific configuration` section for details.
Default value is |file etcdir_siteconfig|. It can be changed at installation Default value is |file etcdir_siteconfig|. It can be changed at installation
time with :instopt:`--prefix` or :instopt:`--etcdir` options. The value of time with :instopt:`--prefix` or :instopt:`--etcdir` options. The value of
this option cannot be altered. this option cannot be altered.
.. mconfig:: tag_abbrev .. mconfig:: tag_abbrev
Abbreviations to use to report module tags. Abbreviations to use to report module tags.
Default value is ``auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden= F:nearly-forbidden=nF:sticky=S:super-sticky=sS:keep-loaded=kL``. Default value is ``auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden= F:nearly-forbidden=nF:sticky=S:super-sticky=sS:keep-loaded=kL``.
skipping to change at line 1136 skipping to change at line 1205
.. versionadded:: 4.7 .. versionadded:: 4.7
.. mconfig:: tcl_ext_lib .. mconfig:: tcl_ext_lib
Modules Tcl extension library location. Modules Tcl extension library location.
Default value is |file libdir_tcl_ext_lib|. It can be changed at Default value is |file libdir_tcl_ext_lib|. It can be changed at
installation time with :instopt:`--prefix` or :instopt:`--libdir` options. installation time with :instopt:`--prefix` or :instopt:`--libdir` options.
The value of this option cannot be altered. The value of this option cannot be altered.
.. mconfig:: tcl_linter
Command to check syntax of modulefiles with through :subcmd:`lint`
sub-command.
Default value is ``nagelfar.tcl``. It can be changed at installation time
with :instopt:`--with-tcl-linter` and :instopt:`--with-tcl-linter-opts`
options. The :envvar:`MODULES_TCL_LINTER` environment variable is defined by
:subcmd:`config` sub-command when changing this configuration option from
its default value. See :envvar:`MODULES_TCL_LINTER` description for details.
.. only:: html
.. versionadded:: 5.2
.. mconfig:: term_background .. mconfig:: term_background
Terminal background color kind. Terminal background color kind.
Default value is ``dark``. It can be changed at installation time with Default value is ``dark``. It can be changed at installation time with
:instopt:`--with-terminal-background` option. The :instopt:`--with-terminal-background` option. The
:envvar:`MODULES_TERM_BACKGROUND` environment variable is defined by :envvar:`MODULES_TERM_BACKGROUND` environment variable is defined by
:subcmd:`config` sub-command when changing this configuration option from :subcmd:`config` sub-command when changing this configuration option from
its default value. See :envvar:`MODULES_TERM_BACKGROUND` description for its default value. See :envvar:`MODULES_TERM_BACKGROUND` description for
details. details.
skipping to change at line 1373 skipping to change at line 1457
:ref:`modulefile(4)` man page for further explanation. :ref:`modulefile(4)` man page for further explanation.
.. only:: html .. only:: html
.. versionadded:: 4.1 .. versionadded:: 4.1
.. subcmd:: keyword [-a] [-j] string .. subcmd:: keyword [-a] [-j] string
See :subcmd:`search`. See :subcmd:`search`.
.. subcmd:: lint [-a] [modulefile...]
Analyze syntax of one or more *modulefiles* with the linter command
designated by the :mconfig:`tcl_linter` configuration option.
The parameter *modulefile* may also be a symbolic modulefile name or a
modulefile alias. It may also leverage a specific syntax to finely select
module version (see `Advanced module version specifiers`_ section below).
If no *modulefile* is specified, all the *modulefiles* and modulerc
available in enabled modulepaths are analyzed as well as global and user rc
files. Hidden modulefiles are also analyzed when :option:`--all`/:option:`-a`
option is set.
When :command:`nagelfar.tcl` is the selected linter command, a static Tcl
syntax analysis is performed. In addition, syntax of modulefile commands are
checked in these files based on their kind (global/user rc, modulerc or
modulefile).
.. only:: html
.. versionadded:: 5.2
.. subcmd:: list [-t|-l|-j] [-a] [-o LIST] [-S|-C] [pattern...] .. subcmd:: list [-t|-l|-j] [-a] [-o LIST] [-S|-C] [pattern...]
List loaded modules. If a *pattern* is given, then the loaded modules are List loaded modules. If a *pattern* is given, then the loaded modules are
filtered to only list those whose name match this *pattern*. It may contain filtered to only list those whose name matches this *pattern*. It may contain
wildcard characters. *pattern* is matched in a case insensitive manner by wildcard characters. *pattern* is matched in a case insensitive manner by
default. If multiple *patterns* are given, loaded modules has to default. If multiple *patterns* are given, loaded module has to match at
match at least one of them to be listed. least one of them to be listed.
Module tags applying to the loaded modules are reported along the module name Module tags applying to the loaded modules are reported along the module name
they are associated to (see `Module tags`_ section). they are associated to (see `Module tags`_ section).
Module variants selected on the loaded modules are reported along the module Module variants selected on the loaded modules are reported along the module
name they belong to (see `Module variants`_ section). name they belong to (see `Module variants`_ section).
A *Key* section is added at the end of the output in case some elements are A *Key* section is added at the end of the output in case some elements are
reported in parentheses or chevrons along module name or if some graphical reported in parentheses or chevrons along module name or if some graphical
rendition is made over some output elements. This *Key* section gives hints rendition is made over some output elements. This *Key* section gives hints
skipping to change at line 1481 skipping to change at line 1588
module version (see `Advanced module version specifiers`_ section below). module version (see `Advanced module version specifiers`_ section below).
The :option:`--tag` option accepts a list of module tags to apply to The :option:`--tag` option accepts a list of module tags to apply to
*modulefile* once loaded. If module is already loaded, tags from *taglist* *modulefile* once loaded. If module is already loaded, tags from *taglist*
are added to the list of tags already applied to this module. are added to the list of tags already applied to this module.
.. only:: html .. only:: html
.. versionadded:: 5.1 .. versionadded:: 5.1
.. subcmd:: mod-to-sh [options] shell modulefile...
Evaluate *modulefile* and report resulting environment changes as code for
*shell*.
:subcmd:`mod-to-sh` command accepts the following options:
* ``--auto|--no-auto``
* ``-f|--force``
An attempt to load *modulefile* is made to get its environment changes. This
evaluation does not change the current shell environment. Like for
:subcmd:`load` sub-command, no evaluation occurs if *modulefile* is found
loaded in current environment.
Changes made on environment variable intended for Modules private use (e.g.,
:envvar:`LOADEDMODULES`, :envvar:`_LMFILES_`, ``__MODULES_*``) are ignored.
*Shell* could be any shell name supported by :file:`modulecmd.tcl`.
Produced *shell* code is returned on the message output channel by
:file:`modulecmd.tcl`. Thus it is not rendered in current environment by the
:command:`module` shell function.
:subcmd:`mod-to-sh` automatically set :mconfig:`verbosity` to the ``silent``
mode, to avoid messages to mix with the produced shell code. Verbosity is not
changed if set to the ``trace`` mode or any higher debugging level.
The parameter *modulefile* may also be a symbolic modulefile name or a
modulefile alias. It may also leverage a specific syntax to finely select
module version (see `Advanced module version specifiers`_ section below).
.. only:: html
.. versionadded:: 5.2
.. subcmd:: path modulefile .. subcmd:: path modulefile
Print path to *modulefile*. Print path to *modulefile*.
The parameter *modulefile* may also be a symbolic modulefile name or a The parameter *modulefile* may also be a symbolic modulefile name or a
modulefile alias. It may also leverage a specific syntax to finely select modulefile alias. It may also leverage a specific syntax to finely select
module version (see `Advanced module version specifiers`_ section below). module version (see `Advanced module version specifiers`_ section below).
.. only:: html .. only:: html
skipping to change at line 1528 skipping to change at line 1671
.. versionadded:: 4.1 .. versionadded:: 4.1
.. versionchanged:: 5.0 .. versionchanged:: 5.0
Reference counter environment variable is not updated anymore unless if Reference counter environment variable is not updated anymore unless if
the ``--duplicates`` option is set the ``--duplicates`` option is set
.. subcmd:: purge [-f] .. subcmd:: purge [-f]
Unload all loaded *modulefiles*. Unload all loaded *modulefiles*.
When the :option:`--force` option is set, also unload modulefiles that are When the :option:`--force` option is set, also unload `sticky modules`_ and
depended by unloadable modules. modulefiles that are depended by non-unloadable modules.
.. only:: html .. only:: html
.. versionchanged:: 4.7 .. versionchanged:: 4.7
Option :option:`--force`/:option:`-f` added Option :option:`--force`/:option:`-f` added
.. subcmd:: refresh .. subcmd:: refresh
Force a refresh of all non-persistent components of currently loaded modules. Force a refresh of all non-persistent components of currently loaded modules.
This should be used on derived shells where shell aliases or shell functions This should be used on derived shells where shell completions, shell aliases
need to be reinitialized but the environment variables have already been set or shell functions need to be reinitialized but the environment variables
by the currently loaded modules. have already been set by the currently loaded modules.
Loaded modules are evaluated in ``refresh`` mode following their load order. Loaded modules are evaluated in ``refresh`` mode following their load order.
In this evaluation mode only the :mfcmd:`set-alias` and :mfcmd:`set-function` In this evaluation mode only the :mfcmd:`complete`, :mfcmd:`set-alias` and
modulefile commands will produce environment changes. Other modulefile :mfcmd:`set-function` modulefile commands will produce environment changes.
commands that produce environment changes (like :mfcmd:`setenv` or Other modulefile commands that produce environment changes (like
:mfcmd:`append-path`) are ignored during a ``refresh`` evaluation as their :mfcmd:`setenv` or :mfcmd:`append-path`) are ignored during a ``refresh``
changes should already be applied. evaluation as their changes should already be applied.
Only the loaded modules defining non-persistent environment changes are
evaluated in ``refresh`` mode. Such loaded modules are listed in the
:envvar:`__MODULES_LMREFRESH` environment variable.
.. only:: html .. only:: html
.. versionchanged:: 4.0 .. versionchanged:: 4.0
Sub-command made as an alias of :subcmd:`reload` sub-command Sub-command made as an alias of :subcmd:`reload` sub-command
.. versionchanged:: 5.0 .. versionchanged:: 5.0
Behavior of version 3.2 :subcmd:`refresh` sub-command restored Behavior of version 3.2 :subcmd:`refresh` sub-command restored
.. versionchanged:: 5.2
Only evaluate modules listed in :envvar:`__MODULES_LMREFRESH`
.. subcmd:: reload .. subcmd:: reload
Unload then load all loaded *modulefiles*. Unload then load all loaded *modulefiles*.
No unload then load is performed and an error is returned if the loaded No unload then load is performed and an error is returned if the loaded
*modulefiles* have unsatisfied constraint corresponding to the *modulefiles* have unsatisfied constraint corresponding to the
:mfcmd:`prereq` and :mfcmd:`conflict` they declare. :mfcmd:`prereq` and :mfcmd:`conflict` they declare.
.. only:: html .. only:: html
skipping to change at line 1588 skipping to change at line 1738
environment *variable*, is ignored and *value* is removed whatever the environment *variable*, is ignored and *value* is removed whatever the
reference counter value set. reference counter value set.
.. only:: html .. only:: html
.. versionadded:: 4.1 .. versionadded:: 4.1
.. versionchanged:: 5.0 .. versionchanged:: 5.0
*value* is removed whatever its reference counter value *value* is removed whatever its reference counter value
.. subcmd:: reset
Restore initial environment, which corresponds to the loaded state after
:ref:`Modules initialization<Package Initialization>`.
:subcmd:`reset` sub-command restores the environment definition found in
:envvar:`__MODULES_LMINIT` environment variable.
:subcmd:`reset` behavior can be changed with :mconfig:`reset_target_state`.
This configuration option is set by default to ``__init__``, which
corresponds to the above behavior description. When set to ``__purge__``,
:subcmd:`reset` performs a :subcmd:`purge` of the environment. When set to
any other value, :subcmd:`reset` performs a :subcmd:`restore` of
corresponding name collection.
.. only:: html
.. versionadded:: 5.2
.. subcmd:: restore [collection] .. subcmd:: restore [collection]
Restore the environment state as defined in *collection*. If *collection* Restore the environment state as defined in *collection*. If *collection*
name is not specified, then it is assumed to be the *default* collection. If name is not specified, then it is assumed to be the *default* collection if
*collection* is a fully qualified path, it is restored from this location it exists, ``__init__`` special collection otherwise. If *collection* is a
rather than from a file under the user's collection directory. If fully qualified path, it is restored from this location rather than from a
file under the user's collection directory. If
:envvar:`MODULES_COLLECTION_TARGET` is set, a suffix equivalent to the value :envvar:`MODULES_COLLECTION_TARGET` is set, a suffix equivalent to the value
of this variable is appended to the *collection* file name to restore. of this variable is appended to the *collection* file name to restore.
If *collection* name is ``__init__``, initial environment state defined in
:envvar:`__MODULES_LMINIT` environment variable is restored.
When restoring a *collection*, the currently set :envvar:`MODULEPATH` When restoring a *collection*, the currently set :envvar:`MODULEPATH`
directory list and the currently loaded *modulefiles* are unused and directory list and the currently loaded *modulefiles* are unused and
unloaded then used and loaded to exactly match the :envvar:`MODULEPATH` and unloaded then used and loaded to exactly match the :envvar:`MODULEPATH` and
loaded *modulefiles* lists saved in this *collection* file. The order loaded *modulefiles* lists saved in this *collection* file. The order
of the paths and modulefiles set in *collection* is preserved when of the paths and modulefiles set in *collection* is preserved when
restoring. It means that currently loaded modules are unloaded to get restoring. It means that currently loaded modules are unloaded to get
the same :envvar:`LOADEDMODULES` root than collection and currently used the same :envvar:`LOADEDMODULES` root than collection and currently used
module paths are unused to get the same :envvar:`MODULEPATH` root. Then module paths are unused to get the same :envvar:`MODULEPATH` root. Then
missing module paths are used and missing modulefiles are loaded. missing module paths are used and missing modulefiles are loaded.
If a module, without a default version explicitly defined, is recorded in a If a module, without a default version explicitly defined, is recorded in a
*collection* by its bare name: loading this module when restoring the *collection* by its bare name: loading this module when restoring the
collection will fail if the configuration option :mconfig:`implicit_default` collection will fail if the configuration option :mconfig:`implicit_default`
is disabled. is disabled.
.. only:: html .. only:: html
.. versionadded:: 4.0 .. versionadded:: 4.0
.. versionchanged:: 5.2
Restore initial environment when *collection* name is ``__init__`` or
when no collection name is specified and no *default* collection exists
.. subcmd:: rm [--auto|--no-auto] [-f] modulefile... .. subcmd:: rm [--auto|--no-auto] [-f] modulefile...
See :subcmd:`unload`. See :subcmd:`unload`.
.. subcmd:: save [collection] .. subcmd:: save [collection]
Record the currently set :envvar:`MODULEPATH` directory list and the Record the currently set :envvar:`MODULEPATH` directory list and the
currently loaded *modulefiles* in a *collection* file under the user's currently loaded *modulefiles* in a *collection* file under the user's
collection directory :file:`$HOME/.module`. If *collection* name is not collection directory :file:`$HOME/.module`. If *collection* name is not
specified, then it is assumed to be the ``default`` collection. If specified, then it is assumed to be the ``default`` collection. If
skipping to change at line 1653 skipping to change at line 1830
in collection except ``nearly-forbidden`` tag. in collection except ``nearly-forbidden`` tag.
No *collection* is recorded and an error is returned if the loaded No *collection* is recorded and an error is returned if the loaded
*modulefiles* have unsatisfied constraint corresponding to the *modulefiles* have unsatisfied constraint corresponding to the
:mfcmd:`prereq` and :mfcmd:`conflict` they declare. :mfcmd:`prereq` and :mfcmd:`conflict` they declare.
.. only:: html .. only:: html
.. versionadded:: 4.0 .. versionadded:: 4.0
.. subcmd:: savelist [-t|-l|-j] .. subcmd:: savelist [-t|-l|-j] [-a] [-S|-C] [pattern...]
List collections that are currently saved under the user's collection List collections that are currently saved under the user's collection
directory. If :envvar:`MODULES_COLLECTION_TARGET` is set, only collections directory. If :envvar:`MODULES_COLLECTION_TARGET` is set, only collections
matching the target suffix will be displayed. matching the target suffix will be displayed unless if the
:option:`--all`/:option:`-a` option is set.
If a *pattern* is given, then the collections are filtered to only list
those whose name matches this *pattern*. It may contain wildcard characters.
*pattern* is matched in a case insensitive manner by default. If multiple
*patterns* are given, collection has to match at least one of them to be
listed.
Stash collections are not listed unless if the :option:`--all`/:option:`-a`
option is set. Stash collections can be listed with :subcmd:`stashlist`
sub-command.
.. only:: html .. only:: html
.. versionadded:: 4.0 .. versionadded:: 4.0
.. versionchanged:: 4.5 .. versionchanged:: 4.5
Option :option:`--json`/:option:`-j` added Option :option:`--json`/:option:`-j` added
.. versionchanged:: 5.2
*pattern* search to filter collections added
.. versionchanged:: 5.2
Options :option:`--starts-with`/:option:`-S`,
:option:`--contains`/:option:`-C` and :option:`--all`/:option:`-a`
added
.. subcmd:: saverm [collection] .. subcmd:: saverm [collection]
Delete the *collection* file under the user's collection directory. If Delete the *collection* file under the user's collection directory. If
*collection* name is not specified, then it is assumed to be the *default* *collection* name is not specified, then it is assumed to be the *default*
collection. If :envvar:`MODULES_COLLECTION_TARGET` is set, a suffix collection. If :envvar:`MODULES_COLLECTION_TARGET` is set, a suffix
equivalent to the value of this variable will be appended to the *collection* equivalent to the value of this variable will be appended to the *collection*
file name. file name.
.. only:: html .. only:: html
.. versionadded:: 4.0 .. versionadded:: 4.0
.. subcmd:: saveshow [collection] .. subcmd:: saveshow [collection]
Display the content of *collection*. If *collection* name is not specified, Display the content of *collection*. If *collection* name is not specified,
then it is assumed to be the *default* collection. If *collection* is a then it is assumed to be the *default* collection if it exists, ``__init__``
fully qualified path, this location is displayed rather than a collection special collection otherwise. If *collection* is a fully qualified path, this
file under the user's collection directory. If location is displayed rather than a collection file under the user's
:envvar:`MODULES_COLLECTION_TARGET` is set, a suffix equivalent to the value collection directory. If :envvar:`MODULES_COLLECTION_TARGET` is set, a suffix
of this variable will be appended to the *collection* file name. equivalent to the value of this variable will be appended to the *collection*
file name.
If *collection* name is ``__init__``, initial environment content defined in
:envvar:`__MODULES_LMINIT` environment variable is displayed.
.. only:: html .. only:: html
.. versionadded:: 4.0 .. versionadded:: 4.0
.. versionchanged:: 5.2
Display content of initial environment when *collection* name is
``__init__`` or when no collection name is specified and no *default*
collection exists
.. subcmd:: search [-a] [-j] string .. subcmd:: search [-a] [-j] string
Seeks through the :mfcmd:`module-whatis` information of all *modulefiles* Seeks through the :mfcmd:`module-whatis` information of all *modulefiles*
for the specified *string*. All *module-whatis* information matching the for the specified *string*. All *module-whatis* information matching the
*string* in a case insensitive manner will be displayed. *string* may contain *string* in a case insensitive manner will be displayed. *string* may contain
wildcard characters. wildcard characters.
.. only:: html .. only:: html
.. versionadded:: 4.0 .. versionadded:: 4.0
skipping to change at line 1743 skipping to change at line 1948
Changes on Modules private environment variable are ignored Changes on Modules private environment variable are ignored
.. versionchanged:: 5.1 .. versionchanged:: 5.1
Support for tracking shell completion changes on bash, tcsh and fish Support for tracking shell completion changes on bash, tcsh and fish
shells added shells added
.. subcmd:: show modulefile... .. subcmd:: show modulefile...
See :subcmd:`display`. See :subcmd:`display`.
.. subcmd:: source scriptfile... .. subcmd:: source [options] modulefile...
Execute *modulefile* into the shell environment. Once executed *modulefile*
is not marked loaded in shell environment which differ from :subcmd:`load`
sub-command.
:subcmd:`source` command accepts the following options:
* ``--auto|--no-auto``
* ``-f|--force``
Execute *scriptfile* into the shell environment. *scriptfile* must be written If *modulefile* corresponds to a fully qualified path, this file is executed.
with *modulefile* syntax and specified with a fully qualified path. Once Otherwise *modulefile* is searched among the available modulefiles.
executed *scriptfile* is not marked loaded in shell environment which differ
from :subcmd:`load` sub-command. The parameter *modulefile* may also be a symbolic modulefile name or a
modulefile alias. It may also leverage a specific syntax to finely select
module version (see `Advanced module version specifiers`_ section below).
.. only:: html .. only:: html
.. versionadded:: 4.0 .. versionadded:: 4.0
.. versionchanged:: 5.2
Accept modulefile specification as argument
.. subcmd:: stash
:subcmd:`Save<save>` current environment in a stash collection then
:subcmd:`reset` to initial environment.
A collection is created only if current environment state differs from
initial environment. Stash collection is named
*stash-<unix_millis_timestamp>* where *<unix_millis_timestamp>* is the number
of milliseconds between Unix Epoch and when this command is run.
If :envvar:`MODULES_COLLECTION_TARGET` is set, a suffix equivalent to the
value of this variable will be appended to the stash collection file name.
.. only:: html
.. versionadded:: 5.2
.. subcmd:: stashclear
Remove all stash collection files of current :mconfig:`collection_target`. If
no collection target is currently set, remove stash collection files without
a target suffix.
.. only:: html
.. versionadded:: 5.2
.. subcmd:: stashlist [-t|-l|-j]
List all stash collection files of current :mconfig:`collection_target`. If
no collection target is currently set, list stash collection files without a
target suffix.
.. only:: html
.. versionadded:: 5.2
.. subcmd:: stashpop [stash]
:subcmd:`Restore<restore>` *stash* collection then delete corresponding
collection file.
*stash* is either a full stash collection name (i.e.,
*stash-<unix_millis_timestamp>*) or a stash index. Most recent stash
collection has index *0*, *1* is the one before it. When no *stash* is given
the latest stash collection is assumed (that is stash index *0*).
If :envvar:`MODULES_COLLECTION_TARGET` is set, a suffix equivalent to the
value of this variable will be appended to the stash collection file name to
restore.
.. only:: html
.. versionadded:: 5.2
.. subcmd:: stashrm [stash]
:subcmd:`Remove<saverm>` *stash* collection file.
*stash* is either a full stash collection name (i.e.,
*stash-<unix_millis_timestamp>*) or a stash index. Most recent stash
collection has index *0*, *1* is the one before it. When no *stash* is given
the latest stash collection is assumed (that is stash index *0*).
If :envvar:`MODULES_COLLECTION_TARGET` is set, a suffix equivalent to the
value of this variable will be appended to the stash collection file name to
delete.
.. only:: html
.. versionadded:: 5.2
.. subcmd:: stashshow [stash]
:subcmd:`Display<saveshow>` the content of *stash* collection file.
*stash* is either a full stash collection name (i.e.,
*stash-<unix_millis_timestamp>*) or a stash index. Most recent stash
collection has index *0*, *1* is the one before it. When no *stash* is given
the latest stash collection is assumed (that is stash index *0*).
If :envvar:`MODULES_COLLECTION_TARGET` is set, a suffix equivalent to the
value of this variable will be appended to the stash collection file name to
display.
.. only:: html
.. versionadded:: 5.2
.. subcmd:: state [name] .. subcmd:: state [name]
Gets :file:`modulecmd.tcl` states. Reports the currently set value Gets :file:`modulecmd.tcl` states. Reports the currently set value
of passed state *name* or all existing states if no *name* passed. of passed state *name* or all existing states if no *name* passed.
.. only:: html .. only:: html
.. versionadded:: 5.1 .. versionadded:: 5.1
.. subcmd:: swap [options] [modulefile1] modulefile2 .. subcmd:: swap [options] [modulefile1] modulefile2
skipping to change at line 2160 skipping to change at line 2468
.. _Sticky modules: .. _Sticky modules:
Sticky modules Sticky modules
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
Modules are said *sticky* when they cannot be unloaded (they stick to the Modules are said *sticky* when they cannot be unloaded (they stick to the
loaded environment). Two kind of stickiness can be distinguished: loaded environment). Two kind of stickiness can be distinguished:
* ``sticky`` module: cannot be unloaded unless if the unload is forced or if * ``sticky`` module: cannot be unloaded unless if the unload is forced or if
the module is reloaded after being unloaded the module is reloaded after being unloaded or if restoring a collection.
* ``super-sticky`` module: cannot be unloaded unless if the module is reloaded * ``super-sticky`` module: cannot be unloaded unless if the module is reloaded
after being unloaded; super-sticky modules cannot be unloaded even if the after being unloaded; super-sticky modules cannot be unloaded even if the
unload is forced. unload is forced.
Modules are designated sticky by associating them the ``sticky`` or the Modules are designated sticky by associating them the ``sticky`` or the
``super-sticky`` :ref:`module tag<Module tags>` with the :mfcmd:`module-tag` ``super-sticky`` :ref:`module tag<Module tags>` with the :mfcmd:`module-tag`
modulefile command. modulefile command.
When stickiness is defined over the generic module name (and not over a When stickiness is defined over the generic module name (and not over a
specific module version, a version list or a version range), sticky or specific module version, a version list or a version range), sticky or
super-sticky module can be swapped by another version of module. For instance super-sticky module can be swapped by another version of module. For instance
if the ``sticky`` tag is defined over *foo* module, loaded module *foo/1.2* if the ``sticky`` tag is defined over *foo* module, loaded module *foo/1.2*
can be swapped by *foo/2.0*. Such stickiness definition means one version of can be swapped by *foo/2.0*. Such stickiness definition means one version of
module should stay loaded whatever version it is. module should stay loaded whatever version it is.
When restoring a :ref:`collection<Collections>` or resetting to the initial
environment, sticky modules are unloaded to ensure :subcmd:`restore` or
:subcmd:`reset` sub-commands fully set the environment in target collection or
initial state. Super-sticky modules still cannot be unloaded with
:subcmd:`restore` and :subcmd:`reset` sub-commands.
.. only:: html .. only:: html
.. versionadded:: 4.7 .. versionadded:: 4.7
.. versionchanged:: 5.2
Unload sticky modules when restoring a collection or resetting to the
initial environment
.. _Module variants: .. _Module variants:
Module variants Module variants
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
Module variants are alternative evaluation of the same *modulefile*. A variant Module variants are alternative evaluation of the same *modulefile*. A variant
is specified by associating a value to its name when designating module. is specified by associating a value to its name when designating module.
Variant specification relies on the :ref:`Advanced module version specifiers` Variant specification relies on the :ref:`Advanced module version specifiers`
mechanism. mechanism.
skipping to change at line 2243 skipping to change at line 2561
.. versionadded:: 4.8 .. versionadded:: 4.8
.. _collections: .. _collections:
Collections Collections
^^^^^^^^^^^ ^^^^^^^^^^^
Collections describe a sequence of :subcmd:`module use<use>` then Collections describe a sequence of :subcmd:`module use<use>` then
:subcmd:`module load<load>` commands that are interpreted by :subcmd:`module load<load>` commands that are interpreted by
:file:`modulecmd.tcl` to set the user environment as described by this :file:`modulecmd.tcl` to set the user environment as described by this
sequence. When a collection is activated, with the :subcmd:`restore` sequence.
sub-command, module paths and loaded modules are unused or unloaded if they
are not part or if they are not ordered the same way as in the collection.
Collections are generated by the :subcmd:`save` sub-command that dumps the Collections are generated by the :subcmd:`save` sub-command that dumps the
current user environment state in terms of module paths and loaded modules. By current user environment state in terms of module paths and loaded modules. By
default collections are saved under the :file:`$HOME/.module` directory. default collections are saved under the :file:`$HOME/.module` directory.
Collections may be valid for a given target if they are suffixed. In this .. parsed-literal::
case these collections can only be restored if their suffix correspond to
the current value of the :envvar:`MODULES_COLLECTION_TARGET` environment :ps:`$` module list
variable (see the dedicated section of this topic below). Currently Loaded Modulefiles:
1) foo/1.2 2) bar/2.0 3) qux/3.5
:ps:`$` module save foo
:ps:`$` cat $HOME/.module/foo
module use --append /path/to/modulefiles
module load foo
module load bar/2.0
module load qux/3.5
The content of a collection can also be displayed with the :subcmd:`saveshow`
sub-command. Note that in the above example, bare module name is recorded for
``foo`` modulefile as loaded version is the implicit default. Loaded version
recording can be enforced by enabling :mconfig:`collection_pin_version`
configuration option.
.. parsed-literal::
:ps:`$` module config collection_pin_version 1
:ps:`$` module save foo
:ps:`$` module saveshow foo
-------------------------------------------------------------------
:sgrhi:`/home/user/.module/foo`:
:sgrcm:`module` use --append /path/to/modulefiles
:sgrcm:`module` load foo/1.2
:sgrcm:`module` load bar/2.0
:sgrcm:`module` load qux/3.5
-------------------------------------------------------------------
When a collection is activated, with the :subcmd:`restore`
sub-command, module paths and loaded modules are unused or unloaded if they
are not part or if they are not ordered the same way as in the collection.
.. parsed-literal::
:ps:`$` module list
Currently Loaded Modulefiles:
1) foo/1.2 2) bar/2.1 3) qux/3.5
:ps:`$` module restore foo
Unloading :sgrhi:`qux/3.5`
Unloading :sgrhi:`bar/2.1`
Loading :sgrhi:`bar/2.0`
Loading :sgrhi:`qux/3.5`
:ps:`$` module list
Currently Loaded Modulefiles:
1) foo/1.2 2) bar/2.0 3) qux/3.5
In the above example, second and third module loaded are changed. First loaded
module is not changed or reloaded as it is the same module between current
environment and collection. As second loaded module was different, this module
and all those loaded afterward are unloaded to then load the sequence
described by collection. As a result, third loaded module is reloaded, even if
is was the same module between current environment and collection.
Existing collections can be listed with :subcmd:`savelist` sub-command. They
can be deleted with :subcmd:`saverm` sub-command.
.. parsed-literal::
:ps:`$` module savelist
Named collection list:
1) default 2) foo
:ps:`$` module saverm default
:ps:`$` module savelist
Named collection list:
1) foo
When no argument is provided to :subcmd:`save`, :subcmd:`restore`,
:subcmd:`saveshow` or :subcmd:`saverm` sub-commands, the ``default``
collection is assumed.
Collection can also be specified as a full pathname:
.. parsed-literal::
:ps:`$` module save /path/to/collections/bar
:ps:`$` module saveshow /path/to/collections/bar
-------------------------------------------------------------------
:sgrhi:`/path/to/collections/bar`:
:sgrcm:`module` use --append /path/to/modulefiles
:sgrcm:`module` load foo/1.2
:sgrcm:`module` load bar/2.0
:sgrcm:`module` load qux/3.5
-------------------------------------------------------------------
Initial environment
"""""""""""""""""""
Initial environment state, which corresponds to modulepaths enabled and
modules loaded during :ref:`Modules initialization<Package Initialization>`,
is referred as the ``__init__`` collection. This collection is virtual as
its content is stored in the :envvar:`__MODULES_LMINIT` and not in a file. It
can be displayed with :subcmd:`saveshow` and restored with :subcmd:`restore`
sub-command.
.. parsed-literal::
:ps:`$` module saveshow __init__
-------------------------------------------------------------------
:sgrhi:`initial environment`:
:sgrcm:`module` use --append /path/to/modulefiles
:sgrcm:`module` load foo/1.2
-------------------------------------------------------------------
If the ``default`` collection does not exist, :subcmd:`saveshow` and
:subcmd:`restore` sub-commands assume ``__init__`` collection when no argument
provided to them.
.. parsed-literal::
:ps:`$` module list
Currently Loaded Modulefiles:
1) foo/1.2 2) bar/2.1 3) qux/3.5
:ps:`$` module savelist
Named collection list:
1) foo
:ps:`$` module restore
Unloading :sgrhi:`qux/3.5`
Unloading :sgrhi:`bar/2.1`
Initial environment state can also be restored with the :subcmd:`reset`
sub-command. This sub-command behavior can be changed with
:mconfig:`reset_target_state` configuration option to choose to just purge
loaded modules or to restore a specific collection.
Collection targets
""""""""""""""""""
A collection target can be defined for current environment session with the
:mconfig:`collection_target` configuration option. When set, available
collections are reduced to those suffixed with target name. Which means
:subcmd:`restore`, :subcmd:`saveshow`, :subcmd:`savelist` and :subcmd:`saverm`
only find collections matching currently set target.
.. parsed-literal::
:ps:`$` module savelist
Named collection list:
1) foo
:ps:`$` module config collection_target mytarget
:ps:`$` module savelist
No named collection (for target "mytarget").
:ps:`$` module restore foo
:sgrer:`ERROR`: Collection foo (for target "mytarget") cannot be found
When saving a new collection, generated file is suffixed with currently set
target name.
.. parsed-literal::
:ps:`$` module save bar
:ps:`$` module savelist
Named collection list (for target "mytarget"):
1) bar
:ps:`$` ls $HOME/.module
bar.mytarget foo
Collection targets help to distinguish contexts and make collection reachable
only from the context they have been made for. For instance the same user
account may be used to access different OSes or machine architectures. With a
target set, users are ensured to only access collections built for the context
they are currently connected to. See also :envvar:`MODULES_COLLECTION_TARGET`
section.
Stash collections
"""""""""""""""""
Current user environment can be stashed with :subcmd:`stash` sub-command. When
this sub-command is called, current module environment is saved in a stash
collection then `initial environment`_ is restored.
.. parsed-literal::
:ps:`$` module list
Currently Loaded Modulefiles:
1) foo/1.2 2) qux/4.2
:ps:`$` module stash
Unloading :sgrhi:`qux/4.2`
Specific sub-commands are available to handle stash collections:
:subcmd:`stashpop`, :subcmd:`stashlist`, :subcmd:`stashshow`,
:subcmd:`stashrm` and :subcmd:`stashclear`. A stash collection is restored
with :subcmd:`stashpop` which also deletes the collection once restored.
.. parsed-literal::
:ps:`$` module stashlist
Stash collection list (for target "mytarget"):
0) stash-1667669750191
:ps:`$` module stashpop
Loading :sgrhi:`qux/4.2`
:ps:`$` module stashlist
No stash collection (for target "mytarget").
Stash collections have same format and are saved in the same location than
other collections. Collection target also applies to stash collection.
Creation timestamp is saved in stash collection name.
Stash collection can be designated by their full collection name (i.e.,
*stash-<creation_timestamp>*) or a stash index. Most recent stash
collection has index *0*, *1* is the one before it. When no argument is
provided on stash sub-commands, the latest stash collection is assumed (that
is stash index *0*).
.. parsed-literal::
:ps:`$` module stashlist
Stash collection list (for target "mytarget"):
0) stash-1667669750783 1) stash-1667669750253
:ps:`$` module stashshow 1
-------------------------------------------------------------------
:sgrhi:`/home/user/.module/stash-1667669750253.mytarget:`
:sgrcm:`module` use --append /path/to/modulefiles
:sgrcm:`module` load foo/1.2
:sgrcm:`module` load bar/2.0
-------------------------------------------------------------------
.. only:: html .. only:: html
.. versionadded:: 4.0 .. versionadded:: 4.0
.. versionchanged:: 5.2
Initial environment state introduced
.. versionchanged:: 5.2
Stash collection introduced
.. _Site-specific configuration:
Site-specific configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Siteconfig, the site-specific configuration script, is a way to extend
:file:`modulecmd.tcl`. Siteconfig is a Tcl script. Its location is
|file etcdir_siteconfig|.
When :file:`modulecmd.tcl` is invoked it sources siteconfig script if it
exists. Any global variable or procedure of :file:`modulecmd.tcl` can be
redefined in siteconfig.
An additional siteconfig script may be specified through the
:mconfig:`extra_siteconfig` configuration option. The
:envvar:`MODULES_SITECONFIG` environment variable is defined by
:subcmd:`config` sub-command when setting :mconfig:`extra_siteconfig`. If it
exists the extra siteconfig is sourced by :file:`modulecmd.tcl` right after
main siteconfig script.
Hooks
"""""
Siteconfig relies on the ability of the Tcl language to overwrite previously
defined variables and procedures. Sites may deploy their own Tcl code in
siteconfig to adapt :file:`modulecmd.tcl` to their specific needs. The
``trace`` Tcl command may especially be used to define hooks that are run when
entering or leaving a given procedure, or when a variable is read or written.
See :manpage:`trace(n)` man page for detailed information. The following
example setup a procedure that is executed before each modulefile evaluation:
.. code-block:: tcl
proc beforeEval {cmdstring code result op} {
# code to run right before each modulefile evaluation
}
trace add execution execute-modulefile enter beforeEval
Another possibility is to override the definition of an existing procedure by
first renaming its original version then creating a new procedure that will add
specific code and rely on the renamed original procedure for the rest. See
:manpage:`rename(n)` man page for details. As an example, the following code
adds a new query option to the :mfcmd:`module-info` modulefile command:
.. code-block:: tcl
rename module-info __module-info
proc module-info {what {more {}}} {
switch -- $what {
platform { return myhost-$::tcl_platform(machine) }
default { return [__module-info $what $more] }
}
}
Siteconfig hook variables
"""""""""""""""""""""""""
Some Tcl variables can be defined in siteconfig script with special hook
meaning. The following variables are recognized:
.. sitevar:: modulefile_extra_vars
List of variable names and associated values to setup in modulefile
evaluation context. These variables can be accessed when modulefile is
executed. In case code in a modulefile changes the value of such variable,
its value is reset to the one defined in :sitevar:`modulefile_extra_vars`
prior the evaluation of the next modulefile.
.. code-block:: tcl
set modulefile_extra_vars {myvar 1 othervar {some text}}
In the above siteconfig example, :sitevar:`modulefile_extra_vars` sets the
``myvar`` and ``othervar`` variables in the modulefile evaluation context
with respectively ``1`` and ``some text`` as value.
.. only:: html
.. versionadded:: 5.2
.. sitevar:: modulefile_extra_cmds
List of command and associated local procedure to setup in modulefile
evaluation context. These commands can be called from the modulefile to
execute associated procedure. In case a modulefile changes the definition
of such command, its definition is bound again on the procedure defined in
:sitevar:`modulefile_extra_cmds` prior the evaluation of the next modulefile.
.. code-block:: tcl
proc mycmd {} {
# Tcl code
}
proc anotherproc {args} {
# Tcl code
}
set modulefile_extra_cmds {mycmd mycmd othercmd anotherproc}
In the above siteconfig example, :sitevar:`modulefile_extra_cmds` sets the
``mycmd`` and ``othercmd`` commands in the modulefile evaluation context and
bind them respectively to the ``mycmd`` and ``anotherproc`` procedures
defined in siteconfig script.
.. only:: html
.. versionadded:: 5.2
.. sitevar:: modulerc_extra_vars
List of variable names and associated values to setup in modulerc evaluation
context. These variables can be accessed when modulerc is executed. In case
code in a modulerc changes the value of such variable, its value
is reset to the one defined in :sitevar:`modulerc_extra_vars` prior the
evaluation of the next modulerc.
.. code-block:: tcl
set modulerc_extra_vars {myvar 1 othervar {some text}}
In the above siteconfig example, :sitevar:`modulerc_extra_vars` sets the
``myvar`` and ``othervar`` variables in the modulerc evaluation context with
respectively ``1`` and ``some text`` as value.
.. only:: html
.. versionadded:: 5.2
.. sitevar:: modulerc_extra_cmds
List of command and associated local procedure to setup in modulerc
evaluation context. These commands can be called from the modulerc to execute
associated procedure. In case a modulerc changes the definition of such
command, its definition is bound again on the procedure defined in
:sitevar:`modulerc_extra_cmds` prior the evaluation of the next modulerc.
.. code-block:: tcl
proc mycmd {} {
# Tcl code
}
proc anotherproc {args} {
# Tcl code
}
set modulerc_extra_cmds {mycmd mycmd othercmd anotherproc}
In the above siteconfig example, :sitevar:`modulerc_extra_cmds` sets the
``mycmd`` and ``othercmd`` commands in the modulerc evaluation context and
bind them respectively to the ``mycmd`` and ``anotherproc`` procedures
defined in siteconfig script.
.. only:: html
.. versionadded:: 5.2
.. only:: html
.. versionadded:: 4.1
.. versionchanged:: 4.3
Additional site-specific configuration script introduced
EXIT STATUS EXIT STATUS
----------- -----------
The :command:`module` command exits with ``0`` if its execution succeed. The :command:`module` command exits with ``0`` if its execution succeed.
Otherwise ``1`` is returned. Otherwise ``1`` is returned.
.. _module ENVIRONMENT: .. _module ENVIRONMENT:
ENVIRONMENT ENVIRONMENT
----------- -----------
skipping to change at line 2337 skipping to change at line 3042
for load afterward. for load afterward.
.. only:: html .. only:: html
.. versionadded:: 4.2 .. versionadded:: 4.2
.. versionchanged:: 5.0 .. versionchanged:: 5.0
Variable renamed from ``MODULES_LMCONFLICT`` to Variable renamed from ``MODULES_LMCONFLICT`` to
``__MODULES_LMCONFLICT`` ``__MODULES_LMCONFLICT``
.. envvar:: __MODULES_LMINIT
A colon separated list describing the modulepaths that have been enabled and
the *modulefiles* that have been loaded with their tags during :ref:`Modules
initialization<Package Initialization>`. Each element in this list
corresponds to a :ref:`collection<collections>` definition line.
This environment variable is intended for :command:`module` command internal
use to get knowledge of the initial loaded state after initialization.
This initial environment state can then be restored with :subcmd:`reset`
sub-command. It can also be restored with :subcmd:`restore` sub-command when
``__init__`` collection name is specified or when no collection name is
specified and no *default* collection exists.
The content of the initial environment can be displayed with
:subcmd:`saveshow` sub-command when ``__init__`` collection name is specified
or when no collection name is specified and no *default* collection exists.
.. only:: html
.. versionadded:: 5.2
.. envvar:: __MODULES_LMPREREQ .. envvar:: __MODULES_LMPREREQ
A colon separated list of the :mfcmd:`prereq` statements defined by all A colon separated list of the :mfcmd:`prereq` statements defined by all
loaded *modulefiles*. Each element in this list starts by the name of the loaded *modulefiles*. Each element in this list starts by the name of the
loaded *modulefile* declaring the pre-requirement followed by the name of all loaded *modulefile* declaring the pre-requirement followed by the name of all
modulefiles it declares a :mfcmd:`prereq` with. These loaded modulefiles and modulefiles it declares a :mfcmd:`prereq` with. These loaded modulefiles and
pre-required modulefile names are separated by the ampersand character. When pre-required modulefile names are separated by the ampersand character. When
a :mfcmd:`prereq` statement is composed of multiple modulefiles, these a :mfcmd:`prereq` statement is composed of multiple modulefiles, these
modulefile names are separated by the pipe character. modulefile names are separated by the pipe character.
skipping to change at line 2359 skipping to change at line 3087
*modulefiles* in order to keep environment consistent when a pre-required *modulefiles* in order to keep environment consistent when a pre-required
module is asked for unload afterward. module is asked for unload afterward.
.. only:: html .. only:: html
.. versionadded:: 4.2 .. versionadded:: 4.2
.. versionchanged:: 5.0 .. versionchanged:: 5.0
Variable renamed from ``MODULES_LMPREREQ`` to ``__MODULES_LMPREREQ`` Variable renamed from ``MODULES_LMPREREQ`` to ``__MODULES_LMPREREQ``
.. envvar:: __MODULES_LMREFRESH
A colon separated list of the loaded modules that are qualified for refresh
evaluation. Loaded modules listed in this variable are those defining
volatile environment changes like shell completion, alias and function.
.. only:: html
.. versionadded:: 5.2
.. envvar:: __MODULES_LMSOURCESH .. envvar:: __MODULES_LMSOURCESH
A colon separated list of the :mfcmd:`source-sh` statements defined by all A colon separated list of the :mfcmd:`source-sh` statements defined by all
loaded *modulefiles*. Each element in this list starts by the name of the loaded *modulefiles*. Each element in this list starts by the name of the
loaded *modulefile* declaring the environment changes made by the evaluation loaded *modulefile* declaring the environment changes made by the evaluation
of :mfcmd:`source-sh` scripts. This name is followed by each of :mfcmd:`source-sh` scripts. This name is followed by each
:mfcmd:`source-sh` statement call and corresponding result achieved in :mfcmd:`source-sh` statement call and corresponding result achieved in
modulefile. The loaded modulefile name and each :mfcmd:`source-sh` statement modulefile. The loaded modulefile name and each :mfcmd:`source-sh` statement
description are separated by the ampersand character. The :mfcmd:`source-sh` description are separated by the ampersand character. The :mfcmd:`source-sh`
statement call and each resulting modulefile command (corresponding to the statement call and each resulting modulefile command (corresponding to the
skipping to change at line 2772 skipping to change at line 3510
The collection target that determines what collections are valid thus The collection target that determines what collections are valid thus
reachable on the current system. reachable on the current system.
Collection directory may sometimes be shared on multiple machines which may Collection directory may sometimes be shared on multiple machines which may
use different modules setup. For instance modules users may access with the use different modules setup. For instance modules users may access with the
same :envvar:`HOME` directory multiple systems using different OS versions. same :envvar:`HOME` directory multiple systems using different OS versions.
When it happens a collection made on machine 1 may be erroneous on machine 2. When it happens a collection made on machine 1 may be erroneous on machine 2.
When a target is set, only the collections made for that target are When a target is set, only the collections made for that target are
available to the :subcmd:`restore`, :subcmd:`savelist`, :subcmd:`saveshow` available to the :subcmd:`restore`, :subcmd:`savelist`, :subcmd:`saveshow`,
and :subcmd:`saverm` sub-commands. Saving a collection registers the target :subcmd:`saverm`, :subcmd:`stash`, :subcmd:`stashpop`, :subcmd:`stashlist`,
footprint by suffixing the collection filename with :subcmd:`stashshow`, and :subcmd:`stashrm` sub-commands. Saving a collection
registers the target footprint by suffixing the collection filename with
``.$MODULES_COLLECTION_TARGET``. The collection target is not involved when ``.$MODULES_COLLECTION_TARGET``. The collection target is not involved when
collection is specified as file path on the :subcmd:`saveshow`, collection is specified as file path on the :subcmd:`saveshow`,
:subcmd:`restore` and :subcmd:`save` sub-commands. :subcmd:`restore` and :subcmd:`save` sub-commands.
For example, the :envvar:`MODULES_COLLECTION_TARGET` variable may be set with For example, the :envvar:`MODULES_COLLECTION_TARGET` variable may be set with
results from commands like :command:`lsb_release`, :command:`hostname`, results from commands like :command:`lsb_release`, :command:`hostname`,
:command:`dnsdomainname`, etc. :command:`dnsdomainname`, etc.
This environment variable value supersedes the default value set in the This environment variable value supersedes the default value set in the
:mconfig:`collection_target` configuration option. It can be defined with :mconfig:`collection_target` configuration option. It can be defined with
skipping to change at line 2942 skipping to change at line 3681
.. only:: html .. only:: html
.. versionadded:: 5.1 .. versionadded:: 5.1
.. envvar:: MODULES_ICASE .. envvar:: MODULES_ICASE
When module specification are passed as argument to module sub-commands or When module specification are passed as argument to module sub-commands or
modulefile Tcl commands, defines the case sensitiveness to apply to match modulefile Tcl commands, defines the case sensitiveness to apply to match
them. When :envvar:`MODULES_ICASE` is set to ``never``, a case sensitive them. When :envvar:`MODULES_ICASE` is set to ``never``, a case sensitive
match is applied in any cases. When set to ``search``, a case insensitive match is applied in any cases. When set to ``search``, a case insensitive
match is applied to the :subcmd:`avail`, :subcmd:`list`, :subcmd:`whatis` and match is applied to the :subcmd:`avail`, :subcmd:`list`, :subcmd:`whatis`,
:subcmd:`paths` sub-commands. When set to ``always``, a case insensitive :subcmd:`paths` and :subcmd:`savelist` sub-commands. When set to ``always``,
match is also applied to the other module sub-commands and modulefile Tcl a case insensitive match is also applied to the other module sub-commands
commands for the module specification they receive as argument. and modulefile Tcl commands for the module specification they receive as
argument.
This environment variable value supersedes the default value set in the This environment variable value supersedes the default value set in the
:mconfig:`icase` configuration option. It can be defined with the :mconfig:`icase` configuration option. It can be defined with the
:subcmd:`config` sub-command. The :option:`--icase`/:option:`-i` command line :subcmd:`config` sub-command. The :option:`--icase`/:option:`-i` command line
switches, which correspond to the ``always`` mode, override this environment switches, which correspond to the ``always`` mode, override this environment
variable. variable.
.. only:: html .. only:: html
.. versionadded:: 4.4 .. versionadded:: 4.4
.. versionchanged:: 5.1 .. versionchanged:: 5.1
Search mode applied to :subcmd:`list` sub-command Search mode applied to :subcmd:`list` sub-command
.. versionchanged:: 5.2
Search mode applied to :subcmd:`savelist` sub-command
.. envvar:: MODULES_IMPLICIT_DEFAULT .. envvar:: MODULES_IMPLICIT_DEFAULT
Defines (if set to ``1``) or not (if set to ``0``) an implicit default Defines (if set to ``1``) or not (if set to ``0``) an implicit default
version for modules without a default version explicitly defined (see version for modules without a default version explicitly defined (see
:ref:`Locating Modulefiles` section in the :ref:`modulefile(4)` man page). :ref:`Locating Modulefiles` section in the :ref:`modulefile(4)` man page).
Without either an explicit or implicit default version defined a module must Without either an explicit or implicit default version defined a module must
be fully qualified (version should be specified in addition to its name) to be fully qualified (version should be specified in addition to its name) to
get: get:
skipping to change at line 3152 skipping to change at line 3895
:mconfig:`pager` configuration option. It can be defined with the :mconfig:`pager` configuration option. It can be defined with the
:subcmd:`config` sub-command. :subcmd:`config` sub-command.
If :envvar:`MODULES_PAGER` variable is set to an empty string or to the value If :envvar:`MODULES_PAGER` variable is set to an empty string or to the value
``cat``, pager will not be launched. ``cat``, pager will not be launched.
.. only:: html .. only:: html
.. versionadded:: 4.1 .. versionadded:: 4.1
.. envvar:: MODULES_PROTECTED_ENVVARS
A colon separated list of environment variable names that should not be
modified by any modulefile command.
Prevents modifications by :mfcmd:`append-path`, :mfcmd:`prepend-path`,
:mfcmd:`remove-path`, :mfcmd:`setenv` and :mfcmd:`unsetenv`. When these
modulefile commands attempt to modify a protected environment variable,
a warning message is emitted and modification is ignored.
This environment variable value supersedes the default value set in the
:mconfig:`protected_envvars` configuration option. It can be defined with the
:subcmd:`config` sub-command.
.. only:: html
.. versionadded:: 5.2
.. envvar:: MODULES_QUARANTINE_SUPPORT .. envvar:: MODULES_QUARANTINE_SUPPORT
If set to ``1``, produces the shell code for quarantine mechanism when the If set to ``1``, produces the shell code for quarantine mechanism when the
:subcmd:`autoinit` sub-command generates the :command:`module` shell :subcmd:`autoinit` sub-command generates the :command:`module` shell
function. function.
The generated shell code for quarantine mechanism indirectly passes the The generated shell code for quarantine mechanism indirectly passes the
environment variable defined in :envvar:`MODULES_RUN_QUARANTINE` to the environment variable defined in :envvar:`MODULES_RUN_QUARANTINE` to the
:file:`modulecmd.tcl` script to protect its run-time environment from :file:`modulecmd.tcl` script to protect its run-time environment from
side-effect coming from the current definition of these variables. side-effect coming from the current definition of these variables.
skipping to change at line 3196 skipping to change at line 3957
This environment variable value supersedes the default value set in the This environment variable value supersedes the default value set in the
:mconfig:`redirect_output` configuration option. It can be defined with :mconfig:`redirect_output` configuration option. It can be defined with
the :subcmd:`config` sub-command. The :option:`--redirect` and the :subcmd:`config` sub-command. The :option:`--redirect` and
:option:`--no-redirect` command line switches override this environment :option:`--no-redirect` command line switches override this environment
variable. variable.
.. only:: html .. only:: html
.. versionadded:: 5.1 .. versionadded:: 5.1
.. envvar:: MODULES_RESET_TARGET_STATE
Defines behavior of :subcmd:`reset` sub-command. When set to ``__init__``,
initial environment is restored. When set to ``__purge__``, :subcmd:`reset`
performs a :subcmd:`purge` sub-command. Any other value designates a name
collection to :subcmd:`restore`.
This environment variable value supersedes the default value set in the
:mconfig:`reset_target_state` configuration option. It can be defined with
the :subcmd:`config` sub-command.
.. only:: html
.. versionadded:: 5.2
.. envvar:: MODULES_RUN_QUARANTINE .. envvar:: MODULES_RUN_QUARANTINE
A space separated list of environment variable names that should be passed A space separated list of environment variable names that should be passed
indirectly to :file:`modulecmd.tcl` to protect its run-time environment from indirectly to :file:`modulecmd.tcl` to protect its run-time environment from
side-effect coming from their current definition. side-effect coming from their current definition.
If the quarantine mechanism has been included in :command:`module` shell If the quarantine mechanism has been included in :command:`module` shell
function (see :envvar:`MODULES_QUARANTINE_SUPPORT`), each variable found in function (see :envvar:`MODULES_QUARANTINE_SUPPORT`), each variable found in
:envvar:`MODULES_RUN_QUARANTINE` will have its value emptied or set to the :envvar:`MODULES_RUN_QUARANTINE` will have its value emptied or set to the
value of the corresponding :envvar:`MODULES_RUNENV_\<VAR\>` variable when value of the corresponding :envvar:`MODULES_RUNENV_\<VAR\>` variable when
skipping to change at line 3317 skipping to change at line 4093
:mconfig:`silent_shell_debug` configuration option should be set to ``1`` in :mconfig:`silent_shell_debug` configuration option should be set to ``1`` in
the :file:`initrc` configuration file. the :file:`initrc` configuration file.
.. only:: html .. only:: html
.. versionadded:: 4.1 .. versionadded:: 4.1
.. envvar:: MODULES_SITECONFIG .. envvar:: MODULES_SITECONFIG
Location of a site-specific configuration script to source into Location of a site-specific configuration script to source into
:file:`modulecmd.tcl`. See also `Modulecmd startup`_ section. :file:`modulecmd.tcl`. See :ref:`Site-specific configuration` section for
details.
This environment variable value supersedes the default value set in the This environment variable value supersedes the default value set in the
:mconfig:`extra_siteconfig` configuration option. It can be defined with the :mconfig:`extra_siteconfig` configuration option. It can be defined with the
:subcmd:`config` sub-command. This environment variable is ignored if :subcmd:`config` sub-command. This environment variable is ignored if
:mconfig:`extra_siteconfig` has been declared locked in :mconfig:`extra_siteconfig` has been declared locked in
:mconfig:`locked_configs` configuration option. :mconfig:`locked_configs` configuration option.
.. only:: html .. only:: html
.. versionadded:: 4.3 .. versionadded:: 4.3
skipping to change at line 3369 skipping to change at line 4146
abbreviation is displayed and select graphic rendition is applied over it. abbreviation is displayed and select graphic rendition is applied over it.
This environment variable value supersedes the default value set in the This environment variable value supersedes the default value set in the
:mconfig:`tag_color_name` configuration option. It can be defined with the :mconfig:`tag_color_name` configuration option. It can be defined with the
:subcmd:`config` sub-command. :subcmd:`config` sub-command.
.. only:: html .. only:: html
.. versionadded:: 4.7 .. versionadded:: 4.7
.. envvar:: MODULES_TCL_LINTER
Command name or path for use to check syntax of modulefile through the
:subcmd:`lint` sub-command.
This environment variable value supersedes the default value set in the
:mconfig:`tcl_linter` configuration option. It can be defined with the
:subcmd:`config` sub-command.
.. only:: html
.. versionadded:: 5.2
.. envvar:: MODULES_TERM_BACKGROUND .. envvar:: MODULES_TERM_BACKGROUND
Inform Modules of the terminal background color to determine if the color set Inform Modules of the terminal background color to determine if the color set
for dark background or the color set for light background should be used to for dark background or the color set for light background should be used to
color output in case no specific color set is defined with the color output in case no specific color set is defined with the
:envvar:`MODULES_COLORS` variable. Accepted values are ``dark`` and :envvar:`MODULES_COLORS` variable. Accepted values are ``dark`` and
``light``. ``light``.
This environment variable value supersedes the default value set in the This environment variable value supersedes the default value set in the
:mconfig:`term_background` configuration option. It can be defined with the :mconfig:`term_background` configuration option. It can be defined with the
skipping to change at line 3547 skipping to change at line 4337
separated by either newline or colon characters. separated by either newline or colon characters.
:file:`modulespath` is optional. When this configuration file is present it :file:`modulespath` is optional. When this configuration file is present it
is evaluated before the :file:`initrc` configuration file. See the is evaluated before the :file:`initrc` configuration file. See the
:ref:`Package Initialization` section for details. :ref:`Package Initialization` section for details.
|file etcdir_siteconfig| |file etcdir_siteconfig|
The site-specific configuration script of :file:`modulecmd.tcl`. An The site-specific configuration script of :file:`modulecmd.tcl`. An
additional configuration script could be defined using the additional configuration script could be defined using the
:envvar:`MODULES_SITECONFIG` environment variable. :envvar:`MODULES_SITECONFIG` environment variable. See :ref:`Site-specific
configuration` for detailed information.
|file etcdir_rc| |file etcdir_rc|
The system-wide modules rc file. The location of this file can be changed The system-wide modules rc file. The location of this file can be changed
using the :envvar:`MODULERCFILE` environment variable as described above. using the :envvar:`MODULERCFILE` environment variable as described above.
:file:`$HOME/.modulerc` :file:`$HOME/.modulerc`
The user specific modules rc file. The user specific modules rc file.
 End of changes. 57 change blocks. 
74 lines changed or deleted 865 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)