Add the ability to always record module name + version even if this
version corresponds to the default one.
By default, version number is omitted if it corresponds to the implicit
or explicitly set default version. If MODULES_COLLECTION_PIN_VERSION
environment variable is set to 1, version number is always recorded.
When restoring a collection, we do not know for sure if it was saved
with pinned versions or not, so module load and unload movements are
determined on both simplified or raw module list. Results with less
module to load or unload (means with more matches between module lists)
are kept.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Closes#89
Returns true when no argument is passed to 'is-used' if any directory
is used, whatever it is.
Adapt docs and test cases to this new behavior.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Closes#144
Returns true when no argument is passed to 'is-saved' if any collection
matching currently set collection target exists whatever this collection
is.
Adapt docs and test cases to this new behavior.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Returns true when no argument is passed to 'is-loaded' if any modulefile
is loaded, whatever it is.
Adapt docs and test cases to this new behavior.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Like for 'is-loaded', register 'module-info loaded' modulefile Tcl
command as a module sub-command to make it reachable from the command
line. Sub-command is named 'info-loaded' for sake of efficiency (not
'module-info-loaded').
Add the new command to the existing shell completion scripts (bash, tcsh
fish, zsh).
Document new command in the module.1 man page.
Check 'info-loaded' command argument error in 071-args tests of 00-init
suite. Test 'module info-loaded' cannot be called from a modulefile with
151-module-onlytop in 50-cmds suite. Add 156-info-loaded tests in
70-maint suite to validate new sub-command.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Closes#3
Add 'loaded' sub-command to the 'module-info' modulefile Tcl command.
This new sub-command returns name of the modules currently loaded
corresponding to the name passed as argument. May return multiple
modules if passed name matches more than one loaded modules.
Document new command in modulefile.4 and test it with a 285-info-loaded
tests in 50-cmds suite.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Like for 'append-path', register 'is-avail' modulefile Tcl command as a
module sub-command to make it reachable from the command line.
Add the new command to the existing shell completion scripts (bash, tcsh
fish, zsh).
Document new command in the module.1 man page.
Check 'is-avail' command argument error in 071-args tests of 00-init
suite. Test 'module is-avail' cannot be called from a modulefile with
151-module-onlytop in 50-cmds suite. Add 155-is-avail tests in 70-maint
suite to validate new sub-command.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Introduce 'is-avail' modulefile command to check, following the same
spirit than 'is-loaded', if any of the passed modulefiles exists in
enabled in MODULEPATH.
Document new command in modulefile.4 and test it with a 322-is-avail
tests in 50-cmds suite.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Like for 'append-path', register 'is-used' modulefile Tcl command as a
module sub-command to make it reachable from the command line.
Add the new command to the existing shell completion scripts (bash, tcsh
fish, zsh).
Document new command in the module.1 man page.
Check 'is-used' command argument error in 071-args tests of 00-init
suite. Test 'module is-used' cannot be called from a modulefile with
151-module-onlytop in 50-cmds suite. Add 154-is-used tests in 70-maint
suite to validate new sub-command.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Introduce 'is-used' modulefile command to check, following the same
spirit than 'is-loaded', if any of the passed directories has been
enabled in MODULEPATH.
Document new command in modulefile.4 and test it with a 321-is-used
tests in 50-cmds suite.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Like for 'append-path', register 'is-saved' modulefile Tcl command as a
module sub-command to make it reachable from the command line.
Add the new command to the existing shell completion scripts (bash, tcsh
fish, zsh).
Document new command in the module.1 man page.
Check 'is-saved' command argument error in 071-args tests of 00-init
suite. Test 'module is-saved' cannot be called from a modulefile with
151-module-onlytop in 50-cmds suite. Add 154-is-saved tests in 70-maint
suite to validate new sub-command.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Introduce 'is-saved' modulefile command to check, following the same
spirit than 'is-loaded', if any of the passed collections exists.
Document new command in modulefile.4 and test it with a 320-is-saved
tests in 50-cmds suite.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Like for 'append-path', register 'is-loaded' modulefile Tcl command as a
module sub-command to make it reachable from the command line.
Improve 'cmdModuleResurface' procedure to set a global 'g_return_false'
flag when 'is-loaded' command returns 0. If 'g_return_false' flag is set
shell code rendering will end with a false value returned.
Add the new command to the existing shell completion scripts (bash, tcsh
fish, zsh).
Document new command in the module.1 man page.
Check 'is-loaded' command argument error in 071-args tests of 00-init
suite. Test 'module is-loaded' cannot be called from a modulefile with
151-module-onlytop in 50-cmds suite. Add 153-is-loaded tests in 70-maint
suite to validate new sub-command.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Closes#116
Refactor code to call from the module command line modulefile-specific
commands. These commands can only be called from the command line, not
when calling 'module' procedure from a modulefile, to avoid any
ambiguity.
When parsing command line arguments, check context to know if '-d' means
'--default' (avail command) or '--delim' (*-path commands).
Add the new commands to the existing shell completion scripts (bash,
tcsh, fish, zsh).
Document new commands in the module.1 man page.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Paginate stderr output into paging command, using 'less' by default,
following the same fashion and behavior than 'git' command.
Pager is enabled by default in modulecmd script. New global variables
'g_use_pager', 'g_pager' and 'g_pager_opts' control default behavior of
module command.
Pager is enabled only if stderr stream is attached to a terminal.
Pager setup can then be superseeded by environment variables. If LESS
variable is set and paging command is set to 'less', default pager
options are cleared to use those defined in LESS variable.
If MODULES_PAGER variable is defined, its value superseeds paging
activation, command and options. If this variable is empty, paging is
disabled.
If PAGER variable is defined and MODULES_PAGER is unset, PAGER value
superseeds paging activation, command and options. If this variable is
empty, paging is disabled.
Default behavior and MODULES_PAGER or PAGER environment variables can be
superseeded by command-line options: --paginate to enable paging and
--no-pager to disable it.
When pager is enabled, a pipe file descripted is ignited to the paging
command and option for stderr stream. Once set, this file descriptor is
used by all report procedures to output message content, rather using
stderr.
modulecmd command-line parse has been revised not to output message
during argument treatment. Debug, warning and error messages are saved
to then be displayed once pager setup is achieved.
An 'initPager' procedure is introduced to configure then start paging.
A 'cleanupAndExit' is added to close pager before exiting if pager has
been started.
Change makefile to build doc with sphinx rather pod. Docs are now
pregenerated in dist-tarball, to avoid requiring documentation build
tool when installing from these dist-tarball.
Adapt travis conf & RPM spec file to the new documentation build
process.
Transform source documents from POD format to reStructuredText to then
benefit from Sphinx documentation framework and Read The Docs publishing
capabilities.
Modulefiles with part of their name starting with a '.' dot character
are considered as hidden modulefiles, like dot files on Unix-kind
filesystems. After introduction of the getModules/findModules procedures
hidden modulefiles where automatically discarded. So this commit
re-introduce the support to locate these dot modulefiles.
Add a 'fetch_hidden' argument to the findModules procedure to enable an
extra lookup on walked directories to gather the dot modulefiles. The
getModules procedures now looks at the passed mod and if named module
correspond to a dot modulefile findModules 'fetch_hidden' argument is
turned on. Since getPathToModule call to getModules for broad search
(with just passed mod root name), this procedure also makes the
'is hidden module' test to order getModules to do the hidden search.
A hidden modulefile does not appear in case of wild search, it is only
returned when search is about its exact name. When a symbolic version
targets a hidden modulefile, this modulefile will also be returned in
case search is about symbol exact name. A module alias targeting a
hidden modulefile is returned as any other aliases.
Add 067-hidden non-regression tests in 20-locate suite.
When searching for a module in a given modulepath directory, if a module
alias or a symbolic version matches searched module but the target of
this alias or symbol is not found in current modulepath directory,
search for this target restarting search from the first modulepath in
list to ensure modulepath priority.
Previously this kind of alias or symbol targeting a module in a
different modulepath were only found if this path was set after the
modulepath where the alias or symbol is defined.
Clarify alias and symbolic version modulepath resolution steps in
modulefile man page.
Instead of removing the whole line when no more module specified on it
during an 'initrm' command or during an 'initclear', keep the line with
'module load' to be able to reuse this line on next 'initadd' command.
Adapt non-regression tests in 050-rm and 060-2nd of 60-initx suite and
diff doc.
Report an 'unsupported option' warning message when C-version specific
command-line switches are passed rather than producing an 'invalid
option' error.
Adapt non-regression tests of 00-init/090-switches and
70-maint/060-apropos and diff doc.