summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMatthias Diener <matthias.diener@gmail.com>2018-12-15 19:47:05 -0600
committerTodd Gamblin <tgamblin@llnl.gov>2018-12-15 17:47:05 -0800
commit9f528ccba0a03a9338c9124c1bcbf08f033e754d (patch)
tree6009d5f59b6bcff97690b07ba09ed39e876129a4 /share
parent87615d54ccd3691518eb16c14ef3b19c2a9a858a (diff)
downloadspack-9f528ccba0a03a9338c9124c1bcbf08f033e754d.tar.gz
spack-9f528ccba0a03a9338c9124c1bcbf08f033e754d.tar.bz2
spack-9f528ccba0a03a9338c9124c1bcbf08f033e754d.tar.xz
spack-9f528ccba0a03a9338c9124c1bcbf08f033e754d.zip
env setup: support --help for cd/env commands (#10069)
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/setup-env.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index 79688455bf..ce6efc66ef 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -77,7 +77,7 @@ function spack {
_sp_arg="$1"
shift
fi
- if [ "$_sp_arg" = "-h" ]; then
+ if [[ "$_sp_arg" = "-h" || "$_sp_arg" = "--help" ]]; then
command spack cd -h
else
LOC="$(spack location $_sp_arg "$@")"
@@ -96,7 +96,7 @@ function spack {
shift
fi
- if [ "$_sp_arg" = "-h" ]; then
+ if [[ "$_sp_arg" = "-h" || "$_sp_arg" = "--help" ]]; then
command spack env -h
else
case $_sp_arg in