From 453cb7f3674c102724538c3c7ff17d1fdd1cf67c Mon Sep 17 00:00:00 2001 From: eli Date: Sat, 24 Apr 2021 17:59:13 +0100 Subject: [PATCH] Fix issue with tmux.kak setting empty TMPDIR variable --- rc/windowing/tmux.kak | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rc/windowing/tmux.kak b/rc/windowing/tmux.kak index 420e6381..a57bc7c2 100644 --- a/rc/windowing/tmux.kak +++ b/rc/windowing/tmux.kak @@ -22,7 +22,11 @@ define-command -hidden -params 2.. tmux-terminal-impl %{ shift # ideally we should escape single ';' to stop tmux from interpreting it as a new command # but that's probably too rare to care - TMUX=$tmux tmux $tmux_args env TMPDIR="$TMPDIR" "$@" < /dev/null > /dev/null 2>&1 & + if [ -n "$TMPDIR" ]; then + TMUX=$tmux tmux $tmux_args env TMPDIR="$TMPDIR" "$@" < /dev/null > /dev/null 2>&1 & + else + TMUX=$tmux tmux $tmux_args "$@" < /dev/null > /dev/null 2>&1 & + fi } }