Make TERM recognition a bit more flexible

This commit is contained in:
Peter J. Holzer 2017-09-27 09:40:53 +02:00
parent d9831c2115
commit 8ccf56f58a
1 changed files with 6 additions and 4 deletions

View File

@ -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