From 17edf1ae90a9b56eb50ec002027a424bef58d97d Mon Sep 17 00:00:00 2001 From: victorusu Date: Fri, 17 Dec 2021 10:05:32 +0100 Subject: Add setdefault option to tcl module (#14686) This commit introduces the command spack module tcl setdefault similar to the one already available for lmod Co-authored-by: Massimiliano Culpo --- share/spack/spack-completion.bash | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'share') diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index c7e4d10197..b41a21946c 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -1382,7 +1382,7 @@ _spack_module_tcl() { then SPACK_COMPREPLY="-h --help -n --name" else - SPACK_COMPREPLY="refresh find rm loads" + SPACK_COMPREPLY="refresh find rm loads setdefault" fi } @@ -1422,6 +1422,15 @@ _spack_module_tcl_loads() { fi } +_spack_module_tcl_setdefault() { + if $list_options + then + SPACK_COMPREPLY="-h --help" + else + _installed_packages + fi +} + _spack_monitor() { SPACK_COMPREPLY="-h --help --monitor --monitor-save-local --monitor-no-auth --monitor-tags --monitor-keep-going --monitor-host --monitor-prefix" } -- cgit v1.2.3-60-g2f50