summaryrefslogtreecommitdiff
path: root/share/spack/setup-env.sh
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2017-02-06 14:34:35 -0600
committerTodd Gamblin <tgamblin@llnl.gov>2017-02-06 12:34:35 -0800
commit941dfcbe43c7d2af4d842b2f07b3eac140448903 (patch)
treeecf0fe1e5e583f7417e924fdab4dbf8201b0e999 /share/spack/setup-env.sh
parentd78a35bb548566ddfc5c60079ac7b2cc1361aab9 (diff)
downloadspack-941dfcbe43c7d2af4d842b2f07b3eac140448903.tar.gz
spack-941dfcbe43c7d2af4d842b2f07b3eac140448903.tar.bz2
spack-941dfcbe43c7d2af4d842b2f07b3eac140448903.tar.xz
spack-941dfcbe43c7d2af4d842b2f07b3eac140448903.zip
Bash Programmable Completion for Spack (#3026)
Diffstat (limited to 'share/spack/setup-env.sh')
-rwxr-xr-xshare/spack/setup-env.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index 24ab3dae6f..a67ae04b24 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -198,3 +198,10 @@ _sp_dotkit_root=$(spack-python -c "print(spack.util.path.canonicalize_path(spack
_sp_tcl_root=$(spack-python -c "print(spack.util.path.canonicalize_path(spack.config.get_config('config').get('module_roots', {}).get('tcl')))")
_spack_pathadd DK_NODE "${_sp_dotkit_root%/}/$_sp_sys_type"
_spack_pathadd MODULEPATH "${_sp_tcl_root%/}/$_sp_sys_type"
+
+#
+# Add programmable tab completion for Bash
+#
+if [ -n "${BASH_VERSION:-}" ]; then
+ source $_sp_share_dir/spack-completion.bash
+fi