The MODULES_SET_SHELL_STARTUP environment variable is introduced to control whether or not shell startup file should be set to ensure module command is defined once shell has been initialized. When enabled, the ENV and BASH_ENV environment variables are set, when module function is defined, to the Modules bourne shell initialization script.

Starting version 4.0 this ability was enabled so this new configuration option offers a mean to disable it in case it is not desired.

Configure options --enable-set-shell-startup and --disable-set-shell-startup define this setting which can be superseded by the environment variable. This environment variable can be set with the config module sub-command via the set_shell_startup option.

This new feature is available in git repository and will be included into the upcoming v4.3 release.