Skip to content

Commit

Permalink
Merge pull request ohmyzsh#806 from OutPunk/terminalapp-plugin
Browse files Browse the repository at this point in the history
Apple Terminal.app resume directory plugin
  • Loading branch information
robbyrussell committed Jan 10, 2012
2 parents a11c814 + a28b888 commit b7b2dd5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions plugins/terminalapp/terminalapp.plugin.zsh
@@ -0,0 +1,11 @@
# Set Apple Terminal.app resume directory
# based on this answer: http://superuser.com/a/315029

function chpwd {
local SEARCH=' '
local REPLACE='%20'
local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
printf '\e]7;%s\a' "$PWD_URL"
}

chpwd

0 comments on commit b7b2dd5

Please sign in to comment.