diff --git a/zsh/zshrc b/zsh/zshrc index 8fc5c73..75e7f5b 100755 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -63,6 +63,18 @@ else export VISUAL="vi" fi +# Set Apple Terminal.app resume directory +if [[ $TERM_PROGRAM == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]] { + function chpwd { + local SEARCH=' ' + local REPLACE='%20' + local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}" + printf '\e]7;%s\a' "$PWD_URL" + } + + chpwd +} + # 2. Limits # =========