Handle TERM=screen for prompt and colors.

This commit is contained in:
Peter J. Holzer 2015-06-01 13:41:53 +02:00
parent 19b31fbde6
commit 8f8d15505b
1 changed files with 7 additions and 3 deletions

View File

@ -28,7 +28,7 @@ then
TERM=xterm
fi
if [[ $TERM = xterm || $TERM = xterm-256color ]]
if [[ $TERM = xterm || $TERM = xterm-256color || $TERM = screen ]]
then
# indicated exit status by smiley (suggested by Stig Sandbeck Mathisen)
smiley="%b%(0?,%{%}:-),%{%}:-()%{%}%B"
@ -39,14 +39,18 @@ then
# it doesn't work with konsole or gnome-terminal.
echo -n '[?67h'
stty erase 
else
prompt="%B%m:%~ %T %h%# %b"
fi
if [[ $TERM = xterm || $TERM = xterm-256color ]]
then
if [ -f ~/.zxtermcolors ]
then
. ~/.zxtermcolors
else
perl -e 'printf(qq{if whence xtermcontrol >/dev/null\nthen\nxtermcontrol --bg "#%02X%02X%02X"\nfi\n}, map { rand(128)+128 } qw(1 1 1))' > ~/.zxtermcolors
fi
else
prompt="%B%m:%~ %T %h%# %b"
fi
export PROMPT