Skip to content

Commit

Permalink
Apple Terminal.app resume directory plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
madyankin committed Jan 5, 2012
1 parent 8c45b73 commit a28b888
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 a28b888

Please sign in to comment.