esc-cwd() print -Pn '\e]0;'$PWD'\a'
autoload -Uz add-zsh-hook
add-zsh-hook chpwd esc-cwd
esc-cwd