Skip to content

Commit 19c53fc

Browse files
committed
init: add update subcmd to completion scripts
Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent cdde9e7 commit 19c53fc

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

init/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ quarvarsre += s/@.*RUNENV_VAR.*@//;'
118118
endif
119119

120120
# define variables for shell completion
121-
comp_cmds := add add-any apropos aliases avail append-path cachebuild cacheclear 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 spider stash stashclear stashlist stashpop stashrm stashshow state swap switch test try-add try-load unload unuse use whatis
121+
comp_cmds := add add-any apropos aliases avail append-path cachebuild cacheclear 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 spider stash stashclear stashlist stashpop stashrm stashshow state swap switch test try-add try-load unload unuse update use whatis
122122
comp_long_opts := --debug --dumpname --help --silent --trace --verbose --version --paginate --no-pager --color --color= --width --width= --ignore-cache --ignore-user-rc
123123
comp_opts := -D -h -s -T -v -V -w $(comp_long_opts)
124124
comp_load_opts := --auto --no-auto --force -f --icase -i --tag --tag=

init/bash_completion.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ _module() {
107107
apropos|keyword|search)
108108
COMPREPLY=( $(compgen -W "@comp_search_opts@" -- "$cur") );;
109109
config|--reset) COMPREPLY=( $(compgen -W "@comp_config_opts@" -- "$cur") );;
110-
-h|--help|-V|--version|--dumpname|purge|refresh|reload|sh-to-mod|source|state|reset|stash|stashclear|cacheclear)
110+
-h|--help|-V|--version|--dumpname|purge|refresh|reload|sh-to-mod|source|state|reset|stash|stashclear|cacheclear|update)
111111
;;
112112
append-path|prepend-path)
113113
COMPREPLY=( $(compgen -W "@comp_path_opts@" -- "$cur") );;
@@ -170,7 +170,7 @@ if type -t ml >/dev/null; then
170170
apropos|keyword|search)
171171
COMPREPLY=( $(compgen -W "@comp_search_opts@" -- "$cur") );;
172172
config|--reset) COMPREPLY=( $(compgen -W "@comp_config_opts@" -- "$cur") );;
173-
-h|--help|-V|--version|--dumpname|purge|refresh|reload|sh-to-mod|source|state|reset|stash|stashclear|cacheclear)
173+
-h|--help|-V|--version|--dumpname|purge|refresh|reload|sh-to-mod|source|state|reset|stash|stashclear|cacheclear|update)
174174
;;
175175
append-path|prepend-path)
176176
COMPREPLY=( $(compgen -W "@comp_path_opts@" -- "$cur") );;

init/fish_completion

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
function __fish_module_no_subcommand --description 'Test if modulecmd has yet to be given the subcommand'
44
for i in (commandline -opc)
5-
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 stashlist 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 cachebuild cacheclear spider
5+
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 stashlist 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 cachebuild cacheclear spider update
66
return 1
77
end
88
end
@@ -107,7 +107,7 @@ complete -f -n '__fish_module_no_subcommand' -c module -a 'use' --description 'A
107107
complete -f -n '__fish_module_no_subcommand' -c module -a 'unuse' --description 'Remove dir(s) from MODULEPATH variable'
108108
complete -f -n '__fish_module_no_subcommand' -c module -a 'is-used' --description 'Is any of the dir(s) enabled in MODULEPATH'
109109
complete -f -n '__fish_module_no_subcommand' -c module -a 'refresh' --description 'Refresh volatile components of loaded modulefiles'
110-
complete -f -n '__fish_module_no_subcommand' -c module -a 'reload' --description 'Unload then load all loaded modulefiles'
110+
complete -f -n '__fish_module_no_subcommand' -c module -a 'reload update' --description 'Unload then load all loaded modulefiles'
111111
complete -f -n '__fish_module_no_subcommand' -c module -a 'purge' --description 'Unload all loaded modulefiles'
112112
complete -f -n '__fish_module_no_subcommand' -c module -a 'source' --description 'Execute scriptfile(s)'
113113
complete -f -n '__fish_module_no_subcommand' -c module -a 'whatis' --description 'Print whatis information of modulefile(s)'

init/tcsh_completion.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ complete module 'C,/*,f,' 'C,.*,f,' 'C,~/*,f,' \
7171
'n/purge/n/' \
7272
'n/refresh/n/' \
7373
'n/reload/n/' \
74+
'n/update/n/' \
7475
'n/whatis/`_module_avail; echo "@comp_whatis_opts@"`/' \
7576
"n/apropos/(@comp_search_opts@)/" \
7677
"n/search/(@comp_search_opts@)/" \

init/zsh-functions/_module.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ _module() {
152152
'unload:Remove modulefile(s)'
153153
'purge:Unload all loaded modulefiles'
154154
'reload:Unload then load all loaded modulefiles'
155+
'update:Unload then load all loaded modulefiles'
155156
'refresh:Refresh volatile components of loaded modulefiles'
156157
'switch:Unload mod1 and load mod2'
157158
'swap:Unload mod1 and load mod2'

0 commit comments

Comments
 (0)