Browse code

Merge pull request #688 from alexstrat/master

Plugin : autocomplete for Jake

Robby Russell authored on 26/12/2011 at 18:32:37
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+#---oh-my-zsh plugin : task Autocomplete for Jake tool---
1
+# Jake : https://github.com/mde/jake
2
+# Warning : Jakefile should have the right case : Jakefile or jakefile
3
+# Tested on : MacOSX 10.7 (Lion), Ubuntu 11.10
4
+# Author : Alexandre Lacheze (@al3xstrat)
5
+# Inspiration : http://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh 
6
+
7
+function _jake () {
8
+  if [ -f Jakefile ]||[ -f jakefile ]; then
9
+    compadd `jake -T | cut -d " " -f 2 | sed -E "s/.\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"`
10
+  fi
11
+}
12
+
13
+compdef _jake jake
0 14
\ No newline at end of file