if [[ -n "${_APPOSTLE_ZSH_INTEGRATION_LOADED-}" ]]; then
  return
fi
typeset -g _APPOSTLE_ZSH_INTEGRATION_LOADED=1

autoload -Uz add-zsh-hook

function _appostle_precmd() {
  printf '\e]2;%s\a' "${PWD/#$HOME/~}"
}

function _appostle_preexec() {
  printf '\e]2;%s\a' "$1"
}

add-zsh-hook precmd _appostle_precmd
add-zsh-hook preexec _appostle_preexec
