From 9f528ccba0a03a9338c9124c1bcbf08f033e754d Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Sat, 15 Dec 2018 19:47:05 -0600 Subject: env setup: support --help for cd/env commands (#10069) --- share/spack/setup-env.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'share') 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 -- cgit v1.2.3-60-g2f50