Make TERM recognition a bit more flexible
This commit is contained in:
parent
5e59c96b35
commit
520ed4b064
10
.znewterm
10
.znewterm
|
@ -28,8 +28,8 @@ then
|
||||||
TERM=xterm
|
TERM=xterm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $TERM = xterm || $TERM = xterm-256color || $TERM = screen ]]
|
case "$TERM" in
|
||||||
then
|
xterm*|screen)
|
||||||
# indicated exit status by smiley (suggested by Stig Sandbeck Mathisen)
|
# indicated exit status by smiley (suggested by Stig Sandbeck Mathisen)
|
||||||
smiley="%b%(0?,%{[32m%}:-),%{[31m%}:-()%{[30m%}%B"
|
smiley="%b%(0?,%{[32m%}:-),%{[31m%}:-()%{[30m%}%B"
|
||||||
prompt="%{]0;%m(%l)%n %~%}%B%m:%~ %T $smiley %h%# %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.
|
# it doesn't work with konsole or gnome-terminal.
|
||||||
echo -n '[?67h'
|
echo -n '[?67h'
|
||||||
stty erase
|
stty erase
|
||||||
else
|
;;
|
||||||
|
*)
|
||||||
prompt="%B%m:%~ %T %h%# %b"
|
prompt="%B%m:%~ %T %h%# %b"
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [[ $TERM = xterm || $TERM = xterm-256color ]]
|
if [[ $TERM = xterm || $TERM = xterm-256color ]]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue