genometools/genometools — pull request #408 by yeban (2014-09-09 11:16:27+00:00)
Title: Add scripts to generate zsh completion function for gt.

Regarding #322.

Parse output of `-help` for each tool (gt -help) and combine them into a
zsh completion function.

Usage:
$ /script/gen_zsh_completion > _gt
$ mv _gt
$ exec $SHELL
$ gt

Limitations:
* assumes `gt` to be in PATH.
* list of tools is hardcoded in the script. Probably should parse the list of
tools from `gt -help` instead.
* doesn't know to deal with `-help+` option of some tools.
* only first line of help text for an option is used (`gt -seed` for example).

Notes:
* help2comp.py was borrowed from [1] with a minor modification. The change is
marked in the script.
* [1] is GPL2 licensed. Not sure if that's incompatible with gt's license.
* Template for completion function borrowed from [2].

[1]: https://github.com/RobSis/zsh-completion-generator
[2]: http://wikimatze.de/writing-zsh-completion-for-padrino/

Signed-off-by: Anurag Priyam