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
|
TERM=xterm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $TERM = xterm || $TERM = xterm-256color ]]
|
if [[ $TERM = xterm || $TERM = xterm-256color || $TERM = screen ]]
|
||||||
then
|
then
|
||||||
# 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"
|
||||||
|
@ -39,14 +39,18 @@ 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"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $TERM = xterm || $TERM = xterm-256color ]]
|
||||||
|
then
|
||||||
if [ -f ~/.zxtermcolors ]
|
if [ -f ~/.zxtermcolors ]
|
||||||
then
|
then
|
||||||
. ~/.zxtermcolors
|
. ~/.zxtermcolors
|
||||||
else
|
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
|
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
|
fi
|
||||||
else
|
|
||||||
prompt="%B%m:%~ %T %h%# %b"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PROMPT
|
export PROMPT
|
||||||
|
|
Loading…
Reference in New Issue