dotfiles/.zsh/zsh_hooks.zsh

23 lines
375 B
Bash
Raw Permalink Normal View History

#hooks
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"}
;;
esac
function set_running_app {
printf "\e]1; $PWD:t:$(history $HISTCMD | cut -b7- ) \a"
}
function preexec {
set_running_app
}
function postexec {
set_running_app
}