gpakosz / .tmux

🇫🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤️
MIT License
21.73k stars 3.34k forks source link

Cannot change `$TERM` variable #651

Closed lime-desu closed 1 year ago

lime-desu commented 1 year ago

I have this code set on my .tmux.conf.local

set -g default-terminal "xterm-256color"

This should override the default tmux-256 colors, but it isn't working on mine. The variable doesn't get override:

❯ echo $TERM
tmux-256color

Perhaps a bug or there's something wrong with my tmux config?

Though, setting this line explicitly on.zshrc fixes my problem

[[ "$TERM_PROGRAM" == tmux ]] && export TERM=xterm-256color
gpakosz commented 1 year ago

Hello @lime-desu 👋

Inside tmux, TERM should not be xterm-256color, see tmux documentation.

That being said, you can use

set -g default-terminal "screen-256color" #!important
lime-desu commented 1 year ago

Hello @lime-desu wave

Inside tmux, TERM should not be xterm-256color, see tmux documentation.

Hi! Oh what I mean is i'm trying to change the tmux-256 $TERM into xterm-256

That being said, you can use

set -g default-terminal "screen-256color" #!important

Yeah, thank you very for this! Adding the #!important should take precedence.

I'll be closing this as resolved Also a dup of #643 (haven't notice since its closed)