Add the ability to select a module when its version is partially
specified. Enable this behavior through a new configuration option named
`extended_default` (which defines `MODULES_EXTENDED_DEFAULT` environment
variable when set).
When extended_default mechanism is enabled a module version may be
specified by its starting portion, part separated from the rest of the
version string by a `.` or `-` character.
When multiple versions match partial version specified and only one
module should be returned, default version (implicit or explicit) among
matches is returned. In case `implicit_default` is disabled and no
explicit default is found among matches, an error is returned.
Mechanism may be enabled by default in `modulecmd.tcl` script with
option `--enable-extended-default` passed to `./configure` script.
Introduce the wa_277 configuration option to workaround an issue with Tcsh
history described on ticket #277.
When option is enabled (which sets the MODULES_WA_277 environment variable
to 1), an alternative module alias is defined which fixes the history
mechanism issue. However the alternative definition of the module alias
weakens shell evaluation of the code produced by modulefiles. Characters
with special meaning for Tcsh shell (like { and }) may not be used
anymore in shell alias definition elsewhere the evaluation of the code
produced by modulefiles will return a syntax error.
Fixes#277.
Reintroduce the ``verbose`` verbosity level and associated ``--verbose``
and ``-v`` command-line switches, which were available on Modules v3.
Verbose mode adds additional informational messages, like a systematic
report of the loading or unloading module evaluations. The ``module``
command could be set verbose by default at ``./configure`` time with
``--with-verbosity`` option. ``MODULES_VERBOSITY`` environment
variable supersedes this setting and it could be set with ``config``
module sub-command through the ``verbosity`` option.
Reintroduce the ``silent`` verbosity level and associated ``--silent``
and ``-s`` command-line switches, which were available on Modules v3.
Silent mode turns off error, warning and informational messages. The
``module`` command could be set silent by default at ``./configure``
time with ``--with-verbosity`` option. ``MODULES_VERBOSITY`` environment
variable supersedes this setting and it could be set with ``config``
module sub-command through the ``verbosity`` option.
Add a ``verbosity`` configuration option to define the default message
verbosity level (between a ``normal`` and a ``debug`` level). This
option could be set at ``./configure`` time with ``--with-verbosity``
option. It could be superseded with the ``MODULES_VERBOSITY``
environment variable, that could be set with ``config`` module
sub-command through the ``verbosity`` option.
Defining a ``debug`` verbosity level at the command-line level is still
achieved by using the ``-D`` or ``--debug`` command-line switches.
Introduce the ability to install the Modules initialization
configuration files in the ``etcdir`` rather than in the ``initdir``. A
new configure option is introduced for this task:
``--with-initconf-in``. Accepted values for this option are: ``etcdir``
or ``initdir`` (default).
Take into account Modules initialization configurations found in ``etc``
directory if they exist rather in ``init`` directory. If ``initrc``
configuration file is found in ``etcdir`` then it is preferred over
``modulerc`` file in ``initdir``. Following the same trend,
``modulespath`` configuration file is found in ``etcdir`` then it is
preferred over ``.modulespath`` file in ``initdir``.
Introduce the ability not to set the shell startup file that ensure
``module`` command is defined once shell has been initialized. Setting
shell startup file currently means defining ``ENV`` and ``BASH_ENV``
environment variable to the Modules bourne shell initialization script.
``./configure`` options ``--enable-set-shell-startup`` and
``--disable-set-shell-startup`` define if shell startup should be set or
not by default. It could be superseded with the
``MODULES_SET_SHELL_STARTUP`` environment variable, that could be set
with ``config`` module sub-command through the ``set_shell_startup``
option.
Introduce the ability to control the module search match. Search query
string should match module name start or any part of module fully
qualified name. Default search match behavior is set at ``./configure``
time with the ``--with-search-match`` option. It could be superseded
with the ``MODULES_SEARCH_MATCH`` environment variable, that could be
set with ``config`` module sub-command through the ``search_match``
option. Command-line switches ``--starts-with`` (``-S``) and
``--contains`` (``-C``) for ``avail`` module sub-command enable to
supersede defined search match configuration.
Add to the configure script the --with-locked-configs option to ignore
environment variable superseding of Modules configurations defined in
modulecmd.tcl script. Lockable configuration option are extra_siteconfig.
Currently locked options are reported through the locked_configs option
on the config sub-command.
This new configure option replces --enable-extra-siteconfig which was
dedicated to the control over the MODULES_SITECONFIG variable.
Add the ability to configure whether an implicit default version should
be defined for modules with no default version explicitly defined. When
enabled, which stays the default behavior, a module version is
automatically selected (latest one) when the generic name of the module
is passed. When implicit default selection is disabled, the name of
modules to evaluate should be fully qualified elsewhere an error is
returned. This option is set at `./configure` time with the
`--enable-implicit-default` and `--disable-implicit-default` options. It
could be superseded with the `MODULES_IMPLICIT_DEFAULT` environment
variable, that could be set with `config` module sub-command throught the
`implicit_default` option.
When implicit_default is disabled:
- module implicit default versions are excluded from 'module avail -d'
results.
- false is returned when argument passed to the 'is-avail' sub-command
is a directory without an explicit default set in it.
- and auto_handling is enabled, the requirement load mechanism will fail
on requirement relying on module implicit default version
Fixes#179.
Add the ability to configure when unloading a module and multiple loaded
modules match request if firstly loaded module should be choosen or
lastly loaded module. Default behavior is set at the `./configure` time
with the `--with-unload-match-order` switch. This default could be
superseded with the `MODULES_UNLOAD_MATCH_ORDER` environment variable,
that could be set with `config` module sub-command throught the
`unload_match_order` option.
This change allows to restore behavior of Modules compatibility version
where first matching module in loaded module list were unloaded in such
situation.
By default, lastly loaded module is set for unload (like it was
before this change) to limit impact on the loaded module list when
dependencies are woven between these loaded modules.
Even if this change enables to change the default behavior, it is highly
recommanded to keep it as soon your modulefiles express dependencies
between each other.
Fixes#198.
Add to the configure script the `--enable-extra-siteconfig` and
`--disable-extra-siteconfig` options to allow or forbid the definition
of a site-specific configuration script controlled with the
`MODULES_SITECONFIG` environment variable.
These options control the default value of the `g_extrasiteconfig`
variable in `modulecmd.tcl`. If this variable is true (by default),
MODULES_SITECONFIG is looked at the siteconfig sourcing time. Thus the
primary siteconfig.tcl can set the variable to false to ensure the
extra siteconfig is disabled whatever the option passed at ./configure
time.
Improve readability of variable definition operations by writing one
definition operation per line rather having multiple commands on a single
line like 'VAR=val; export VAR'.
Fixes#225.
With same behavior than on compatibility version. The list of the
environmet variables that are cleared by this sub-command has been
updated to match the recent development (MODULES_LMPREREQ, ...)
Fixes#203.
Zsh initializes by default the MANPATH environment variable to an empty
value when it starts. To preserve manpath system configuration even
after addition to this variable by modulefiles, set MANPATH variable to
':' if found empty.
Fixes#224.
In shell initialization scripts, initialize MANPATH if not set with a
value that preserves manpath system configuration even after addition
of paths to this variable by modulefiles
Fixes#224
Fix _module_not_yet_loaded alias in tcsh completion script to handle
situation when 'noclobber' variable is set (should force to write to the
fifo files).
Also ensure actual 'rm' command is called and not an alias that may ask
for confirmation.
Fixes#219
Add the ability to control whether or not code to support quarantine
mechanism should be added to the module function and initialization
scripts. Enabled by default
Fixes#167
Add the ability to control whether or not code to support silent shell
debug should be added to the module function and sh-kind initialization
scripts. Enabled by default
Fixes#166
Add -f/--force command-line switches to by-pass dependency consistency
in case of
* load of a module conflicting with another loaded module
* load of a module where its declared requirements cannot be loaded
* unload of a module required by other loaded module
These options are only useful for the load, unload and switch module
sub-commands.
When a dependency is actually by-passed, still produce a warning message
to help user learn that something has effectively been forced. Warning
messages will be improved later-on to let user better understand what
happens
Update shell completion scripts.
Add the ability to control from the command-line whether the auto_hanling
mode should be enabled or disabled.
Command-line option override auto_handling enablement value set with
MODULES_AUTO_HANDLING environment variable or set at configure time.
Update tests and shell completion scripts.
When enabling Extended Regular Expression (ERE) on sed command, use the
'-E' argument (rather '-r') for compatibility with OS X's and BSDs' sed.
'sed -E' is used in bash and zsh completion scripts. ERE are required to
interpret alternation character '|'.
Fixes#178
To improve shell detection code that until now was relying on a parent
process name check, some shell variables will be used to determine the
current shell name.
$BASH and $ZSH_NAME variables will be looked at if defined to determine
calling shell name.
Doing so will avoid some external command call when running bash or zsh.
Also if people source /etc/profile script in their own bash or zsh script
it will correctly determine calling shell name, as parent process in
this case is the script name.
Cannot determine shell name on ksh with a variable due to the lack of a
consistent detection mechanism across all ksh flavors [1].
Fixes#173
[1] https://books.google.fr/books?id=53zaxy423xcC&pg=PA161
To get coherent with the test made by modulecmd.tcl to determine if
autoinit sub-command has to produce code for the '_module_raw' shell
function, export this function (or initialize it on compat mode) if
stderr is attached to a terminal.
Was previously testing stdout, whereas modulecmd.tcl is checking stderr,
which led to inconsistencies as described in [1].
Fixes#169
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1575479