Apple Terminal.app resume directory plugin
Robby Russell authored on 10/01/2012 at 04:55:241 | 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 |