summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/setup-env.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index 207e9c4a80..c3d9ef260c 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -212,7 +212,8 @@ _spack_determine_shell() {
# If procfs is present this seems a more reliable
# way to detect the current shell
_sp_exe=$(readlink /proc/$$/exe)
- basename ${_sp_exe}
+ # Shell may contain number, like zsh5 instead of zsh
+ basename ${_sp_exe} | tr -d '0123456789'
elif [ -n "${BASH:-}" ]; then
echo bash
elif [ -n "${ZSH_NAME:-}" ]; then