Handle TERM=screen for prompt and colors.
This commit is contained in:
parent
19b31fbde6
commit
8f8d15505b
10
.znewterm
10
.znewterm
|
@ -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?,%{[32m%}:-),%{[31m%}:-()%{[30m%}%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
|
||||
|
|
Loading…
Reference in New Issue