dot/.znewterm

43 lines
896 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Initializations to be done on a new terminal. This is
# called both from .zlogin and .zshrc
# default initialization
if [ -r /usr/local/lib/profile-parts/term ]
then
. /usr/local/lib/profile-parts/term
fi
# 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
# indicated exit status by smiley (suggested by Stig Sandbeck Mathisen)
smiley="%b%(0?,%{%}:-),%{%}:-()%{%}%B"
prompt="%{]0;%m(%l)%n %~%}%B%m:%~ %T $smiley %h%# %b"
unsetopt PRINT_EXIT_VALUE
# force backspace key to send BS:
# warning: This works with real xterm and rxvt
# it doesn't work with konsole or gnome-terminal.
echo -n '[?67h'
stty erase 
else
prompt="%B%m:%~ %T %h%# %b"
fi
export PROMPT
znewtermexecuted=true