From 9a168298c91572ee2d2937accc75a2a9cf948b23 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Thu, 14 Oct 2021 00:08:47 -0700 Subject: [PATCH] update bash `$TERM` checks --- home/bashrc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/home/bashrc b/home/bashrc index 5ba9c55..fbbdb37 100644 --- a/home/bashrc +++ b/home/bashrc @@ -1,9 +1,5 @@ [ -z "$PS1" ] && return -if [ "$TERM" = rxvt-unicode-256color ]; then - export TERM=xterm-256color -fi - HISTCONTROL=erasedups HISTSIZE=1000 HISTFILESIZE=2000 @@ -13,11 +9,15 @@ shopt -s checkwinsize #shopt -s physical # chaselinks (doesn't exist?) set -o hashall # enable hash command -if [[ "$TERM" = xterm* ]]; then +[ "$TERM" != rxvt-unicode-256color ] || export TERM=xterm-256color + +t="${TERM%%-*}" +if [ "$t" = xterm ] || [ "$t" = screen ] || [ "$t" = tmux ]; then _title="\[\033]2;\w\a\]" else _title="" fi +unset t Csucc=$'\\[\e[42m\\]' Cfail=$'\\[\e[41m\\]'