Autocompletion for Cakefiles
This very very small script provides autocompletion for cake, the coffee-script build tool. It was inspired by @sgruhier's rake autocomplete as well as my own personal quest towards as little keystrokes as possible.
$ git clone git://github.com/traviskaufman/cake-autocomplete.git
$ curl -k https://raw.github.com/traviskaufman/cake-autocomplete/master/cake-autocomplete.sh > cake-autocomplete.sh
# put a command to source the script in your startup script $ cat>>~/.bashrc<<"EOF" # alternatively use ~/.bash_profile > source /path/to/cake-autocomplete.sh > EOF $ source ~/.bashrc
Let's say you have a
Cakefile containing the following:
option '-o', '--output [DIR]', 'directory to output to' task "lint", "lint the code", -> # .... task "compile", "compile the code", -> # .... task "test", "runs unit tests", -> # ....
Now in the directory where you have your
Cakefile, if you type
$ cake [TAB]
lint compile test
If you type
$ cake l[TAB]
If you type
$ cake compile [TAB]
--output -o lint compile test
Hope this comes in handy!
cake-autocomplete is licensed under a Creative Commons Attribution 3.0 Unported License