Skip to content

Commit 126c83d

Browse files
committed
doc: desc. --respect option support in lmod compat docs
Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent 177438b commit 126c83d

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

doc/source/design/lmod-tcl-modulefile-compat.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,4 +405,23 @@ See :ref:`mode-select` design documentation to learn about this option.
405405
This ``--mode`` option is not supported currently on Modules and an error is
406406
raised when it is used in modulefiles.
407407

408+
409+
``--respect`` option
410+
--------------------
411+
412+
Lmod has the ``--respect`` option (short name ``-r`` or ``-respect``) for the
413+
following modulefile commands:
414+
415+
* ``setenv``
416+
* ``unsetenv``
417+
418+
This option on ``setenv`` does not change the environment variable value, if
419+
this variable is already defined. On ``unsetenv``, environment variable is not
420+
unset if its current value does not equal the one specified on ``unsetenv``
421+
command.
422+
423+
This ``--respect`` option is not supported currently on Modules and an error
424+
is raised when it is used in modulefiles.
425+
426+
408427
.. vim:set tabstop=2 shiftwidth=2 expandtab autoindent:

doc/source/modulefile.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,8 +1570,8 @@ the *modulefile* is being loaded.
15701570

15711571
Unsets environment *variable*. When a *modulefile* is unloaded, no operation
15721572
is performed unless if an optional *value* is defined, in which case
1573-
*variable* is to *value*. The :mfcmd:`unsetenv` command changes the process'
1574-
environment like :mfcmd:`setenv`.
1573+
*variable* is set to *value*. The :mfcmd:`unsetenv` command changes the
1574+
process' environment like :mfcmd:`setenv`.
15751575

15761576
If the ``--noop-on-unload`` option is set, no operation is performed when
15771577
*modulefile* is unloaded. If the ``--unset-on-unload`` option is set,
@@ -2204,6 +2204,9 @@ The :mfcmd:`setenv`, :mfcmd:`unsetenv`, :mfcmd:`prepend-path`,
22042204
and :mfcmd:`unload<module>` modulefile commands do not support the ``--mode``
22052205
option. An error is raised if this option is used.
22062206

2207+
The :mfcmd:`setenv` and :mfcmd:`unsetenv` modulefile commands do not support
2208+
the ``--respect`` option. An error is raised if this option is used.
2209+
22072210
Use of :mfcmd:`reportError` command aborts modulefile evaluation on Lmod. This
22082211
command only reports an error message on Modules.
22092212

0 commit comments

Comments
 (0)