summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2014-10-27 23:04:47 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2014-10-27 23:04:47 -0700
commit84aa69fb0ddfa9219c46604a67d282eee3b94190 (patch)
treea692bc616996902d8af349c96c78139d6b4736bc /share
parent86980c298e2cdd4e29305f029a0bac5aaa6b2e75 (diff)
parentee528bc426c458b1dd774ae49fb7205eadcab7dd (diff)
downloadspack-84aa69fb0ddfa9219c46604a67d282eee3b94190.tar.gz
spack-84aa69fb0ddfa9219c46604a67d282eee3b94190.tar.bz2
spack-84aa69fb0ddfa9219c46604a67d282eee3b94190.tar.xz
spack-84aa69fb0ddfa9219c46604a67d282eee3b94190.zip
Release v0.8.10v0.8.10
Diffstat (limited to 'share')
-rw-r--r--share/spack/csh/spack.csh11
-rwxr-xr-xshare/spack/setup-env.sh7
2 files changed, 16 insertions, 2 deletions
diff --git a/share/spack/csh/spack.csh b/share/spack/csh/spack.csh
index 30c4ec1361..b21da23836 100644
--- a/share/spack/csh/spack.csh
+++ b/share/spack/csh/spack.csh
@@ -46,8 +46,17 @@ set _sp_spec=""
set _sp_modtype = ""
switch ($_sp_subcommand)
case cd:
+ shift _sp_args # get rid of 'cd'
+
+ set _sp_arg=""
+ [ $#_sp_args -gt 0 ] && set _sp_arg = ($_sp_args[1])
shift _sp_args
- cd `spack location $_sp_args`
+
+ if ( "$_sp_arg" == "-h" ) then
+ \spack cd -h
+ else
+ cd `\spack location $_sp_arg $_sp_args`
+ endif
breaksw
case use:
case unuse:
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index 6f56d4739b..91b1dc4630 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -76,7 +76,12 @@ function spack {
# command.
case $_sp_subcommand in
"cd")
- cd $(spack location "$@")
+ _sp_arg="$1"; shift
+ if [ "$_sp_arg" = "-h" ]; then
+ command spack cd -h
+ else
+ cd $(spack location $_sp_arg "$@")
+ fi
return
;;
"use"|"unuse"|"load"|"unload")