aboutsummaryrefslogtreecommitdiffstats
path: root/_zsh/40-hooks.zsh
blob: da15a29170ec1668c82fd59b84377b593cbd5a0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# zsh/hooks.zsh
#
# Credit: http://chneukirchen.org/dotfiles/.zshrc
#

case "$TERM" in
xterm*|rxvt*)
    function precmd()  {
        [[ -t 1 ]] && print -Pn "\e]0;%m: %~\a"
    }
    function preexec() {
        [[ -t 1 ]] && print -n "\e]0;$HOST: ${(q)1//(#m)[$'\000-\037\177-']/${(q)MATCH}}\a"
    }
    ;;
esac


# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: #