You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/module.rst
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1370,6 +1370,23 @@ Module Sub-Commands
1370
1370
sub-command when changing this configuration option from its default value.
1371
1371
See :envvar:`MODULES_PAGER` description for details.
1372
1372
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
+
Default value is ``0``. It can be changed at installation time with the
1380
+
:instopt:`--enable-path-entry-reorder` option. The
1381
+
:envvar:`MODULES_PATH_ENTRY_REORDER` environment variable is defined by
1382
+
:subcmd:`config` sub-command when changing this configuration option from
1383
+
its default value. See :envvar:`MODULES_PATH_ENTRY_REORDER` description
1384
+
for details.
1385
+
1386
+
.. only:: html
1387
+
1388
+
.. versionadded:: 5.7
1389
+
1373
1390
.. mconfig:: protected_envvars
1374
1391
1375
1392
Prevents any modification of listed environment variables (colon `:`
@@ -5274,6 +5291,35 @@ ENVIRONMENT
5274
5291
.. versionchanged:: 5.5
5275
5292
No pager when :file:`modulecmd.tcl` is run for scripting languages
5276
5293
5294
+
.. envvar:: MODULES_PATH_ENTRY_REORDER
5295
+
5296
+
This environment variable changes the behavior of :mfcmd:`prepend-path`, :mfcmd:`append-path` and :subcmd:`use`.
5297
+
5298
+
If set to ``1``, and one of these commands targets a path entry that already exists in the environment variable, the entry is moved to the beginning or end (depending on the command), unless duplicates are allowed. This is the default behavior in Lmod.
5299
+
If set to ``0``, the environment variable is not modified when the entry already exists.
0 commit comments