Skip to main content

About

https://drone.io/bitbucket.org/hhatto/genzshcomp/status.png

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

  • Python2.6+

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

and more…

Metadata

Release files for genzshcomp 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for genzshcomp 0.5.2
File Size Uploaded Provenance Actions
genzshcomp-0.5.2.tar.gz 12.8 kB Without provenance Details for genzshcomp-0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for genzshcomp 0.5.2
File Interpreter ABI Platform Actions
genzshcomp-0.5.2-py2.7.egg Legacy Egg format - - Details for genzshcomp-0.5.2-py2.7.egg

Total release size: 24.5 kB

Release files / genzshcomp-0.5.2.tar.gz

Download URL genzshcomp-0.5.2.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d28ae62b1b2727f32dc7606bc58201b8c12894ad3d1d4fdb40e1f951e3ae8f85
BLAKE2b-256 checksum
How to use checksums
3d2c3e02d2aa8bff82235bebbee3a2b0599e59767954a0dbd0038913ec72507d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / genzshcomp-0.5.2-py2.7.egg

Download URL genzshcomp-0.5.2-py2.7.egg
Size 11.7 kB
Tags Egg
SHA-256 checksum
How to use checksums
91e2ef564100cba047da90559852127549c68f8dbccf958a17af1920f89bf4ac
BLAKE2b-256 checksum
How to use checksums
29ef4e3d1ec21b22cabdc7a54f3d0780a009ca690d76dd3e87ee6ede91d6cbe6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for genzshcomp 0.5.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page