From de1031a7d43aeb355482890159f53437094bf7a9 Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Mon, 23 Jan 2023 16:11:34 +0100 Subject: [PATCH] make sure to use /usr/bin/infocmp to probe if tmux-256color is available system wide (3), fixes #618 infocmp may not exist or may return a non 0 exit status which would abort _apply_configuration() because of set -e --- .tmux.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index a81f736..6de9c24 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -694,10 +694,14 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' # # on macOS though, make sure to use /usr/bin/infocmp to probe if it's availalbe system wide # case "$uname_s" in # *Darwin*) -# /usr/bin/infocmp -x tmux-256color > /dev/null 2>&1 && tmux set -g default-terminal 'tmux-256color' +# if /usr/bin/infocmp -x tmux-256color > /dev/null 2>&1; then +# tmux set -g default-terminal 'tmux-256color' +# fi # ;; # *) -# command infocmp -x tmux-256color > /dev/null 2>&1 && tmux set -g default-terminal 'tmux-256color' +# if command infocmp -x tmux-256color > /dev/null 2>&1; then +# tmux set -g default-terminal 'tmux-256color' +# fi # ;; # esac # }