From 9a1b52eee240fe513aa6185aa0b0a0446dc90aa0 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Fri, 27 Dec 2019 20:08:53 +0100 Subject: [PATCH] Assume xterm has 256 colors --- .znewterm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.znewterm b/.znewterm index 1d30148..f214735 100644 --- a/.znewterm +++ b/.znewterm @@ -28,6 +28,18 @@ then TERM=xterm fi +if [[ $TERM == xterm ]] +then + for t in xterm-256color xterm+256color + do + if [[ -f /usr/share/terminfo/x/$t ]] + then + TERM=$t + break + fi + done +fi + case "$TERM" in xterm*|screen) # indicated exit status by smiley (suggested by Stig Sandbeck Mathisen)