genzshcomp
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.
Installation
used to pip:
$ pip install genzshcomp
used to easy_install:
$ easy_install genzshcomp
Requirements
Python3.5+
Usage
show example dir…
from code of option parser object
basic usage:
## gen.py from genzshcomp import CompletionGenerator from optparse import OptionParser parser = OptionParser() generator = CompletionGenerator(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
using shell pipe:
$ pep8 --help | genzshcomp > ~/.zsh/comp/_pep8 # As follows...
Support Bash Completion
using shell pipe:
$ pep8 --help | genzshcomp -f bash > /etc/bash_completion.d/pep8 $ bash
Support commands
grin/grind (grin –help)
gunicorn (gunicorn –help)
markdown2 (markdown2 –help)
paver (paver –help)
pep8 (pep8 –help)
pylint (pylint –long-help)
and more…
Metadata
Release files for genzshcomp 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| genzshcomp-0.6.0.tar.gz | 13.5 kB | Without provenance | Details for genzshcomp-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| genzshcomp-0.6.0-py3.8.egg | Legacy Egg format | - | - | Details for genzshcomp-0.6.0-py3.8.egg |
Total release size: 25.2 kB
Release files / genzshcomp-0.6.0.tar.gz
| Download URL | genzshcomp-0.6.0.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b582910d36f9ad0992756d7e9ccbe3e5cf811934b1002b51f25b99d3dda9d573
|
|
BLAKE2b-256 checksum How to use checksums |
0b34e4129a3f898a35db4de999acf75371e79fe852d5581ecf57f288d9ac4fc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.8
|
Release files / genzshcomp-0.6.0-py3.8.egg
| Download URL | genzshcomp-0.6.0-py3.8.egg |
|---|---|
| Size | 11.7 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
7f42c53c864f05b128ffca9d250e4fea34ff5876273a4ef838e152543a8483b4
|
|
BLAKE2b-256 checksum How to use checksums |
ff31f89662599f882e44f67fab2054eb6bb42011f97f1477d903f0d8e1e4af1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.8
|
Security for genzshcomp 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.