Skip to main content

Add aliases to click-hotoffthehamster commands

Project description

click-hotoffthehamster-alias

build license coverage

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

In your click app:

import click_hotoffthehamster as click
from click_hotoffthehamster 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.

Source Distribution

click-hotoffthehamster-alias-1.0.4.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

click_hotoffthehamster_alias-1.0.4-py2.py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 2 Python 3

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