Fix byobu-reconnect-sockets for zsh by setting sh_word_split locally.

This commit is contained in:
Daniel Hahler 2012-01-31 13:07:58 +01:00
commit 4948c9c616

View file

@ -57,8 +57,10 @@ export_and_send () {
screen_update () {
# Ensure that screen's environment variables/values get propagated here
# Enable word splitting for zsh:
[ "x$ZSH_VERSION" != x ] && setopt local_options sh_word_split
tempfile=$(mktemp -q) && {
for var in $(echo $VARS_TO_UPDATE); do
for var in $VARS_TO_UPDATE; do
screen sh -c "echo export $var=\$$var >> \"$tempfile\""
done
. "$tempfile"
@ -68,7 +70,9 @@ screen_update () {
tmux_update () {
# Ensure that tmux's environment variables/values get propagated here
for var in $(echo $VARS_TO_UPDATE); do
# Enable word splitting for zsh:
[ "x$ZSH_VERSION" != x ] && setopt local_options sh_word_split
for var in $VARS_TO_UPDATE; do
expr="$(tmux showenv | grep "^$var=")"
if [ -n "$expr" ]; then
export "$expr"