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
This commit is contained in:
parent
79faae8546
commit
b6d055a87b
|
@ -24,7 +24,7 @@ def -hidden -params 1.. tmux-new-impl %{
|
||||||
tmux_args="$1"
|
tmux_args="$1"
|
||||||
shift
|
shift
|
||||||
if [ $# -ne 0 ]; then kakoune_params="-e '$@'"; fi
|
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 &
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user