Skip to content

Commit 8af7c95

Browse files
committed
documentation of path_entry_reorder added (still draft)
1 parent a82c71b commit 8af7c95

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

doc/source/module.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,6 +1370,30 @@ Module Sub-Commands
13701370
sub-command when changing this configuration option from its default value.
13711371
See :envvar:`MODULES_PAGER` description for details.
13721372

1373+
.. mconfig:: path_entry_reorder
1374+
1375+
Change order of entry in a path-like environment variable, when
1376+
:mfcmd:`prepend-path`, :mfcmd:`append-path` or :subcmd:`use` target
1377+
a path entry that is already defined in the environment variable.
1378+
1379+
The default behavior of :mfcmd:`prepend-path`, :mfcmd:`append-path` and
1380+
:subcmd:`use` is not to update the value if a path-like environment
1381+
variable, if they target a path entry that is already defined in the
1382+
environment variable. If this config option is set to 1, an existing
1383+
path entry is moved to the beginning respective end unless duplicates
1384+
are allowed. This is the default behavior of Lmod.
1385+
1386+
Default value is 0. It can be changed at installation time with
1387+
:instopt:`--with-path-entry-reorder` option. The
1388+
:envvar:`MODULES_PATH_ENTRY_REORDER` environment variable is defined by
1389+
:subcmd:`config` sub-command when changing this configuration option from
1390+
its default value. See :envvar:`MODULES_PATH_ENTRY_REORDER` description
1391+
for details.
1392+
1393+
.. only:: html
1394+
1395+
.. versionadded:: 5.x
1396+
13731397
.. mconfig:: protected_envvars
13741398

13751399
Prevents any modification of listed environment variables (colon `:`
@@ -5267,6 +5291,19 @@ ENVIRONMENT
52675291
.. versionchanged:: 5.5
52685292
No pager when :file:`modulecmd.tcl` is run for scripting languages
52695293

5294+
.. envvar:: MODULES_PATH_ENTRY_REORDER
5295+
5296+
The default behavior of :mfcmd:`prepend-path`, :mfcmd:`append-path` and
5297+
:subcmd:`use` is not to update the value if a path-like environment
5298+
variable, if they target a path entry that is already defined in the
5299+
environment variable. If this config option is set to 1, an existing
5300+
path entry is moved to the beginning respective end unless duplicates
5301+
are allowed. This is the default behavior of Lmod.
5302+
5303+
.. only:: html
5304+
5305+
.. versionadded:: 5.x
5306+
52705307
.. envvar:: MODULES_PROTECTED_ENVVARS
52715308

52725309
A colon separated list of environment variable names that should not be

0 commit comments

Comments
 (0)