Install xterm title only for xterm

pull/106/head
Antono Vasiljev 2012-03-04 22:58:53 +03:00
parent c65876342e
commit f3c6300e4d
1 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,7 @@ set_xterm_title () {
echo -ne "\e]0;$title\007" echo -ne "\e]0;$title\007"
} }
precmd () { precmd () {
set_xterm_title "${USER}@${HOSTNAME} `dirs -0` $PROMPTCHAR" set_xterm_title "${USER}@${HOSTNAME} `dirs -0` $PROMPTCHAR"
} }
@ -11,4 +12,6 @@ preexec () {
set_xterm_title "$1 {`dirs -0`} (${USER}@${HOSTNAME})" set_xterm_title "$1 {`dirs -0`} (${USER}@${HOSTNAME})"
} }
preexec_install case "$TERM" in
xterm*|rxvt*) preexec_install;;
esac