tell Terminal.app what directory I'm in

This commit is contained in:
Sami Samhuri 2013-10-23 12:17:00 -07:00
parent 8fc2df426b
commit 1f756fc240

View file

@ -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
# =========