summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorTom Scogland <scogland1@llnl.gov>2020-01-14 13:32:57 -1000
committerTodd Gamblin <tgamblin@llnl.gov>2020-01-14 15:32:57 -0800
commitdf8ee438e5c1b4abea28e0db4553b9854b3767c6 (patch)
tree9152351ee39f4cd023b9069c04de0e389235e54e /share
parent7ddbc9bc871d681806873b8ae57273f20807e01d (diff)
downloadspack-df8ee438e5c1b4abea28e0db4553b9854b3767c6.tar.gz
spack-df8ee438e5c1b4abea28e0db4553b9854b3767c6.tar.bz2
spack-df8ee438e5c1b4abea28e0db4553b9854b3767c6.tar.xz
spack-df8ee438e5c1b4abea28e0db4553b9854b3767c6.zip
stop word splitting from leaking out of setup-env (#14472)
The pathadd function was using setopt to configure zsh for word splitting, which leaks out of the function and breaks default functionality in a number of external zsh plugins and packages. This switches to emulate -L, just as the spack function uses, to keep the setting local to the function.
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/setup-env.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index a59f5120b3..23a29ce6a2 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -336,7 +336,7 @@ fi;
_sp_multi_pathadd() {
local IFS=':'
if [ "$_sp_shell" = zsh ]; then
- setopt sh_word_split
+ emulate -L sh
fi
for pth in $2; do
for systype in ${_sp_compatible_sys_types}; do