aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash/bashrc9
-rw-r--r--tmux/tmux.conf1
2 files changed, 10 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}"
diff --git a/tmux/tmux.conf b/tmux/tmux.conf
index 673ca076..f9daaea2 100644
--- a/tmux/tmux.conf
+++ b/tmux/tmux.conf
@@ -64,6 +64,7 @@ if-shell 'test `tput colors` -eq 256' 'set-window-option -g window-status-curren
if-shell 'test `tput colors` -eq 256' 'set-window-option -g window-status-format "#[fg=colour16]#I:#W#F"'
# Terminal
+CONTAINING_TERM=$TERM
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
set-option -s escape-time 0
if-shell 'test `tput colors` -eq 256' 'set-option -g default-terminal "screen-256color"'