Browse code

Apple Terminal.app resume directory plugin

Alexander Madyankin authored on 05/01/2012 at 05:16:17
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,11 @@
0
+# Set Apple Terminal.app resume directory
1
+# based on this answer: http://superuser.com/a/315029
2
+
3
+function chpwd {
4
+  local SEARCH=' '
5
+  local REPLACE='%20'
6
+  local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
7
+  printf '\e]7;%s\a' "$PWD_URL"
8
+}
9
+
10
+chpwd
0 11
\ No newline at end of file