1995-06-02 12:48:24 +02:00
|
|
|
|
# Initializations to be done on a new terminal. This is
|
|
|
|
|
# called both from .zlogin and .zshrc
|
|
|
|
|
|
1999-03-12 14:32:06 +01:00
|
|
|
|
# default initialization
|
1999-08-21 23:48:23 +02:00
|
|
|
|
if [ -r /usr/local/lib/profile-parts/term ]
|
1999-05-09 21:03:32 +02:00
|
|
|
|
then
|
1999-08-21 23:48:23 +02:00
|
|
|
|
. /usr/local/lib/profile-parts/term
|
1999-05-09 21:03:32 +02:00
|
|
|
|
fi
|
1995-06-02 12:48:24 +02:00
|
|
|
|
|
|
|
|
|
# terminal customization
|
|
|
|
|
|
|
|
|
|
if [[ .$TERM. = .console. ]]
|
|
|
|
|
then
|
|
|
|
|
# Linux console
|
|
|
|
|
TERM=vt200
|
|
|
|
|
stty rows 25 cols 80
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ .$TERM. = .vt200. ]]
|
|
|
|
|
then
|
|
|
|
|
# vt200 not known here
|
|
|
|
|
TERM=vt100
|
|
|
|
|
stty erase
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ .$TERM. = .xterm. ]]
|
|
|
|
|
then
|
2001-04-30 16:34:19 +02:00
|
|
|
|
prompt="%{]0;%m(%l)%n %~%}%B%m:%~ %T %h%# %b"
|
1998-03-25 20:59:51 +01:00
|
|
|
|
if test "`uname`" = HP-UX
|
1995-06-02 15:46:15 +02:00
|
|
|
|
then
|
|
|
|
|
export REMOTEHOST=`
|
1996-08-07 19:52:25 +02:00
|
|
|
|
/bin/who -muR |
|
1995-06-02 15:46:15 +02:00
|
|
|
|
tr -s ' ' ' ' |
|
|
|
|
|
cut -f 8 | cut -d : -f 1`
|
1998-03-25 20:59:51 +01:00
|
|
|
|
else
|
|
|
|
|
export REMOTEHOST=`
|
|
|
|
|
who am i |
|
1999-07-29 16:13:22 +02:00
|
|
|
|
grep '(.*)' |
|
1998-03-25 20:59:51 +01:00
|
|
|
|
sed -e 's/.*(\(.*\)).*/\1/'`
|
1995-06-02 15:46:15 +02:00
|
|
|
|
fi
|
1995-06-02 12:48:24 +02:00
|
|
|
|
if [[ -z "$DISPLAY" ]]
|
|
|
|
|
then
|
|
|
|
|
export DISPLAY=${REMOTEHOST}:0.0
|
|
|
|
|
fi
|
2005-02-03 17:13:40 +01:00
|
|
|
|
# force backspace key to send BS:
|
|
|
|
|
# warning: This works with real xterm and rxvt
|
|
|
|
|
# it doesn't work with konsole or gnome-terminal.
|
|
|
|
|
echo '[?67h'
|
|
|
|
|
stty erase
|
1995-06-02 12:48:24 +02:00
|
|
|
|
else
|
2001-04-30 16:34:19 +02:00
|
|
|
|
prompt="%B%m:%~ %T %h%# %b"
|
1995-06-02 12:48:24 +02:00
|
|
|
|
fi
|
|
|
|
|
|
1996-02-22 14:33:43 +01:00
|
|
|
|
export PROMPT
|
1995-06-02 12:48:24 +02:00
|
|
|
|
znewtermexecuted=true
|