summaryrefslogtreecommitdiff
path: root/share/spack/setup-env.sh
diff options
context:
space:
mode:
authorTodd Gamblin <gamblin2@llnl.gov>2021-11-05 00:58:29 -0700
committerGitHub <noreply@github.com>2021-11-05 00:58:29 -0700
commite13e697067d004107655bc206ac18e9191abf26c (patch)
tree724b5376f128221c6482688d9ae5939185d361b4 /share/spack/setup-env.sh
parentbfbf9deb749687b3bc4700f11ee6faeb41615403 (diff)
downloadspack-e13e697067d004107655bc206ac18e9191abf26c.tar.gz
spack-e13e697067d004107655bc206ac18e9191abf26c.tar.bz2
spack-e13e697067d004107655bc206ac18e9191abf26c.tar.xz
spack-e13e697067d004107655bc206ac18e9191abf26c.zip
commands: `spack load --list` alias for `spack find --loaded` (#27184)
See #25249 and https://github.com/spack/spack/pull/27159#issuecomment-958163679. This adds `spack load --list` as an alias for `spack find --loaded`. The new command is not as powerful as `spack find --loaded`, as you can't combine it with all the queries or formats that `spack find` provides. However, it is more intuitively located in the command structure in that it appears in the output of `spack load --help`. The idea here is that people can use `spack load --list` for simple stuff but fall back to `spack find --loaded` if they need more. - add help to `spack load --list` that references `spack find` - factor some parts of `spack find` out to be called from `spack load` - add shell tests - update docs Co-authored-by: Peter Josef Scheibel <scheibel1@llnl.gov> Co-authored-by: Richarda Butler <39577672+RikkiButler20@users.noreply.github.com>
Diffstat (limited to 'share/spack/setup-env.sh')
-rwxr-xr-xshare/spack/setup-env.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index eb364a3809..5136e8a58a 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -180,6 +180,7 @@ _spack_shell_wrapper() {
if [ "${_a#* --sh}" != "$_a" ] || \
[ "${_a#* --csh}" != "$_a" ] || \
[ "${_a#* -h}" != "$_a" ] || \
+ [ "${_a#* --list}" != "$_a" ] || \
[ "${_a#* --help}" != "$_a" ];
then
# Args contain --sh, --csh, or -h/--help: just execute.