89bd2bf317fe458c6a6154824823670dd2d32660

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Moving some rails and osx-specific functions to their corresponding plugin files

Diff

 1diff --git a/lib/functions.zsh b/lib/functions.zsh
 2index 35c3f3ce711b1c9b513303fd0bdd4c6ac9c9db8e..fcbe994be3ef9f7a483b2b7e86e9fa5cf265bcfb 100644
 3--- a/lib/functions.zsh
 4+++ b/lib/functions.zsh
 5@@ -21,10 +21,6 @@ function preexec {
 6   title $cmd[1]:t "$cmd[2,-1]"
 7 }
 8 
 9-function remote_console() {
10-  /usr/bin/env ssh $1 "( cd $2 && ruby script/console production )"
11-}
12-
13 function zsh_stats() {
14   history | awk '{print $2}' | sort | uniq -c | sort -rn | head
15 }
16@@ -37,18 +33,6 @@ function upgrade_oh_my_zsh() {
17   /bin/sh $ZSH/tools/upgrade.sh
18 }
19 
20-function tab() {
21-  osascript 2>/dev/null <<EOF
22-    tell application "System Events"
23-      tell process "Terminal" to keystroke "t" using command down
24-    end
25-    tell application "Terminal"
26-      activate
27-      do script with command "cd \"$PWD\"; $*" in window 1
28-    end tell
29-EOF
30-}
31-
32 function take() {
33   mkdir -p $1
34   cd $1
35diff --git a/plugins/osx.plugin.zsh b/plugins/osx.plugin.zsh
36new file mode 100644
37index 0000000000000000000000000000000000000000..fce88c79669f8169b68c8da25aca707c0ba59f96
38--- /dev/null
39+++ b/plugins/osx.plugin.zsh
40@@ -0,0 +1,11 @@
41+function tab() {
42+  osascript 2>/dev/null <<EOF
43+    tell application "System Events"
44+      tell process "Terminal" to keystroke "t" using command down
45+    end
46+    tell application "Terminal"
47+      activate
48+      do script with command "cd \"$PWD\"; $*" in window 1
49+    end tell
50+EOF
51+}
52diff --git a/plugins/rails.plugin.zsh b/plugins/rails.plugin.zsh
53index b7f62a0c613e6aa22e1ae0e0757c81d81274fdd3..45bebb72246f894e7754ef72fdd2e2f62e996e78 100644
54--- a/plugins/rails.plugin.zsh
55+++ b/plugins/rails.plugin.zsh
56@@ -30,3 +30,7 @@ function _cap () {
57 }
58 
59 compctl -K _cap cap
60+
61+function remote_console() {
62+  /usr/bin/env ssh $1 "( cd $2 && ruby script/console production )"
63+}