skip to navigation
skip to content

genzshcomp 0.3.1

Automatic generated to zsh completion function, for Python's Option Parser Modules.

Latest Version: 0.5.2


Automatic generate to Zsh Completion Function from Python’s Option Parser Modules.

Now, It corresponds to argparse module and optparse module.

I write this module because I want to be created grin command’s Zsh Completion Function.


used to pip:

$ pip install genzshcomp

used to easy_install:

$ easy_install genzshcomp


  • Python2.6+


show example dir…

from code of option parser object

basic usage:

from genzshcomp import ZshCompletionGenerator
from optparse import OptionParser
parser = OptionParser()
generator = ZshCompletionGenerator(command_name, parser)
print generator.get()

and zsh completion setups:

$ python > ~/.zsh/comp/_command
$ echo "fpath=(~/.zsh/comp/ $fpath)" >> ~/.zshrc
$ echo "autoload -U ~/.zsh/comp/*(:t)" >> ~/.zshrc
$ echo "autoload -Uz compinit" >> ~/.zshrc

from help-strings

basic usage and zsh completion setups (ex.pep8 command):

$ pep8 --help > pep8help.txt
$ genzshcomp pep8help.txt > ~/.zsh/comp/_pep8
$ echo "fpath=(~/.zsh/comp/ $fpath)" >> ~/.zshrc
$ echo "autoload -U ~/.zsh/comp/*(:t)" >> ~/.zshrc
$ echo "autoload -Uz compinit" >> ~/.zshrc

using shell pipe:

$ pep8 --help | genzshcomp > ~/.zsh/comp/_pep8
# As follows...

Support commands


File Type Py Version Uploaded on Size
genzshcomp-0.3.1-py2.7.egg (md5) Python Egg 2.7 2012-07-15 10KB
genzshcomp-0.3.1.tar.gz (md5) Source 2012-07-15 11KB
  • Downloads (All Versions):
  • 37 downloads in the last day
  • 554 downloads in the last week
  • 2563 downloads in the last month