Browse code

Add tab, take and tm functions

Geoff Garside authored on 31/08/2009 at 13:03:56
Showing 1 changed files
... ...
@@ -22,4 +22,26 @@ function preexec {
22 22
 
23 23
 function remote_console() {
24 24
   /usr/bin/env ssh $1 "( cd $2 && ruby script/console production )"
25
-}
26 25
\ No newline at end of file
26
+}
27
+
28
+function tab() {
29
+  osascript 2>/dev/null <<EOF
30
+    tell application "System Events"
31
+      tell process "Terminal" to keystroke "t" using command down
32
+    end
33
+    tell application "Terminal"
34
+      activate
35
+      do script with command "cd $PWD; $*" in window 1
36
+    end tell
37
+EOF
38
+}
39
+
40
+function take() {
41
+  mkdir -p $1
42
+  cd $1
43
+}
44
+
45
+function tm() {
46
+  cd $1
47
+  mate $1
48
+}