From 39763dece19184336b84ef6db41826baefe1e297 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 7 Jun 2012 23:39:48 +1200 Subject: Work around race condition bug in tmux It looks like tmux doesn't wait for me to finish defining my default-terminal before it opens up my new shell. This means the first window of my new tmux sessions usually humbly thinks it only has eight colours. This seems to be a known bug in tmux, so for the moment I'm just working around it with an environment variable with which .bashrc will deal. --- bash/bashrc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bash') diff --git a/bash/bashrc b/bash/bashrc index 569b56be..1f48ffc1 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -119,6 +119,15 @@ case "$TERM" in xterm*) PS1='\[\e]0;\h\a\]'${PS1};; esac +# If we're a screen terminal within a 256 color outer, force a 256 color +# screen terminal too. This deals with a tmux race condition bug. +case "$CONTAINING_TERM" in + *256color) + TERM=screen-256color + unset CONTAINING_TERM + ;; +esac + # Alias ls and grep with the options we've collected. alias ls="ls ${LS_OPTS}" alias grep="grep ${GREP_OPTS}" -- cgit v1.2.3