Created
December 9, 2011 10:27
-
-
Save mikz/1451020 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set Apple Terminal.app resume directory | |
if [[ $TERM_PROGRAM == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then | |
autoload -U add-zsh-hook | |
function lion_resume_chpwd { | |
# add support for OS X Lion window resume on Terminal.app relaunch | |
# straight port from /etc/bashrc on Lion | |
local SEARCH=' ' | |
local REPLACE='%20' | |
local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}" | |
printf '\e]7;%s\a' "$PWD_URL" | |
} | |
add-zsh-hook chpwd lion_resume_chpwd | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment