Commit Graph

11 Commits

Author SHA1 Message Date
Xavier Delaruelle
a481df0ecb Introduce 'info-loaded' as module sub-command
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
2017-12-01 08:07:39 +01:00
Xavier Delaruelle
a4929a13b9 Introduce 'is-avail' as module sub-command
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.
2017-11-28 20:56:45 +01:00
Xavier Delaruelle
0cff43a864 Introduce 'is-used' as module sub-command
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.
2017-11-28 07:26:56 +01:00
Xavier Delaruelle
1b468822ed Introduce 'is-saved' as module sub-command
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.
2017-11-28 07:26:39 +01:00
Xavier Delaruelle
100d9223b1 Introduce 'is-loaded' as module sub-command
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
2017-11-26 16:01:57 +01:00
Xavier Delaruelle
62334ed0f7 Improve new {append,prepend,remove}-path commands
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.
2017-11-26 10:40:29 +01:00
Xavier Delaruelle
5c7314c059 init: rename use compat var in MODULES_USE_COMPAT_VERSION
Use a distinguishable prefix for environment variables relative to the
Modules software: 'MODULES_'.
2017-09-22 21:32:37 +02:00
Xavier Delaruelle
fc5674846c init: adapt scripts to --enable-compat-version build
Introduce MODULE_USE_COMPAT_VERSION environment variable to control the
activation of the compatibility version rather main version in case of
--enable-compat-version installation.

The initialization script of the shells supporting compatibility version
are adapted to define the 'module' command based on the modulecmd-compat
binary if MODULE_USE_COMPAT_VERSION is set to 1. Elsewhere module is
based on modulecmd.tcl.

'switchml' function of alias is reintroduced to switch between main and
compatibility version based on the state of the
MODULE_USE_COMPAT_VERSION environment variable.

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.
2017-09-13 06:30:19 +02:00
Kent Mein
76adb1c7e3 Removed all of the non tcl version stuff. Or most of it anyway.
Kent
2013-01-10 15:44:49 -06:00
rkowen
3b33ab4d85 * Reworked configuration and Makefile for fine-grain control of
certain paths and config files.
2010-11-12 16:54:54 +00:00
rkowen
a5f7e108a9 Added bash_completion init 2009-08-03 20:52:41 +00:00