Commit Graph

52 Commits

Author SHA1 Message Date
Xavier Delaruelle
76e4d10d16 doc: desc. module-info usergroups/username in modulefile(4) 2020-07-16 21:53:51 +02:00
Xavier Delaruelle
16368cfc32 doc: reorder module-info sub-cmd desc. in modulefile(4) 2020-07-16 21:53:51 +02:00
Xavier Delaruelle
fcc2a32686 doc: desc. source-sh/MODULES_LMSOURCESH in man/diff 2020-06-01 21:03:12 +02:00
Xavier Delaruelle
69d149e314 doc: desc. default/latest auto symbols in man pages 2020-04-07 15:11:12 +02:00
Xavier Delaruelle
bb2c0960ba doc: clarify hidden module location in modulefile.4 2020-03-29 08:20:49 +02:00
Xavier Delaruelle
c3ac4c45d7 doc: desc ml in man/diff/INSTALL 2020-01-09 20:38:50 +01:00
Xavier Delaruelle
60975540d6 doc: alphabetically sort modulefile cmds in modulefile.4 2020-01-09 07:09:48 +01:00
Xavier Delaruelle
76072dc26a doc: split lines larger than 78 cols in man pages 2020-01-08 23:07:23 -07:00
Xavier Delaruelle
6d47720745 doc: desc. modulefile cmd version addition in modulefile.4 2020-01-08 23:07:23 -07:00
Colin Marquardt
8c7f0c0a3d doc: markup code with double backticks in man pages 2020-01-08 23:07:23 -07:00
Xavier Delaruelle
882f4ee763 doc: fix missing ref link in or between man pages 2020-01-08 23:07:23 -07:00
Colin Marquardt
68eac641fb doc: markup modulefile cmd with :mfcmd: in man pages 2020-01-08 23:07:23 -07:00
Colin Marquardt
a4ae6f1b62 doc: markup modulefile cmd sections with .. mfcmd:: in man pages 2020-01-08 23:07:23 -07:00
Colin Marquardt
c05c510da0 doc: markup subcmd with :subcmd: in man pages 2020-01-08 23:07:23 -07:00
Colin Marquardt
ca6145cb05 doc: markup cmd opt with :option: in man pages 2020-01-08 23:07:23 -07:00
Colin Marquardt
f72b67e774 doc: markup env var with :envvar: in man pages 2020-01-08 23:07:23 -07:00
Colin Marquardt
42cdd9dbdf doc: markup env var sections with .. envar:: in man pages 2020-01-08 23:07:23 -07:00
Colin Marquardt
2849d06c2b doc: markup cmds with :command: in man pages 2020-01-08 23:07:23 -07:00
Colin Marquardt
7b6ec26eaa doc: markup man page ref with :manpage: in man pages 2020-01-08 23:07:23 -07:00
Colin Marquardt
cce5135e89 doc: markup files with :file: in man pages 2020-01-08 23:07:23 -07:00
Colin Marquardt
df8f44e7a2 doc: fix ref link to Locating Modulefiles section 2020-01-08 23:07:23 -07:00
Colin Marquardt
1485f9da81 doc: fix some typos and grammar across documents 2020-01-08 23:07:23 -07:00
Xavier Delaruelle
52c2d7cca5 doc: add anchor for each modulefile command 2019-11-27 17:38:58 +01:00
Xavier Delaruelle
9ecd31412f doc: desc. advanced_version_spec in diff/man 2019-11-16 15:03:49 +01:00
Xavier Delaruelle
c38228aa82 Remove '-' from list of ext dfl separator char
Remove the '-' character from the list of extended default separator
characters, as it is not feasible to determine in all cases the highest
version specified after this character (to determine an implicit
default). This removal means that only '.' is taken into account as
extended default separator.
2019-11-11 09:13:50 +01:00
Xavier Delaruelle
8638d5b5bb doc: desc extended_default in man/diff/INSTALL 2019-11-11 09:13:50 +01:00
Xavier Delaruelle
5848939b98 doc: attempt to clarify eval mode in modulefile man
Fixes #289
2019-09-06 17:15:55 +02:00
Xavier Delaruelle
89fef8de6c doc: desc implicit_default in man/diff/INSTALL 2019-06-03 08:14:59 +02:00
Xavier Delaruelle
1c76c55e0a doc: desc Modulepath rc file in man/NEWS/MIGRATING 2019-04-30 08:12:47 +02:00
Xavier Delaruelle
20aada54aa Fix 'system' to run cmd through shell
system modulefile command is intended to the command passed to it trough
shell, like done on compatibility version.

So update system procedure to find correct shell on the current platform
and run command through it.

Doing so, shell commands with backticks for instance are correctly run.

Fixes #205
2018-10-20 19:51:31 +02:00
Ben Bowers
3dc5ecee89 added set-function and unset-function commands
fixed linelength and tabs/spaces

adding set-function/unset-function documentation

adding tests for set-function/unset-function

fixed failing test for function modulefile additions
2018-10-17 09:45:33 +02:00
Xavier Delaruelle
702f6f1816 Check version set in modulefile magic cookie
Magic cookie at the beginning of modulefiles may sometimes set a version
number, for instance '#Module1.0'. Until now this version number was
about a modulefile standard version. However there is no known
modulefile API versioning and new modulefile commands are added along
new Modules releases.

So the idea here is to match this version number optionally set on magic
cookie and compare it to the modulecmd.tcl release version. If
modulefile sets a version number greater than modulecmd.tcl version,
this modulefile is not evaluated like when no magic cookie is set at
all.

Add specific tests in 20-locate suite and adapt modulefile man page and
MIGRATING doc.

Fixes #171
2018-09-08 19:10:38 +02:00
Xavier Delaruelle
10d8b84977 doc: desc. alt name in manpages and diff doc
Also fix some typos found on the way and clarifies commands where
symbolic versions and aliases where already supported.
2018-09-01 16:37:05 +02:00
Xavier Delaruelle
00518d7171 ModulesVersion can only refer to modfile in same dir
Clarify modulefile man page and .version modulerc interpretation about
ModulesVersion variable which can only refer to modulefile located in
the same directory than where this .version modulerc file is located.

Report error if a nested ModulesVersion value is detected. This value is
ignored.

Add tests in 80-deep suite on that change.

Clarifies RH#979787 [1]

Fixes #176

[1] https://bugzilla.redhat.com/show_bug.cgi?id=979787
2018-08-20 08:11:13 +02:00
Xavier Delaruelle
edcd9a1351 doc: desc. --force in module.1 2018-07-22 08:22:16 +02:00
Xavier Delaruelle
19f6f03d3c doc: desc. --auto/--no-auto/MODULES_AUTO_HANDLING in module.1 2018-07-22 08:22:16 +02:00
Xavier Delaruelle
2f541246cc doc: state in modulefile(4) getenv should be pref. over ::env 2018-07-02 07:00:57 +02:00
Xavier Delaruelle
2e8fed2b28 Add valifundef arg to getenv procedure
Allow to define value to return if variable name passed to the getenv
procedure is undef.

Add a description of 'getenv' command in the modulefile man page.
2018-04-16 07:54:52 +02:00
Xavier Delaruelle
8973b37043 doc: desc. module-virtual command 2018-01-13 16:51:49 +01:00
Xavier Delaruelle
3fcc9b46e7 Add --index opt to remove-path
Remove path entry in environment variable by passing an index rather a
string. String at specified index in content list is removed if coherent
with relative reference counter.
2017-12-21 05:43:13 +01:00
Xavier Delaruelle
b2105b8834 Introduce --duplicates opt to {append,prepend}-path
Let the possibility to append or prepend path element entry to a
variable even if this entry is already registered into the variable
which introduces duplicates element within the variable value.

Entries are added with eventual duplication by the use of the
--duplicate option on append-path and prepend-path commands. These
additions increment the reference counter as usual.

Removal of duplicated path entry depends on the reference counter value.
Entries are not removed unless reference counter value is lesser than
the number of duplicated entries.
2017-12-19 21:34:52 +01:00
Xavier Delaruelle
8c4b3b745d Pass multi paths in multi strs on {append,prepend,remove}-path
Enable append-path, prepend-path and remove-path to receive multiple
path value arguments.

Add some non-regression tests for modulefile or sub-command cases.

Update modulefile.4 and module.1 docs.

Closes #141
2017-12-19 06:53:50 +01:00
Xavier Delaruelle
f13fac6235 Pass multiple paths in 1 str on {append,prepend,remove}-path
Detect if path string passed to append-path, prepend-path or remove-path
commands is composed of multiple path entries (separated by specified or
default delimiter string). In this situation add/remove each path
separately to correctly update relative reference counter.

Add some non-regression tests for modulefile or sub-command cases.

Update modulefile.4 doc.

Closes #142
2017-12-17 16:20:52 +01:00
Xavier Delaruelle
73456fea04 Handle no argument case on 'is-used'
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
2017-12-01 15:47:23 +01:00
Xavier Delaruelle
ec305b5296 Handle no argument case on 'is-saved'
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.
2017-12-01 15:46:47 +01:00
Xavier Delaruelle
ea7e9a7792 Handle no argument case on 'is-loaded'
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.
2017-12-01 15:45:42 +01:00
Xavier Delaruelle
2dcd8da58d Introduce 'module-info loaded' modulefile command
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.
2017-11-30 17:16:24 +01:00
Xavier Delaruelle
1b9420b500 Add 'is-avail' modulefile command
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.
2017-11-28 07:27:04 +01:00
Xavier Delaruelle
24cb3d86e2 Add 'is-used' modulefile command
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.
2017-11-28 07:26:49 +01:00
Xavier Delaruelle
db9b86632e Add 'is-saved' modulefile command
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.
2017-11-27 06:57:15 +01:00