diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2012-06-07 23:39:48 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2012-06-07 23:39:48 +1200 |
commit | 39763dece19184336b84ef6db41826baefe1e297 (patch) | |
tree | e2e5cb56cb00c66bd94bc9f6b4b0763c570ee78e /bash/bashrc | |
parent | Use colorcolumn limit in Markdown if available (diff) | |
download | dotfiles-39763dece19184336b84ef6db41826baefe1e297.tar.gz dotfiles-39763dece19184336b84ef6db41826baefe1e297.zip |
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.
Diffstat (limited to 'bash/bashrc')
-rw-r--r-- | bash/bashrc | 9 |
1 files changed, 9 insertions, 0 deletions
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}" |