@@ -1686,16 +1686,20 @@ Module Sub-Commands
16861686.. subcmd :: refresh
16871687
16881688 Force a refresh of all non-persistent components of currently loaded modules.
1689- This should be used on derived shells where shell aliases or shell functions
1690- need to be reinitialized but the environment variables have already been set
1691- by the currently loaded modules.
1689+ This should be used on derived shells where shell completions, shell aliases
1690+ or shell functions need to be reinitialized but the environment variables
1691+ have already been set by the currently loaded modules.
16921692
16931693 Loaded modules are evaluated in ``refresh `` mode following their load order.
1694- In this evaluation mode only the :mfcmd: `set-alias ` and :mfcmd: `set-function `
1695- modulefile commands will produce environment changes. Other modulefile
1696- commands that produce environment changes (like :mfcmd: `setenv ` or
1697- :mfcmd: `append-path `) are ignored during a ``refresh `` evaluation as their
1698- changes should already be applied.
1694+ In this evaluation mode only the :mfcmd: `complete `, :mfcmd: `set-alias ` and
1695+ :mfcmd: `set-function ` modulefile commands will produce environment changes.
1696+ Other modulefile commands that produce environment changes (like
1697+ :mfcmd: `setenv ` or :mfcmd: `append-path `) are ignored during a ``refresh ``
1698+ evaluation as their changes should already be applied.
1699+
1700+ Only the loaded modules defining non-persistent environment changes are
1701+ evaluated in ``refresh `` mode. Such loaded modules are listed in the
1702+ :envvar: `__MODULES_LMREFRESH ` environment variable.
16991703
17001704 .. only :: html
17011705
@@ -1705,6 +1709,9 @@ Module Sub-Commands
17051709 .. versionchanged :: 5.0
17061710 Behavior of version 3.2 :subcmd: `refresh ` sub-command restored
17071711
1712+ .. versionchanged :: 5.2
1713+ Only evaluate modules listed in :envvar: `__MODULES_LMREFRESH `
1714+
17081715.. subcmd :: reload
17091716
17101717 Unload then load all loaded *modulefiles *.
0 commit comments