tmux下make menuconfig背景色不正常问题

参考https://blog.tankywoo.com/2015/10/24/tmux-mutt-not-redraw-problem.html

 

是由于~/.bashrc或~/.zshrc设置,覆盖了tmux设置造成的

在~/.bashrc和~/.zshrc中,不要直接使用

export TERM=xterm-256color

而是使用

if [ -z "$TMUX" ] && [[ "$TERM" =~ "xterm" ]]; then
    if [ -e /usr/share/terminfo/*/xterm-256color ]; then
        echo "1"
        export TERM='xterm-256color'
    else
        echo "2"
        export TERM='xterm-color'
    fi
elif [ -n "$TMUX" ]; then
    if [ -e /usr/share/terminfo/*/screen-256color ]; then
        echo "3"
        export TERM='screen-256color'
    else
        echo "4"
        export TERM='screen'
    fi
fi

即可

你可能感兴趣的:(tmux下make menuconfig背景色不正常问题)