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.
.. _`argparse`: http://code.google.com/p/argparse/
.. _`grin`: http://pypi.python.org/pypi/grin
.. _`optparse`: http://docs.python.org/library/optparse.html
Install
=======
used to pip::
$ pip install genzshcomp
used to easy_install::
$ easy_install genzshcomp
Require
=======
* Python2.6+
Usage
=====
show example dir...
basic usage::
## gen.py
from genzshcomp import ZshCompletionGenerator
from optparse import OptionParser
parser = OptionParser()
generator = ZshCompletionGenerator(command_name, parser)
print generator.get()
and...
$ python gen.py > ~/.zsh/comp/_command
$ echo "fpath=(~/.zsh/comp/ $fpath)" >> ~/.zshrc
$ echo "autoload -U ~/.zsh/comp/*(:t)" >> ~/.zshrc
$ echo "autoload -Uz compinit >> ~/.zshrc
=====
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.
.. _`argparse`: http://code.google.com/p/argparse/
.. _`grin`: http://pypi.python.org/pypi/grin
.. _`optparse`: http://docs.python.org/library/optparse.html
Install
=======
used to pip::
$ pip install genzshcomp
used to easy_install::
$ easy_install genzshcomp
Require
=======
* Python2.6+
Usage
=====
show example dir...
basic usage::
## gen.py
from genzshcomp import ZshCompletionGenerator
from optparse import OptionParser
parser = OptionParser()
generator = ZshCompletionGenerator(command_name, parser)
print generator.get()
and...
$ python gen.py > ~/.zsh/comp/_command
$ 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.3.tar.gz
(4.1 kB
view details)
Built Distribution
genzshcomp-0.0.3-py2.6.egg
(4.3 kB
view details)
File details
Details for the file genzshcomp-0.0.3.tar.gz
.
File metadata
- Download URL: genzshcomp-0.0.3.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53be4ffaab9705e80cd3c1690154933792f6e8b257dab7fa47cef3df38fef5e3 |
|
MD5 | 32e0c83d8615faa5677b5c3f6d3b0217 |
|
BLAKE2b-256 | a77765098a93ae5633ec442a5117badad67b529d07a9fe6d72c49e386163f878 |
File details
Details for the file genzshcomp-0.0.3-py2.6.egg
.
File metadata
- Download URL: genzshcomp-0.0.3-py2.6.egg
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d87597c15f60a95dce15c1a88de9f4af5d76764686cd9129744539b14838de73 |
|
MD5 | e59217b55ae6ad4fd8c787e270adf688 |
|
BLAKE2b-256 | c3e5dd6001fd933a4f90f25fe2876134046123347734da26c71573fd781543f4 |