env setup: support --help for cd/env commands (#10069)

This commit is contained in:
Matthias Diener 2018-12-15 19:47:05 -06:00 committed by Todd Gamblin
parent 87615d54cc
commit 9f528ccba0

View File

@ -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