Skip to content
Browse files

Apple Terminal.app resume directory plugin

  • Loading branch information...
1 parent 8c45b73 commit a28b8889ee80856b65dd792dedd7735a1b94443c @outpunk outpunk committed Jan 5, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 plugins/terminalapp/terminalapp.plugin.zsh
View
11 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.
Something went wrong with that request. Please try again.