Autocompletion for CoffeeScript's cake build system
Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
cake-autocomplete.sh

README.md

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.

Installation

First

$ git clone git://github.com/traviskaufman/cake-autocomplete.git

or

$ curl -k https://raw.github.com/traviskaufman/cake-autocomplete/master/cake-autocomplete.sh > cake-autocomplete.sh

then,

# 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

Usage

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]

you'll get

lint compile test

If you type

$ cake l[TAB]

you'll get

lint

If you type

$ cake compile [TAB]

you'll get

--output -o lint compile test

Hope this comes in handy!

License

Creative
Commons License
cake-autocomplete is licensed under a Creative Commons Attribution 3.0 Unported License