Commit Graph

4211 Commits

Author SHA1 Message Date
Xavier Delaruelle
ca8c43bdd4 Add depends-on modulefile command
Introduce the depends-on modulefile command which defines module
requirements for currently loading modulefile. This command is an alias
over prereq command with all modulefile arguments treated as a Boolean
AND operation: all specified modulefiles are required.
2021-12-03 07:28:16 +01:00
Xavier Delaruelle
5be8f99d58 doc: desc depends-on in NEWS/changes/man/design 2021-12-03 07:28:15 +01:00
Xavier Delaruelle
4e2e304190 ts: add tests for require-fullname in 50/514 2021-12-03 07:26:08 +01:00
Xavier Delaruelle
2d1798ec75 Add require-fullname modulefile command
Introduce the require-fullname modulefile command that raises an error
if loading module is not fully qualified. Alias and symbols are
considered fully qualified versions expect for the default symbol.

Add the filter_default argument on getAllModuleResolvedName procedure to
exclude module parent name and default symbol version from alternative
name list.

Update modEq procedures to call for getAllModuleResolvedName with
filter_default mode enabled when ismodlo argument is set to 4.
2021-12-03 07:26:08 +01:00
Xavier Delaruelle
37484a3173 doc: desc. require-fullname in man/changes/NEWS 2021-12-03 07:26:03 +01:00
Xavier Delaruelle
ce43405be4 doc: add lmod-tcl-modulefile-compat initial version 2021-12-01 07:30:42 +01:00
Xavier Delaruelle
88a26dd58e doc: desc reportError and reportWarning in man/changes/NEWS 2021-12-01 07:30:42 +01:00
Xavier Delaruelle
8ce2c0bf69 ts: test ModuleVersion in 20/120 2021-12-01 07:30:42 +01:00
Xavier Delaruelle
8c9e8ad12f Set ModuleVersion as an alias over ModulesVersion
Set ModuleVersion as an alias over ModulesVersion modulefile variable
for compatibility with Lmod Tcl modulefiles.
2021-12-01 07:30:42 +01:00
Xavier Delaruelle
951da7a3c2 doc: desc ModulesVersion mfvar in man 2021-12-01 07:30:42 +01:00
Xavier Delaruelle
8b772026c0 Clear msg when no arg is passed to prereq
Produce a clear error message when wrong number of argument is
received by prereq command.
2021-12-01 07:30:42 +01:00
Xavier Delaruelle
c229efb1f6 ts: add tests for prereq-any in 50/513 2021-12-01 07:30:42 +01:00
Xavier Delaruelle
0e6eda6513 doc: desc prereq-any in man/NEWS/changes 2021-11-30 20:52:42 +01:00
Xavier Delaruelle
9b051eb9fc Add prereq-any modulefile command
Introduce the prereq-any modulefile command which is a bare alias for
the prereq command.
2021-11-30 20:52:42 +01:00
Xavier Delaruelle
591977d4f9 doc: desc {add,remove}-property/extensions in man/NEWS 2021-11-30 20:52:42 +01:00
Xavier Delaruelle
4d7ff48056 ts: add test for extensions in 50/512 2021-11-30 20:52:42 +01:00
Xavier Delaruelle
c7f86a8226 ts: add tests for remove-property in 50/511 2021-11-30 20:52:42 +01:00
Xavier Delaruelle
96c001b593 ts: add tests for add-property in 50/510 2021-11-30 20:52:42 +01:00
Xavier Delaruelle
f184ab8255 doc: desc. add-property/remove-property/extensions in changes 2021-11-26 20:31:45 +01:00
Xavier Delaruelle
58cc410b87 Add add-property/extensions/remove-property cmds
Introduce the add-property, extensions and remove-property modulefile
commands. Implemented as a no-operation command for modulefile
evaluation context.
2021-11-26 07:43:42 +01:00
Xavier Delaruelle
b283fbeba3 ts: update CI config to test completiondir install opt 2021-11-24 08:51:03 +01:00
Xavier Delaruelle
ce796500a6 doc: desc completiondir install opts in NEWS/INSTALL 2021-11-24 08:51:03 +01:00
Xavier Delaruelle
4a3ad674c8 rpm: use shell-specific completion dir 2021-11-24 08:51:03 +01:00
Xavier Delaruelle
ff1db855ba install: add --with-fishcompletiondir configure opt
Add the --with-fishcompletiondir option to the configure installation
script to define a particular installation directory for the fish
completion script.

If option is not defined, fish completion script is installed by default
in initdir and it is sourced in fish init script. If option is set,
completion script is installed in designated directory and fish init
script does not source it.
2021-11-24 08:51:03 +01:00
Xavier Delaruelle
ee37f69f46 install: add --with-bashcompletiondir configure opt
Add the --with-bashcompletiondir option to the configure installation
script to define a particular installation directory for the bash
completion script.

If option is not defined, bash completion script is installed by default
in initdir and it is sourced in bash init script. If option is set,
completion script is installed in designated directory and bash init
script does not source it.
2021-11-24 08:51:03 +01:00
Xavier Delaruelle
b483dbf7c3 install: add --with-zshcompletiondir configure opt
Add the --with-zshcompletiondir option to the configure installation
script to define a particular installation directory for the zsh
completion script.

If option is not defined, zsh completion script is installed by default
in initdir and the FPATH environment variable is set in zsh init script.
If option is set, completion script is installed in designated directory
and zsh init script does not set the FPATH environment variable.

Fixes #428
2021-11-24 08:50:52 +01:00
Xavier Delaruelle
0d18362df7 doc: desc. modfile command behavior opts in MIGRATING 2021-11-21 10:35:10 +01:00
Xavier Delaruelle
5eaff52bae ts: test setenv --set-if-undef on modfile cmds 2021-11-20 18:03:47 +01:00
Xavier Delaruelle
6c6e0764b7 doc: update setenv in top-priority-values recipe config 2021-11-20 18:03:47 +01:00
Xavier Delaruelle
de2df462b4 ts: fix existing setenv tests for --set-if-undef 2021-11-20 18:03:47 +01:00
Xavier Delaruelle
c8ce2d2174 doc: desc. setenv --set-if-undef in man/changes/NEWS 2021-11-20 18:03:47 +01:00
Xavier Delaruelle
7a55c48ac5 Add --set-if-undef option on setenv
Add the --set-if-undef option on the setenv modulefile command. When
set, the environment variable is set when modulefile is loaded only if
currently unset.

Fixes #425
2021-11-20 18:03:36 +01:00
Xavier Delaruelle
88ead7c088 Parse setenv args with parseUnsetenvCommandArgs
Add the parseUnsetenvCommandArgs procedure to parse arguments set on
setenv modulefile command.

Split procedure for setenv and unsetenv commands in whatis evaluation
mode, as both commands now have different set of options that should
also be parsed in whatis mode to extract targeted environment variable
name.
2021-11-20 18:03:36 +01:00
Xavier Delaruelle
d7bb41a9dd ts: test unsetenv --unset-on-unload on modfile cmds 2021-11-20 18:03:36 +01:00
Xavier Delaruelle
3dbf40c2e5 doc: desc. unsetenv --unset-on-unload in man/changes/NEWS 2021-11-20 18:03:36 +01:00
Xavier Delaruelle
81c43c3ffe ts: fix existing unsetenv tests for --unset-on-unload 2021-11-20 18:03:36 +01:00
Xavier Delaruelle
ac39e770b1 Add --unset-on-unload option on unsetenv
Add the --unset-on-unload option on the unsetenv modulefile command.
When set, the environment variable is unset when modulefile is unloaded,
like it does when modulefile is loaded.
2021-11-20 18:03:36 +01:00
Xavier Delaruelle
bc1f8e250c ts: test unsetenv --noop-on-unload on modfile cmds 2021-11-20 18:03:36 +01:00
Xavier Delaruelle
4a50b81d3e doc: desc. unsetenv --noop-on-unload in man/changes/NEWS 2021-11-20 18:03:36 +01:00
Xavier Delaruelle
d3f9b5b489 ts: fix existing unsetenv tests for --noop-on-unload 2021-11-20 18:03:36 +01:00
Xavier Delaruelle
fe890deb53 Add --noop-on-unload option on unsetenv
Add the --noop-on-unload option to the unsetenv modulefile command.
Corresponds to the actual default behavior, which is enforced even if a
value to restore on unload mode is specified.
2021-11-20 18:03:36 +01:00
Xavier Delaruelle
f44bfb7e5f Parse unsetenv args with parseUnsetenvCommandArgs
Add the parseUnsetenvCommandArgs procedure to parse the arguments set on
an unsetenv moduefile command.
2021-11-20 18:03:36 +01:00
Xavier Delaruelle
791c928663 ts: test --noop-on-unload option on modfile cmds 2021-11-20 18:03:36 +01:00
Xavier Delaruelle
aba5dd2c30 doc: desc. --noop-on-unload in man/changes/NEWS 2021-11-20 18:03:36 +01:00
Xavier Delaruelle
66645528c5 ts: test --noop-on-unload option on subcmds 2021-11-20 18:03:36 +01:00
Xavier Delaruelle
a823121c9e Add --noop-on-unload on remove-path/module unuse
Add the --noop-on-unload option to the remove-path and module unuse
sub-command to perform no operation when commands are evaluated in
unload mode.
2021-11-20 18:03:36 +01:00
Xavier Delaruelle
2d49e79c2a ts: test --prepend-on-unload option on modfile cmds 2021-11-20 18:03:36 +01:00
Xavier Delaruelle
81673c2b46 ts: test --prepend-on-unload option on subcmds 2021-11-20 18:03:36 +01:00
Xavier Delaruelle
f9b1ab9aae Add --prepend-on-unload on remove-path/module unuse
Add the --prepend-on-unload option to the remove-path and module unuse
sub-command to append specified paths when commands are evaluated in
unload mode.

If option is set prior path list specification, this path list which is
unsets when modulefile loads is appended back when modulefile unloads.
If a different path list is passed after option specification, this list
is appended on unload mode instead of the list removed at load time.

--prepend-on-unload option cannot be mixed with --index option.
2021-11-20 18:03:36 +01:00
Xavier Delaruelle
f4d3a1bbab Pass precise behavior to apply to add-path
Instead of barely setting 'add' as default behavior to apply on add-path
procedure, precise this behavior with 'append' and 'prepend' value.
2021-11-20 18:03:36 +01:00