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.
This commit is contained in:
parent
7ddbc9bc87
commit
df8ee438e5
@ -336,7 +336,7 @@ fi;
|
|||||||
_sp_multi_pathadd() {
|
_sp_multi_pathadd() {
|
||||||
local IFS=':'
|
local IFS=':'
|
||||||
if [ "$_sp_shell" = zsh ]; then
|
if [ "$_sp_shell" = zsh ]; then
|
||||||
setopt sh_word_split
|
emulate -L sh
|
||||||
fi
|
fi
|
||||||
for pth in $2; do
|
for pth in $2; do
|
||||||
for systype in ${_sp_compatible_sys_types}; do
|
for systype in ${_sp_compatible_sys_types}; do
|
||||||
|
Loading…
Reference in New Issue
Block a user