Skip to main content

Auto argument completion for script with argparse.

Project description

auto-argcomplete is automatic shell completion generator for script which uses argparse.

The behavior is like:

$ python example/simple_script.py <TAB>
$ python example/simple_script.py --
--dry-run   --help      --kick-off  --module

example/simple_script.py is:

import argparse

parser = argparse.ArgumentParser()
parser.add_argument('-m', '--module')
parser.add_argument('-n', '--dry-run')
parser.add_argument('-k', '--kick-off')
parser.parse_args()

Nothing to import in the script! :smile:

auto-argcomplete can automatically understand the output of --help option, so automatically supports all script which use argparse.

Installation

$ pip install auto-argcomplete

License

Copyright (C) 2015 Kentaro Wada
Released under the MIT license

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auto-argcomplete-0.9.4.2.tar.gz (3.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page