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/ <TAB>
$ python example/ --
--dry-run   --help      --kick-off  --module

If you’re using zsh:

% python example/ --
--dry-run   -- display what to do
--help      -- show this help message and exit
--module    -- specify module name

example/ is:

import argparse

parser = argparse.ArgumentParser()
parser.add_argument('-m', '--module', help='specify module name')
parser.add_argument('-n', '--dry-run', help='display what to do')
parser.add_argument('-k', '--kick-off')

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.


$ pip install auto-argcomplete


$ nosetests -v auto_argcomplete


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.

Files for auto-argcomplete, version 0.9.7
Filename, size File type Python version Upload date Hashes
Filename, size auto-argcomplete-0.9.7.tar.gz (9.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page