Skip to content

Commit b294d22

Browse files
committed
doc: update man-path cookbook to describe init_envvars
Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
1 parent 1ed4ccd commit b294d22

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

doc/source/cookbook/man-path.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,22 @@ man page directories.
7070
7171
If your modulefiles modify :envvar:`MANPATH`, it is recommended to initialize
7272
this environment variable with a single colon (``:``) during Modules startup.
73-
To do this, add the following line to the ``initrc`` configuration file
74-
(typically located in ``/etc/environment-modules``):
73+
74+
To do this on Modules 5.7 or any newer version, add the following line to the
75+
``initrc`` configuration file (typically located in
76+
``/etc/environment-modules``):
77+
78+
.. code-block:: tcl
79+
80+
module config init_envvars MANPATH=
81+
82+
With this configuration, the ``MANPATH`` environment variable will be
83+
initialized to an empty string right before its first modification. As a
84+
result a leading or finishing colon character will be set the first time a
85+
path entry is added to ``MANPATH``.
86+
87+
With older versions of Modules, add the following line to the ``initrc``
88+
configuration file:
7589

7690
.. code-block:: tcl
7791

0 commit comments

Comments
 (0)