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
Add the ability to append rather prepend the man or bin directory when
adding these directory to the relative environment variable is enabled
(with --enable-set-manpath or --enable-set-binpath).
Takes the form of 2 new configure options: --enable-append-manpath and
--enable-append-binpath. No effect if set but relative
--enable-set-{bin,man}path option is unset or disabled.
Quote autoinit result for eval interpretation on SH-kind shells to
avoid parameter expansion to randomly occur on generated code
depending on file or directory names of current working directory.
Test basic module commands in install testsuite with a
'something (test)' file existing in current working directory.
Fixes bug reported at [1].
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1549664