init: add -T/--trace options to completion scripts

This commit is contained in:
Xavier Delaruelle
2020-05-10 22:28:03 +02:00
parent f2d280eb57
commit bc1373dffc
4 changed files with 7 additions and 5 deletions

View File

@@ -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"

View File

@@ -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'

View File

@@ -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"

View File

@@ -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]' \