dotfiles

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

commit 5de737e6c9efffffa4ea64b0a73c8bc303b1bd41 (patch)
parent e29a567ffd25de6a98bde9d5e4402d3e6de46008
Author: Alex Karle <alex@karle.co>
Date:   Thu,  5 Mar 2020 23:44:29 -0500

tmux: detect 256color terminal when bash not installed

The previous 256color detection relied on using bash, which isn't
installed by default on OpenBSD (I've been using ksh for a "native"
experience...)

No reason it needs to (although it was marginally cleaner). Replaced
with a direct call to `test`.

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

diff --git a/tmux/tmux.conf b/tmux/tmux.conf @@ -12,7 +12,8 @@ set -g set-clipboard off # Use xclip over escape-code-clipboard #1119 # Set default term based on $TERM set default-terminal screen # More support for "screen" than "tmux" -if "bash -c '[[ $TERM =~ 256color ]]'" 'set default-terminal screen-256color' +if "test $TERM = 'st-256color' -o $TERM = 'xterm-256color'" \ + 'set default-terminal screen-256color' #----------#