Automatic generated to zsh completion function, for Python's Option Parser Modules.
Project description
About
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.
Install
used to pip:
$ pip install genzshcomp
used to easy_install:
$ easy_install genzshcomp
Require
Python2.6+
Usage
show example dir…
from code of option parser object
basic usage:
## gen.py from genzshcomp import ZshCompletionGenerator from optparse import OptionParser parser = OptionParser() generator = ZshCompletionGenerator(command_name, parser) print generator.get()
and zsh completion setups:
$ python gen.py > ~/.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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
genzshcomp-0.0.6.tar.gz
(5.4 kB
view details)
Built Distribution
genzshcomp-0.0.6-py2.6.egg
(7.0 kB
view details)
File details
Details for the file genzshcomp-0.0.6.tar.gz
.
File metadata
- Download URL: genzshcomp-0.0.6.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15639c5634508952f8f9cae54f8d7e8f4bdb98b27ce23c5fae27691b9c421f86 |
|
MD5 | a31947bac2e65ef93c2883768ef73da5 |
|
BLAKE2b-256 | 33a95a3b0b9304e6329f22c622cfdb02d857a5418bb3a03cd75b54f2baebc65e |
File details
Details for the file genzshcomp-0.0.6-py2.6.egg
.
File metadata
- Download URL: genzshcomp-0.0.6-py2.6.egg
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbc86c0ac1e575e49157cac85218609a8e1232c1980a94d94f92b5fb765f7a14 |
|
MD5 | 65f3977e416f921d2bd1f6be0a53c349 |
|
BLAKE2b-256 | e7e3e4bed481a4d3fefa3a9cdb05e5a8c4ce055033882f3b082fd88d830b9106 |