Skip to main content

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.

Source Distribution

click-aliases-1.0.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

click_aliases-1.0.0-py2.py3-none-any.whl (3.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file click-aliases-1.0.0.tar.gz.

File metadata

  • Download URL: click-aliases-1.0.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for click-aliases-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5c8aeaac7fc6959cf83fda8caab9de68383caa73c0adf51ebac13ffc11caae62
MD5 2a6f6a10c571d0caada2a3b7391eb3db
BLAKE2b-256 ac6e268128d130fdb92693d15d6eb8394479f30ea8e99e0dfed25629d43722f5

See more details on using hashes here.

File details

Details for the file click_aliases-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: click_aliases-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for click_aliases-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 be9682bb23c7b8f02cca320b243e3f1119e1415d2f750691fe0d35a05fb3fe67
MD5 e01cf554571fc5a2e87e544976f6af5b
BLAKE2b-256 b20b5e307f7e2bae1362825d83e1fbc348b7b57eeedf903972b67d1ad80406e2

See more details on using hashes here.

Supported by

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