]> git.rmz.io Git - dotfiles.git/blob - zsh/lib/title.zsh
flexget: cleanup config
[dotfiles.git] / zsh / lib / title.zsh
1 function title {
2 local tmp
3 tmp=(${(f)*})
4 printf "\e]0;%s\a" "${tmp[1]}"
5 }
6
7 case "$TERM" in
8 (*xterm*|rxvt*)
9 function title_precmd { title "${(%):-[%n@%m] %~}" }
10 function title_preexec { title "$1" }
11 ;;
12 esac
13
14 autoload -U add-zsh-hook
15 add-zsh-hook precmd title_precmd
16 add-zsh-hook preexec title_preexec