summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorvictorusu <victorusu@users.noreply.github.com>2021-12-17 10:05:32 +0100
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2021-12-23 16:02:09 +0100
commit17edf1ae90a9b56eb50ec002027a424bef58d97d (patch)
tree4c3a797f9b059e02253e8976752893a17ff40e01 /share
parent79fd1c5114e8aa7fb2d44a3f17c7b3dc1547cbcd (diff)
downloadspack-17edf1ae90a9b56eb50ec002027a424bef58d97d.tar.gz
spack-17edf1ae90a9b56eb50ec002027a424bef58d97d.tar.bz2
spack-17edf1ae90a9b56eb50ec002027a424bef58d97d.tar.xz
spack-17edf1ae90a9b56eb50ec002027a424bef58d97d.zip
Add setdefault option to tcl module (#14686)
This commit introduces the command spack module tcl setdefault <package> similar to the one already available for lmod Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/spack-completion.bash11
1 files changed, 10 insertions, 1 deletions
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"
}