Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

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

If you’re using zsh:

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

example/simple_script.py 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')
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

Test

$ nosetests -v auto_argcomplete

License

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

Project details


Release history Release notifications

This version
History Node

0.9.7

History Node

0.9.6

History Node

0.9.4.8

History Node

0.9.4.7

History Node

0.9.4.6

History Node

0.9.4.5

History Node

0.9.4.4

History Node

0.9.4.3

History Node

0.9.4.2

History Node

0.9.4.1

History Node

0.9.4

History Node

0.9.3

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
auto-argcomplete-0.9.7.tar.gz (9.9 kB) Copy SHA256 hash SHA256 Source None Aug 29, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page