2012-03-08 17:12:55 +00:00
|
|
|
#hooks
|
2012-06-18 19:38:29 +00:00
|
|
|
case $TERM in
|
|
|
|
xterm*)
|
|
|
|
precmd () {print -Pn "\e]0;%n@%m: %~\a"}
|
|
|
|
;;
|
2012-06-18 19:55:00 +00:00
|
|
|
screen-256color*)
|
|
|
|
precmd () {print -Pn "\e]0;%n@%m: %~\a"}
|
|
|
|
;;
|
2012-06-18 19:38:29 +00:00
|
|
|
esac
|
2012-03-08 17:12:55 +00:00
|
|
|
|
|
|
|
function set_running_app {
|
|
|
|
printf "\e]1; $PWD:t:$(history $HISTCMD | cut -b7- ) \a"
|
|
|
|
}
|
|
|
|
|
|
|
|
function preexec {
|
|
|
|
set_running_app
|
|
|
|
}
|
|
|
|
|
|
|
|
function postexec {
|
|
|
|
set_running_app
|
|
|
|
}
|
|
|
|
|