From 8f8d15505b63f2ad7917438186165f0aee8d21d3 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Mon, 1 Jun 2015 13:41:53 +0200 Subject: [PATCH] Handle TERM=screen for prompt and colors. --- .znewterm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.znewterm b/.znewterm index 30c6e8d..29d2163 100644 --- a/.znewterm +++ b/.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?,%{%}:-),%{%}:-()%{%}%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