Skip to content

Commit 2476f3f

Browse files
author
Bruno Sutic
committed
Fix option for tmux 2.0+
1 parent 3ea5b9f commit 2476f3f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### master
44
- update to support \*THE\* latest tmux version
55
- bugfix for `prefix + R` key binding
6+
- fix for tmux 2.0 `default-terminal` option (thanks @kwbr)
67

78
### v2.2.0, 2015-02-10
89
- bugfix in `key_binding_not_set`: the regex is now properly detecting key

sensible.tmux

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,14 @@ main() {
101101
tmux set-option -g default-command "reattach-to-user-namespace -l $SHELL"
102102
fi
103103

104-
# upgrade $TERM
104+
# upgrade $TERM, tmux 1.9
105105
if option_value_not_changed "default-terminal" "screen"; then
106106
tmux set-option -g default-terminal "screen-256color"
107107
fi
108+
# upgrade $TERM, tmux 2.0+
109+
if server_option_value_not_changed "default-terminal" "screen"; then
110+
tmux set-option -s default-terminal "screen-256color"
111+
fi
108112

109113
# emacs key bindings in tmux command prompt (prefix + :) are better than
110114
# vi keys, even for vim users

0 commit comments

Comments
 (0)