359fe53883838dedeeb02c62df9e3a2acb10bc96
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #688 from alexstrat/master
Plugin : autocomplete for Jake
Diff
1diff --git a/plugins/jake-node/jake-node.plugin.zsh b/plugins/jake-node/jake-node.plugin.zsh
2new file mode 100644
3index 0000000000000000000000000000000000000000..a9eef4029620dc3901399d0a4973feda73f4860f
4--- /dev/null
5+++ b/plugins/jake-node/jake-node.plugin.zsh
6@@ -0,0 +1,14 @@
7+#---oh-my-zsh plugin : task Autocomplete for Jake tool---
8+# Jake : https://github.com/mde/jake
9+# Warning : Jakefile should have the right case : Jakefile or jakefile
10+# Tested on : MacOSX 10.7 (Lion), Ubuntu 11.10
11+# Author : Alexandre Lacheze (@al3xstrat)
12+# Inspiration : http://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh
13+
14+function _jake () {
15+ if [ -f Jakefile ]||[ -f jakefile ]; then
16+ compadd `jake -T | cut -d " " -f 2 | sed -E "s/.\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"`
17+ fi
18+}
19+
20+compdef _jake jake