diff --git a/init/Makefile b/init/Makefile index 22accff2b..af75b9484 100644 --- a/init/Makefile +++ b/init/Makefile @@ -115,7 +115,7 @@ quarvarsre += s/@.*RUNENV_VAR.*@//;' endif # define variables for shell completion -comp_cmds := add add-any apropos aliases avail append-path clear config del display edit help initadd initclear initlist initprepend initrm is-loaded is-saved is-used is-avail info-loaded keyword lint list load load-any mod-to-sh path paths purge prepend-path refresh reload reset restore rm remove remove-path save savelist saveshow saverm search show sh-to-mod source stash stashpop stashrm stashshow state swap switch test try-add try-load unload unuse use whatis +comp_cmds := add add-any apropos aliases avail append-path clear config del display edit help initadd initclear initlist initprepend initrm is-loaded is-saved is-used is-avail info-loaded keyword lint list load load-any mod-to-sh path paths purge prepend-path refresh reload reset restore rm remove remove-path save savelist saveshow saverm search show sh-to-mod source stash stashclear stashpop stashrm stashshow state swap switch test try-add try-load unload unuse use whatis comp_opts := -D -h -s -T -v -V -w --debug --help --silent --trace --verbose --version --paginate --no-pager --color --color= --width --width= comp_load_opts := --auto --no-auto --force -f --icase -i --tag --tag= comp_unload_opts := --auto --no-auto --force -f --icase -i diff --git a/init/bash_completion.in b/init/bash_completion.in index 5c3f1e727..4425291ef 100644 --- a/init/bash_completion.in +++ b/init/bash_completion.in @@ -88,7 +88,7 @@ _module() { apropos|keyword|search) COMPREPLY=( $(compgen -W "@comp_search_opts@" -- "$cur") );; config|--reset) COMPREPLY=( $(compgen -W "@comp_config_opts@" -- "$cur") );; - -h|--help|-V|--version|purge|refresh|reload|sh-to-mod|source|state|reset|stash|stashpop|stashrm|stashshow) + -h|--help|-V|--version|purge|refresh|reload|sh-to-mod|source|state|reset|stash|stashclear|stashpop|stashrm|stashshow) ;; append-path|prepend-path) COMPREPLY=( $(compgen -W "@comp_path_opts@" -- "$cur") );; @@ -147,7 +147,7 @@ if $(type -t ml >/dev/null); then apropos|keyword|search) COMPREPLY=( $(compgen -W "@comp_search_opts@" -- "$cur") );; config|--reset) COMPREPLY=( $(compgen -W "@comp_config_opts@" -- "$cur") );; - -h|--help|-V|--version|purge|refresh|reload|sh-to-mod|source|state|reset|stash|stashpop|stashrm|stashshow) + -h|--help|-V|--version|purge|refresh|reload|sh-to-mod|source|state|reset|stash|stashclear|stashpop|stashrm|stashshow) ;; append-path|prepend-path) COMPREPLY=( $(compgen -W "@comp_path_opts@" -- "$cur") );; diff --git a/init/fish_completion b/init/fish_completion index c9e14c8f6..dccce97f1 100644 --- a/init/fish_completion +++ b/init/fish_completion @@ -2,7 +2,7 @@ function __fish_module_no_subcommand --description 'Test if modulecmd has yet to be given the subcommand' for i in (commandline -opc) - if contains -- $i add add-any load load-any try-add try-load rm remove del unload swap switch show display lint list avail is-loaded is-saved is-used is-avail info-loaded aliases use unuse refresh reload purge source whatis apropos keyword search test save reset restore saverm saveshow savelist stash stashpop stashrm stashshow initadd initprepend initrm initswitch initlist initclear path paths append-path prepend-path remove-path clear config sh-to-mod edit state mod-to-sh + if contains -- $i add add-any load load-any try-add try-load rm remove del unload swap switch show display lint list avail is-loaded is-saved is-used is-avail info-loaded aliases use unuse refresh reload purge source whatis apropos keyword search test save reset restore saverm saveshow savelist stash stashclear stashpop stashrm stashshow initadd initprepend initrm initswitch initlist initclear path paths append-path prepend-path remove-path clear config sh-to-mod edit state mod-to-sh return 1 end end @@ -114,6 +114,7 @@ complete -f -n '__fish_module_no_subcommand' -c module -a 'lint' --description ' complete -f -n '__fish_module_no_subcommand' -c module -a 'mod-to-sh' --description 'Make shell code from modulefile env changes' complete -f -n '__fish_module_no_subcommand' -c module -a 'reset' --description 'Restore initial environment' complete -f -n '__fish_module_no_subcommand' -c module -a 'stash' --description 'Save current environment and reset' +complete -f -n '__fish_module_no_subcommand' -c module -a 'stashclear' --description 'Remove all stash collections' complete -f -n '__fish_module_no_subcommand' -c module -a 'stashpop' --description 'Restore then remove stash collection' complete -f -n '__fish_module_no_subcommand' -c module -a 'stashrm' --description 'Remove stash collection' complete -f -n '__fish_module_no_subcommand' -c module -a 'stashshow' --description 'Display information about stash collection' diff --git a/init/tcsh_completion.in b/init/tcsh_completion.in index 2cff06bf5..41062c5cb 100644 --- a/init/tcsh_completion.in +++ b/init/tcsh_completion.in @@ -84,6 +84,7 @@ complete module 'n/help/`_module_avail`/' \ 'n/mod-to-sh/`_module_not_yet_loaded; echo "@comp_modtosh_opts@"`/' \ "n/reset/n/" \ "n/stash/n/" \ + "n/stashclear/n/" \ "n/stashpop/n/" \ "n/stashrm/n/" \ "n/stashshow/n/" \ diff --git a/init/zsh-functions/_module.in b/init/zsh-functions/_module.in index c79c92941..02dabd7e8 100644 --- a/init/zsh-functions/_module.in +++ b/init/zsh-functions/_module.in @@ -158,6 +158,7 @@ _module() { 'mod-to-sh:Make shell code from modulefile env changes' 'reset:Restore initial environment' 'stash:Save current environment and reset' + 'stashclear:Remove all stash collections' 'stashpop:Restore then remove stash collection' 'stashrm:Remove stash collection' 'stashshow:Display information about stash collection'