David542
David542

Reputation: 110382

tmux color profile (-2) when starting in iterm2 or other places

I am using iTerm2 with tmux and invoke it by doing:

tmux -CC new -s MySession

I was wondering if there is any use in doing something like -2 when invoking tmux in iTerm2, or if that takes care of all of the color-profiles,

tmux -2 -CC new -s MySession

Actually, to take that a step further, when does the -2 option have any significance? It seems like often when I invoke tmux on a linux server that the profile is already doing -2 (perhaps in the tmux.conf) -- is there a way to know if -2 will affect the default tmux session?

Upvotes: 0

Views: 218

Answers (1)

chepner
chepner

Reputation: 531808

If tmux can determine (via $TERM and terminfo/termcap/etc) that your terminal supports 256 colors, -2 isn't necessary. The option allows tmux to assume 256 colors are support when the terminal doesn't advertise the capability correctly.

Upvotes: 0

Related Questions