Skip to content
/ zargparse Public

A tool for generating zsh completion files for python command line tools that use argparse

License

Notifications You must be signed in to change notification settings

ctil/zargparse

Repository files navigation

Zargparse

Usage

Pass a python script to zargparse.py and it will write out a Zsh completion file to the current working directory. Make sure the script is executable under the current environment with Python 3 since zargparse needs to run the script.

./zargparse.py examples/future

It is recommended to use Pipenv to build a virtual environment.

pipenv install
pipenv run ./zargparse.py examples/future

Dependencies

Zargparse requires Python 3 and the Jinja2 library. It has been tested with Python 3.6.

Limitations

The tool does not support complex completions of arguments as described here. The completion file may need to be modified by hand after generation in order to fine tune the completions.

Nested sub-commands are not supported.

Positional arguments are not yet supported.

About

A tool for generating zsh completion files for python command line tools that use argparse

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •