Commit Graph

373 Commits

Author SHA1 Message Date
Xavier Delaruelle
45270de214 init: add logger config to completion script 2024-06-13 04:55:13 +02:00
Xavier Delaruelle
c8ca5eb91c init: add hide_auto_loaded config to completion script 2024-06-12 06:43:01 +02:00
Xavier Delaruelle
9a9a3ba7ed init: fix mod-to-sh option completion on bash/tcsh 2024-04-18 08:01:25 +02:00
Xavier Delaruelle
b4297c7c96 init: complete long option on ml cmd on tcsh shell 2024-04-17 21:39:50 +02:00
Laurent Besson
439acc5bfd init: add ml command completion for tcsh shell
Add simple completion (loaded modules, avail modules) to "ml" command
for tcsh shell.

Fixes #416
2024-04-17 21:39:50 +02:00
Xavier Delaruelle
00a177e7a6 init: fix MODULESHOME setup in cmd.cmd
Update cmd shell initialization script to correctly define MODULESHOME
when installation pathname contains dot character.

Fixes #525
2024-04-17 16:12:28 +02:00
Xavier Delaruelle
9ae9c4014f init: complete existing files on Tcsh completion
Fixes #523
2024-02-15 07:56:48 +01:00
Xavier Delaruelle
ac3dc0714a init: rename error_on_multi_load into abort_on_error 2023-11-27 20:19:05 +01:00
Xavier Delaruelle
8e50cce8b7 init: add source_cache config to completion script 2023-11-27 07:26:19 +01:00
Xavier Delaruelle
1b5df760d1 Use length test result as boolean value
Simplify code to use result from "string length" and "llength" commands
directly as boolean value (0 means false, other numbers mean true).
2023-10-01 10:36:49 +02:00
Xavier Delaruelle
805752e943 init: add error_on_multi_load config to completion script 2023-08-17 20:59:35 +02:00
Xavier Delaruelle
82ad9e995d init: add unload_match_order to completion script 2023-07-16 09:03:13 +02:00
Xavier Delaruelle
a39a1c1cef init: add sticky_purge to completion script 2023-07-08 15:12:36 +02:00
Xavier Delaruelle
2dfb6196f2 init: fix completion to report syms and aliases
Fix completion scripts (bash, tcsh, fish and zsh) to report symbolic
versions and aliases among available modules.

Fixes #500.
2023-06-27 08:21:31 +02:00
Xavier Delaruelle
8438ea127d lint: fix SC3045 shellcheck warning 2023-05-19 21:36:11 +02:00
Xavier Delaruelle
818da9a4c4 lint: fix SC2034 shellcheck warning 2023-05-18 20:28:10 +02:00
Xavier Delaruelle
eb95d58356 lint: fix SC2091 shellcheck warning 2023-05-18 18:46:06 +02:00
Xavier Delaruelle
0d2f8be08c init: add ignore_user_rc/--ignore-user-rc to comp script 2023-05-07 10:21:10 +02:00
Xavier Delaruelle
5e89196bd1 init: fix nospace activation in bash completion script
Fix bash shell completion script to be able to complete full name of
available modules.

Fixes #490.
2023-04-14 06:08:41 +02:00
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
c3d06a65e0 init: update completion with stashlist output
Update stashpop, stashrm and stashshow completion definition to use
stashlist output.
2022-10-05 07:59:34 +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
9a53011961 init: only source sh or bash init if BASH var is set
Update profile script for sh-like shells to only source sh or bash
initialization script when BASH environment variable is found set.

Fixes #473
2022-09-15 19:44:21 +02:00
Lukáš Zaoral
0877b01865 lint(ShellCheck): fix SC2046 warning
According to ShellCheck's documentation:

When command expansions are unquoted, word splitting and globbing will occur.
This often manifests itself by breaking when filenames contain spaces.

Related: https://www.shellcheck.net/wiki/SC2046
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
d018f7a9e6 lint(ShellCheck): fix SC2086 info diagnostic
Some variables, that were unquoted intentionally were converted to arrays.

According to ShellCheck's documentation:

Quoting variables prevents word splitting and glob expansion, and prevents
the script from breaking when input contains spaces, line feeds, glob
characters and such.

Related: https://www.shellcheck.net/wiki/SC2086
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
169c534a92 lint(ShellCheck): fix SC2178 warning
These occurrences do not seem to cause any problems described below but
let's still fix it for the sake of consistency within this script.

According to ShellCheck's documentation:

ShellCheck noticed that you have used a variable as an array, but then assign
it a string.  array=foo is equivalent to array[0]=foo, and leaves the rest
of the elements unaffected.

Related: https://www.shellcheck.net/wiki/SC2178
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
65309830cb lint(ShellCheck): fix SC2166 warning
According to ShellCheck's documentation:

-a and -o  in [ .. ] test expressions are not well defined, and can cause
incorrect results when arguments start with dashes or contain !.

Related: https://www.shellcheck.net/wiki/SC2166
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
e388118bdc lint(ShellCheck): fix SC1035 error
According to ShellCheck's documentation:

Bourne shells are very whitespace sensitive.  Adding or removing spaces can
drastically alter the meaning of a script.

Related: https://www.shellcheck.net/wiki/SC1035
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
a45f186200 lint(ShellCheck): fix SC2148 error
According to ShellCheck's documentation:

Different shells support different features.  To give effective advice,
ShellCheck needs to know which shell your script is going to run on.

Related: https://www.shellcheck.net/wiki/SC2148
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
d688b538f3 init: add vim modeline to {,b,k}sh scripts
... to enable correct syntax highlighting.
2022-09-02 09:52:05 +02:00
Xavier Delaruelle
e08b0746c6 init: fix too long line issues in tcl 2022-09-01 06:43:38 +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
972d54776e Zsh completion support for protected_envvars config 2022-07-12 06:39:58 +02:00
Adrien Cotte
9af929fb4a Fish completion support for protected_envvars config 2022-07-12 06:39:58 +02:00
Adrien Cotte
2cd1ad5a3a Bash completion support for protected_envvars config 2022-07-12 06:39:58 +02:00