From 8ccf56f58ae48de840556ed23706dc0e44da5aa8 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Wed, 27 Sep 2017 09:40:53 +0200 Subject: [PATCH] Make TERM recognition a bit more flexible --- .znewterm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.znewterm b/.znewterm index 29d2163..fd204fa 100644 --- a/.znewterm +++ b/.znewterm @@ -28,8 +28,8 @@ then TERM=xterm fi -if [[ $TERM = xterm || $TERM = xterm-256color || $TERM = screen ]] -then +case "$TERM" in + xterm*|screen) # indicated exit status by smiley (suggested by Stig Sandbeck Mathisen) smiley="%b%(0?,%{%}:-),%{%}:-()%{%}%B" prompt="%{]0;%m(%l)%n %~%}%B%m:%~ %T $smiley %h%# %b" @@ -39,9 +39,11 @@ then # it doesn't work with konsole or gnome-terminal. echo -n '[?67h' stty erase  -else + ;; + *) prompt="%B%m:%~ %T %h%# %b" -fi + ;; +esac if [[ $TERM = xterm || $TERM = xterm-256color ]] then