Commit Graph

119 Commits

Author SHA1 Message Date
Xavier Delaruelle
7093c8579e init: add cache_expiry_secs config to completion script 2022-12-27 18:43:59 +01:00
Xavier Delaruelle
8bf6dc2a6c init: add cache_buffer_bytes config to completion script 2022-12-27 18:43:58 +01:00
Xavier Delaruelle
c48247d9c8 init: add ignore_cache/--ignore-cache to comp script 2022-12-27 18:43:58 +01:00
Xavier Delaruelle
3b7568043a init: add cacheclear subcmd to completion scripts 2022-11-28 03:58:56 +01:00
Xavier Delaruelle
4ba52095dc init: add cachebuild subcmd to completion scripts 2022-11-12 13:26:30 +01:00
Xavier Delaruelle
39923ad178 Revert "init: setup zsh FPATH through autoinit command"
This reverts commit 59ac24e243.

FPATH variable cannot be handled within autoinit process as this is not
an environment variable. Thus when modulecmd.tcl is executed, it does
not know the current value of FPATH. So if it sets FPATH during
autoinit, previous value of this variable is lost. As a result FPATH
must stay defined in initialization script.
2022-10-16 14:06:11 +02:00
Xavier Delaruelle
d20c6228a8 init: add stashlist subcmd to completion scripts 2022-10-02 14:26:28 +02:00
Xavier Delaruelle
0e756ba56e init: add stashclear subcmd to completion scripts 2022-09-29 07:02:38 +02:00
Xavier Delaruelle
8af7d4568f init: add stashshow subcmd to completion scripts 2022-09-29 07:02:38 +02:00
Xavier Delaruelle
3463d123d0 init: add stashrm subcmd to completion scripts 2022-09-28 07:21:30 +02:00
Xavier Delaruelle
c7ff0fce5f init: add stashpop subcmd to completion scripts 2022-09-28 07:20:54 +02:00
Xavier Delaruelle
705b953a43 init: add stash subcmd to completion scripts 2022-09-20 06:19:33 +02:00
Xavier Delaruelle
565d7052e8 init: add reset_target_state config to completion script 2022-08-25 08:10:01 +02:00
Xavier Delaruelle
0ba8dcbb18 init: add reset subcmd to completion scripts 2022-08-25 08:10:01 +02:00
Xavier Delaruelle
25504c9e22 init: add mod-to-sh subcmd to completion scripts 2022-07-30 16:07:28 +02:00
Xavier Delaruelle
7ae26a1254 install: use install rather mkdir or cp
Use install command rather mkdir or cp to apply regular file mode when
installing Modules. A specific umask configuration set in the current
environment will not impact modes set on installed files.

Follow same approach than Makefiles generated by autotools, with an
INSTALL Makefile variable.
2022-07-18 07:41:19 +02:00
Xavier Delaruelle
4a3c19da9f init: add tcl_linter config to completion script 2022-07-12 07:47:21 +02:00
Xavier Delaruelle
f0cd6d9d8c init: add lint subcmd to completion scripts 2022-07-12 07:43:19 +02:00
Adrien Cotte
2cd1ad5a3a Bash completion support for protected_envvars config 2022-07-12 06:39:58 +02:00
Xavier Delaruelle
513a039ca4 install: create etcdir from init Makefile if used 2022-06-18 10:39:36 +02:00
Xavier Delaruelle
1411fca904 install: enclose install path refs in Makefiles 2022-06-16 18:57:30 +02:00
Xavier Delaruelle
59ac24e243 init: setup zsh FPATH through autoinit command
Add zsh FPATH setup in autoinit command instead of zsh shell
initialization script. This way all the shell setup is gathered in the
autoinit process. What is left in initialization script is the code to
properly call the autoinit process.

Fixes #462.
2022-06-16 18:57:26 +02:00
Xavier Delaruelle
8d9876ef9a init: setup shell completion through autoinit command
Add shell completion setup in autoinit command instead of shell
initialization scripts. Use this way one modulecmd.tcl internal code
instead of shell code for every shell having some completion to source
(bash, tcsh, fish).

Fixes #462.
2022-06-16 18:57:24 +02:00
Xavier Delaruelle
f269dee47b init: setup MANPATH through autoinit command
Add MANPATH setup in autoinit command instead of shell initialization
scripts. Use this way one modulecmd.tcl internal code instead of shell
code for every shell requiring to setup MANPATH with Modules binaries
location (sh, bash, ksh, zsh, csh, tcsh, fish).

Fixes #462.
2022-06-16 18:57:22 +02:00
Xavier Delaruelle
0660d6fa4e init: setup PATH through autoinit command
Add PATH setup in autoinit command instead of shell initialization
scripts. Use this way one modulecmd.tcl internal code instead of shell
code for every shell requiring to setup PATH with Modules binaries
location (sh, bash, ksh, zsh, csh, tcsh, fish).

Fixes #462.
2022-06-16 18:57:19 +02:00
Xavier Delaruelle
d6ff7dc130 install: no dependency to version.inc in init/Makefile
The Makefile script in the init directory does not depend on the
definitions stored in the version.inc file. So remove inclusion and
requirement definition to this version.inc file in init/Makefile.
2022-05-31 07:03:22 +02:00
Xavier Delaruelle
b97486fefa init: add collection_pin_tag config to completion scripts 2022-04-01 06:58:35 +02:00
Xavier Delaruelle
cd4015b106 Revert work on noglob_eval_shells config option
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.
2022-02-24 18:24:47 +01:00
Xavier Delaruelle
53f965f1c4 init: add noglob_eval_shells config to completion scripts 2022-02-19 15:56:44 +01:00
Xavier Delaruelle
939d11c15e init: add mcookie_check config to completion script 2022-01-02 21:14:21 +01:00
Xavier Delaruelle
71888cbe9f init: add load-any sub-cmd to completion scripts 2021-12-24 16:04:16 +01:00
Xavier Delaruelle
fae13159f8 init: add --tag= opt to completion scripts 2021-12-08 08:16:24 +01:00
Xavier Delaruelle
ff1db855ba install: add --with-fishcompletiondir configure opt
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.
2021-11-24 08:51:03 +01:00
Xavier Delaruelle
ee37f69f46 install: add --with-bashcompletiondir configure opt
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.
2021-11-24 08:51:03 +01:00
Xavier Delaruelle
b483dbf7c3 install: add --with-zshcompletiondir configure opt
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
2021-11-24 08:50:52 +01:00
Xavier Delaruelle
0a96ed642c init: add state subcmd to completion scripts 2021-10-19 21:48:35 +02:00
Xavier Delaruelle
abfef4ed17 init: add redirect_output config to completion script 2021-10-17 20:09:36 +02:00
Xavier Delaruelle
7d61eace20 init: always set code for silent_shell_debug code
Update initialization scripts to make the code for the
silent_shell_debug mechanism always defined there.
2021-08-31 07:22:01 +02:00
Xavier Delaruelle
57c04bbc8f init: add quarantine_support config to completion script 2021-08-26 20:14:06 +02:00
Xavier Delaruelle
4baf5dc4db Add 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
2021-08-26 20:13:51 +02:00
Xavier Delaruelle
d3e066aa01 init: set modulepaths only in modulespath if installed
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.
2021-08-17 20:12:31 +02:00
Xavier Delaruelle
e48e8a45d4 install: use bash shell to translate init scripts
Set init Makefile to use bash as shell to correctly expand the $''
syntax used in translate-in-script.
2021-08-16 07:05:35 +02:00
Xavier Delaruelle
09e9251e18 install: remove compat version-related rules 2021-07-24 14:06:09 +02:00
Xavier Delaruelle
0f76f1f13b init: name default config files initrc/modulespath
Rename the configuration template files following the new default naming
scheme for these files: modulerc becomes initrc and .modulespath becomes
modulespath.
2021-07-24 14:06:06 +02:00
Xavier Delaruelle
664808acd7 install: swap --enable-dotmodulespath/--enable-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.
2021-07-18 22:06:02 +02:00
Xavier Delaruelle
e11acd3fcb init: add try-load sub-cmd to completion scripts 2021-06-30 21:54:06 +02:00
Xavier Delaruelle
09aec34876 init: add edit sub-cmd to completion scripts 2021-06-30 21:48:49 +02:00
Xavier Delaruelle
20a7015a41 init: add variant_shortcut config to completion script 2021-06-28 20:44:23 +02:00
Xavier Delaruelle
95296fd75e init: add editor config to completion script 2021-04-24 13:36:51 +02:00
Anais GAERTNER
36b32fc24f init: add -w/--width options to completion scripts 2021-02-18 09:45:58 +01:00