From a07b773348abe30d019778f766cc6ea2274fb2da Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Fri, 2 Aug 2019 23:12:37 -0400 Subject: [PATCH] tmux: fix conditional TERM setting on Debian As noted in the below issue, the 'if-shell' command runs /bin/sh, which, on Arch, is bash, but on Debian, is dash (no [[ ]] support). https://github.com/tmux/tmux/issues/1791 This then just silently fails and doesn't set the terminal properly. The fix is to to just hardcode a call to bash :) --- tmux/tmux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 7281169..edb06b4 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -11,7 +11,7 @@ unbind % # Set the default terminal in a smart fashion set default-terminal screen # More support for "screen" than "tmux" -if "[[ ${TERM} =~ 256color ]]" 'set default-terminal screen-256color' +if "bash -c '[[ $TERM =~ 256color ]]'" 'set default-terminal screen-256color' # new window same directory bind c new-window -c "#{pane_current_path}" -- libgit2 0.28.4