From bc1373dffc70802e2f92501a00a7c69923ef2072 Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Sun, 10 May 2020 22:28:03 +0200 Subject: [PATCH] init: add -T/--trace options to completion scripts --- init/bash_completion.in | 8 ++++---- init/fish_completion | 1 + init/tcsh_completion.in | 2 +- init/zsh-functions/_module.in | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/init/bash_completion.in b/init/bash_completion.in index 2fc7d6be..5f118a1d 100644 --- a/init/bash_completion.in +++ b/init/bash_completion.in @@ -114,8 +114,8 @@ _module() { savelist saveshow saverm search show sh-to-mod source swap switch\ test unload unuse use whatis" - opts="-D -h -s -v -V --debug --help --silent --verbose --version\ - --paginate --no-pager --color --color=" + opts="-D -h -s -T -v -V --debug --help --silent --trace --verbose\ + --version --paginate --no-pager --color --color=" load_opts="--auto --no-auto --force -f -i --icase" list_opts="-j -l -t --json --long --terse" clear_opts="--force -f" @@ -189,8 +189,8 @@ if $(type -t ml >/dev/null); then savelist saveshow saverm search show sh-to-mod source swap switch\ test unload unuse use whatis" - opts="-D -h -s -v -V --debug --help --silent --verbose --version\ - --paginate --no-pager --color --color=" + opts="-D -h -s -T -v -V --debug --help --silent --trace --verbose\ + --version --paginate --no-pager --color --color=" load_opts="--auto --no-auto --force -f -i --icase" list_opts="-j -l -t --json --long --terse" clear_opts="--force -f" diff --git a/init/fish_completion b/init/fish_completion index 5eea53aa..cf1d4247 100644 --- a/init/fish_completion +++ b/init/fish_completion @@ -116,6 +116,7 @@ complete -f -n '__fish_module_no_subcommand' -c module -a 'config' --description complete -f -n '__fish_module_no_subcommand' -c module -a 'sh-to-mod' --description 'Make modulefile from script env changes' complete -c module -s V -l version --description 'Module version' +complete -c module -s T -l trace --description 'Enable trace and debug messages' complete -c module -s D -l debug --description 'Enable debug messages' complete -c module -s v -l verbose --description 'Enable verbose messages' complete -c module -s s -l silent --description 'Turn off error, warning and informational messages' diff --git a/init/tcsh_completion.in b/init/tcsh_completion.in index 059ef32d..5101a5d1 100644 --- a/init/tcsh_completion.in +++ b/init/tcsh_completion.in @@ -39,7 +39,7 @@ alias _module_modulepath 'echo ${MODULEPATH} | sed '"'"'s/:/\n/g;'"'"' ' set module_cmds = "add apropos aliases avail append-path clear config del display help initadd initclear initlist initprepend initrm is-loaded is-saved is-used is-avail info-loaded keyword list load path paths purge prepend-path refresh reload restore rm remove remove-path save savelist saveshow saverm search show sh-to-mod source swap switch test unload unuse use whatis" -set module_opts = "-D -h -s -v -V --debug --help --silent --verbose --version --paginate --no-pager --color --color=" +set module_opts = "-D -h -s -T -v -V --debug --help --silent --trace --verbose --version --paginate --no-pager --color --color=" set module_load_opts = "--auto --no-auto --force -f --icase -i" set module_list_opts = "-j -l -t --json --long --terse" set module_clear_opts = "--force -f" diff --git a/init/zsh-functions/_module.in b/init/zsh-functions/_module.in index b3b1cb52..b18d11be 100644 --- a/init/zsh-functions/_module.in +++ b/init/zsh-functions/_module.in @@ -89,6 +89,7 @@ _module() { typeset -A opt_args _arguments -C \ + '(-T --trace)'{-T,--trace}'[Enable trace and debug messages]' \ '(-D --debug)'{-D,--debug}'[Enable debug messages]' \ '(-v --verbose)'{-v,--verbose}'[Enable verbose messages]' \ '(-s --silent)'{-s,--silent}'[Turn off error, warning and informational messages]' \