summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2014-07-25 19:39:10 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2014-08-11 22:47:23 -0700
commitabc7d401e2d411642a9cc2b1de96990da2d17c63 (patch)
tree80d17ea9a8e8d2f5db008131d2fedc65d3ea2893 /share
parent5a3803de39a67a42a70b4048039c77c4831633b2 (diff)
downloadspack-abc7d401e2d411642a9cc2b1de96990da2d17c63.tar.gz
spack-abc7d401e2d411642a9cc2b1de96990da2d17c63.tar.bz2
spack-abc7d401e2d411642a9cc2b1de96990da2d17c63.tar.xz
spack-abc7d401e2d411642a9cc2b1de96990da2d17c63.zip
Add "spack cd" shell support to cd directly into the staged archive.
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/setup-env.bash4
1 files changed, 4 insertions, 0 deletions
diff --git a/share/spack/setup-env.bash b/share/spack/setup-env.bash
index e22a259167..53c53dfee5 100755
--- a/share/spack/setup-env.bash
+++ b/share/spack/setup-env.bash
@@ -65,6 +65,10 @@ function spack {
# Filter out use and unuse. For any other commands, just run the
# command.
case $_spack_subcommand in
+ "cd")
+ cd $(spack stage -b "$@")
+ return
+ ;;
"use") ;;
"unuse") ;;
*)