Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Enable aliases for Click

Project description

click-aliases

build license coverage

Add (multiple) aliases to a click_ group or command.

In your click app:

import click
from click_aliases import ClickAliasedGroup

@click.group(cls=ClickAliasedGroup)
def cli():
    pass

@cli.command(aliases=['bar', 'baz', 'qux'])
def foo():
    """Run a command."""
    click.echo('foo')

Will result in:

Usage: cli [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  foo (bar,baz,qux)  Run a command.

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 click-aliases, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size click_aliases-1.0.1-py2.py3-none-any.whl (3.4 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size click-aliases-1.0.1.tar.gz (4.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

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