From 15c89a5b188580aae5d4d89f69956f91d3236ed0 Mon Sep 17 00:00:00 2001 From: Paul Walko Date: Sat, 18 Nov 2017 10:07:28 -0500 Subject: [PATCH] fix term again --- zprofile | 1 - zshrc | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/zprofile b/zprofile index 4d9b2be..e713b1e 100644 --- a/zprofile +++ b/zprofile @@ -1,4 +1,3 @@ -export TERM=xterm-256color # Other settings xbindkeys &> /dev/null gpg2 --quiet --no-tty --batch -d $HOME/.mutt/passwords/dumb.gpg &> /dev/null diff --git a/zshrc b/zshrc index 84468de..2e79f5d 100644 --- a/zshrc +++ b/zshrc @@ -1,6 +1,21 @@ ### ZSH Config -## For local binaries (vim 8) +## Set TERM for proper colors +if [[ -z $TMUX ]]; then + if [ -e /usr/share/terminfo/x/xterm-256color ]; then # may be xterm-256 depending on your distro + export TERM='xterm-256color' + else + export TERM='xterm' + fi +else + if [ -e /usr/share/terminfo/s/screen-256color ]; then + export TERM='screen-256color' + else + export TERM='screen' + fi +fi + +### For local binaries (vim 8) export PATH=$HOME/.local/bin:$PATH ## Path to your oh-my-zsh installation.