summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorvictorusu <victorusu@users.noreply.github.com>2021-12-17 10:05:32 +0100
committerGitHub <noreply@github.com>2021-12-17 10:05:32 +0100
commit18615b14852c70d404dfa6be78e6407d1d77e0c0 (patch)
treef1244b0d987f9f83e857f1be11329ca3f621d5ef /share
parentf754ed978885fc7224586a0f0ebbc657ea62f8d2 (diff)
downloadspack-18615b14852c70d404dfa6be78e6407d1d77e0c0.tar.gz
spack-18615b14852c70d404dfa6be78e6407d1d77e0c0.tar.bz2
spack-18615b14852c70d404dfa6be78e6407d1d77e0c0.tar.xz
spack-18615b14852c70d404dfa6be78e6407d1d77e0c0.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 aef01fe8a1..ae2b2e5b2f 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -1373,7 +1373,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
}
@@ -1413,6 +1413,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"
}