From 1fedf1b94154dca4642c7ccee36b1024b5959051 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 31 Jul 2017 14:19:05 -0700 Subject: [PATCH] [shell] Don't reset TERM value if its set to dumb This fixes emacs' tramp! --- dotfiles/lib/shellenv/exports.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dotfiles/lib/shellenv/exports.sh b/dotfiles/lib/shellenv/exports.sh index dfe51bb6..1c550380 100644 --- a/dotfiles/lib/shellenv/exports.sh +++ b/dotfiles/lib/shellenv/exports.sh @@ -1,9 +1,3 @@ -if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then - export TERM=gnome-256color -elif infocmp xterm-256color >/dev/null 2>&1; then - export TERM=xterm-256color -fi - export HISTTIMEFORMAT='%F %T ' export PAGER='less -XFr' @@ -31,3 +25,11 @@ dircolors_file="$HOME/.dircolors" [ ! -z "$SHELL" ] && test -r $dircolors_files && eval "$(dircolors $dircolors_file)" && eval $(dircolors) export GO15VENDOREXPERIMENT=1 + +if [[ $TERM == "dumb" ]]; then + export PS1='$ ' +elif [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then + export TERM=gnome-256color +elif infocmp xterm-256color >/dev/null 2>&1; then + export TERM=xterm-256color +fi