added custom/screen.zsh

This commit is contained in:
Mike Prentice 2010-02-16 22:15:02 +08:00 committed by Sven Lito
commit 1956510a07

14
custom/screen.zsh Normal file
View file

@ -0,0 +1,14 @@
# don't rename screen window
case "$TERM" in
screen*)
preexec () {
local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]}
# echo -ne "\ek$CMD\e\\"
print -Pn "\e]0;%n@%m: $1\a" # xterm
}
precmd () {
# echo -ne "\ekzsh\e\\"
print -Pn "\e]0;%n@%m: %~\a" # xterm
}
;;
esac