Update python initialization script to explicitly send error output
to the sys.stderr channel (instead of parent process stderr channel) to
be able to catch this content.
Remove entirely the work on the noglob_eval_shells option as enclosing
in quotes the generated output of modulecmd.tcl to pass it to the eval
command is equivalent to disable the pathname expansion mechanism of
sh-kind shells.
Add the --with-fishcompletiondir option to the configure installation
script to define a particular installation directory for the fish
completion script.
If option is not defined, fish completion script is installed by default
in initdir and it is sourced in fish init script. If option is set,
completion script is installed in designated directory and fish init
script does not source it.
Add the --with-bashcompletiondir option to the configure installation
script to define a particular installation directory for the bash
completion script.
If option is not defined, bash completion script is installed by default
in initdir and it is sourced in bash init script. If option is set,
completion script is installed in designated directory and bash init
script does not source it.
Add the --with-zshcompletiondir option to the configure installation
script to define a particular installation directory for the zsh
completion script.
If option is not defined, zsh completion script is installed by default
in initdir and the FPATH environment variable is set in zsh init script.
If option is set, completion script is installed in designated directory
and zsh init script does not set the FPATH environment variable.
Fixes#428
Update the definition of the module function for sh shell family (sh,
bash, ksh and zsh) to support the output redirection.
Now both _module_raw and module shell functions are always defined.
Default redirection behavior depends on the interactiveness of the shell
when the autoinit command is run. Then shell code is set in module
function definition to adapt behavior depending on
MODULES_REDIRECT_OUTPUT environment variable value or
--redirect/--no-redirect command-line switches.
Set in the module magic cookie of the initrc configuration file
installed by default the version of Modules required to evaluate this
file.
Set version to 5.0 as current configuration file mention the
quarantine_support configuration option.
Convert the --enable-quarantine-support installation option in a
quarantine_support configuration option. When this option is enabled the
autoinit sub-command produces the module shell code with quarantine
mecahnism support. When disabled, code is generated without quarantine
support.
This way decision to have or not the quarantine mechanism code can also
be made in initrc configuration file. As a result
--enable-quarantine-support installation option new controls the default
behavior to generate or not the quarantine code, but this could now be
superseded in initrc configuration file.
Different setup cases are foreseen:
1. quarantine code has been included in module shell function, then
quarantine_support config is disabled
> config disablement is not effective as shell code is already set
2. quarantine code has not been included in module shell function,
then quarantine_support config is enabled
> config enablement is not effective as shell code is already set
3. during module initialization, quarantine_support config is enabled in
initrc
> shell code generated with quarantine code
4. during module initialization, quarantine_support config is disabled
in initrc
> shell code generated without quarantine code
5. during module initialization, quarantine_support config is enabled by
default or via env
> shell code generated with quarantine code
6. during module initialization, quarantine_support config is disabled by
default or via env
> shell code generated with quarantine code
Introduce the __MODULES_QUARANTINE_SET environment variable to put back
when starting modulecmd.tcl run the environment set on hold by
initialization script (for autoinit calls) or by module shell function
(for regular calls).
This new environment variable is tested to apply quarantine unhold
mechanism instead of checking if the run_quarantine configuration option
is set and shell accurately supports the mecanishm. With this change it
is possible to enable or disable the quarantine support at module
initialization time (through initrc configuration file) instead of
freezing this configuration when building the modulecmd.tcl script.
Remove the '1.0' in the #%Module magic cookie header of the generated
initrc configuration file. Users may define a more appropriate magic
cookie compatibility version.
When the installation option `--enable-modulespath` is set, the list of
modulepath to enable by default is now only defined in the `modulespath`
configuration file and not anymore in the `initrc` configuration file.
Add example code in default initrc, the initialization script of
Modules, to either restore user's default collection if it exists or
load a predefined module list when initializating Modules.
Rename the environment variables used to indirectly pass to
`modulecmd.tcl` the value of variables set in quarantine (variables
whose name finishes with `_modquar`). A `__MODULES_QUAR_` prefix is
applied to the name of these variables instead of the `_modquar` suffix
to indicate they are intended for Modules internal use of only.
Rename the configuration template files following the new default naming
scheme for these files: modulerc becomes initrc and .modulespath becomes
modulespath.
Make --enable-modulespath the primary option name and
--enable-dotmodulespath the secondary option name as .modulespath is not
anymore the primary name of this configuration file.
Installation option '--enable-set-shell-startup' is set off by default
but could be enabled once installed through the `initrc` configuration
file.
It seems better to let people choose to enable this option than being
surprised to find Modules initialization script run automatically each
time a sub-shell is spawn.
Use of '^' character to redirect stderr has been deprecated starting
Fish version 3.1. It now produces an error. Stderr should be redirected
with '2>' like on SH shells. Hopefully '2>' redirection is also
supported on old Fish versions (all version 2 support it).
This update was performed on modulecmd.tcl with 711c901 commit, but fish
initialization script was forgotten at that time.
Silently include version.inc in main, doc and init Makefiles to avoid
'Makefile:349: version.inc: No such file or directory' warning message
when version.inc needs to be rebuilt prior being loaded.
Print generated file names rather commands executed to generate these
files on makefile build targets. Output when making Modules is this way
simplified. When option `V=1` is passed to make verbose mode is enabled
and executed commands are shown.
Simplified make output does not apply to the install, uninstall, test,
clean, distclean targets and their relatives.
Update shell completion scripts to make use of the module option -o to
control the element to find in output rather using sed command to discard
the unwanted elements.