37signals/sub — pull request #30 by vincentbernat (2012-12-19 10:58:40+00:00)
Title: zsh: rework ZSH completion

The completion for ZSH is upgraded to the new ZSH completion
system. To work, the file should be placed somewhere in ZSH fpath to
be autoloaded when needed and named `_sub`.

There are other embedded misc changes:
- `$CURRENT` indicate which word is being autocompleted.
- In ZSH, automatic word splitting is disabled in completion. There
is no need to quote words.

The completion also handles plugins that are able to complete
args. However, most plugins don't and will complete with a subcommand
instead. I don't think there is an universal solution for this.

I am no ZSH wizard. Take this commit with care (works for me).