dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | Submodules | README

commit a07b773348abe30d019778f766cc6ea2274fb2da (patch)
parent b562962c77007cae44ae5c3900b74d6b9383d883
Author: Alex Karle <alex@karle.co>
Date:   Fri,  2 Aug 2019 23:12:37 -0400

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 :)

Diffstat:
Mtmux/tmux.conf | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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}"