tmux-plugins / tmux-sensible

basic tmux settings everyone can agree on
MIT License
1.73k stars 90 forks source link

default-terminal is a server option #23

Closed kwbr closed 9 years ago

kwbr commented 9 years ago

At least in tmux 2.0 default-terminal is a server option

$ tmux show-options -s
default-terminal "screen"

So the code to upgrade the default terminal is a no-op.

Besides that, maybe the ArchWiki's recommendation makes sense: https://wiki.archlinux.org/index.php/Tmux#Correct_the_TERM_variable_according_to_terminal_type

bruno- commented 9 years ago

Hey, thanks for pointing this out. Yes, I can confirm default-terminal option wasn't set up properly on tmux 2.0. This is now fixed in 2476f3fb23947e4772fc724d8fedc08a49c60249 (it's also backwards compatible with tmux 1.9).

All this various option types are frustrating. Here's the example with tmux 2.0:

tmux show -g default-terminal                         #=> empty
tmux show -s default-terminal                         #=> screen
tmux set -g default-terminal "screen-256color"        # this should have no effect
tmux show -g default-terminal                         #=> empty
tmux show -s default-terminal                         #=> screen-256color (how??)

So it seems setting the -g default-terminal still works, even though it's a server option.

I'm not sure about the ArchWiki recommendation.. I think whoever uses tmux plugins won't have issues with 256 colors. We can add that logic if someone has "real" practical issues with this.