From b6d055a87b94602986a9a68a783a5a2061741731 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Sun, 9 Apr 2017 09:16:56 +0300 Subject: [PATCH] rc: Export $TMPDIR to new `tmux` processes `tmux` will start new processes (e.g. when creating panes or windows) with the same environment it was started with, which means that if the $TMPDIR variable was overriden for the kakoune server from within `tmux`, newly created panes/windows won't have access to the server socket to sustain a session. This commit fixes the issue by always exporting the $TMPDIR variable from the parent `tmux` environment to the new processes. Fixes #1319 --- rc/base/tmux.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/base/tmux.kak b/rc/base/tmux.kak index ba555533..3bdcd364 100644 --- a/rc/base/tmux.kak +++ b/rc/base/tmux.kak @@ -24,7 +24,7 @@ def -hidden -params 1.. tmux-new-impl %{ tmux_args="$1" shift if [ $# -ne 0 ]; then kakoune_params="-e '$@'"; fi - TMUX=$tmux tmux $tmux_args "kak -c ${kak_session} ${kakoune_params}" < /dev/null > /dev/null 2>&1 & + TMUX=$tmux tmux $tmux_args "TMPDIR='${TMPDIR}' kak -c ${kak_session} ${kakoune_params}" < /dev/null > /dev/null 2>&1 & } }