Set terminal emulatior title

pull/92/head
Antono Vasiljev 2011-12-17 11:46:40 +03:00
parent bd61f6e180
commit 538980c449
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
set_xterm_title () {
local title="$1"
echo -ne "\e]0;$title\007"
}
precmd () {
set_xterm_title "${USER}@${HOSTNAME} `dirs -0` $PROMPTCHAR"
}
preexec () {
set_xterm_title "$1 {`dirs -0`} (${USER}@${HOSTNAME})"
}
preexec_install