Skip to main content

Add (mutiple) aliases to a click group or command

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.6.tar.gz (3.0 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.6-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file click_aliases-1.0.6.tar.gz.

File metadata

  • Download URL: click_aliases-1.0.6.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for click_aliases-1.0.6.tar.gz
Algorithm Hash digest
SHA256 9372e58d00aa146f0d235e4e5e8bd280e84fe78e52db5fd80eacb14ecdf2e0d4
MD5 de383651212203a6e981d6d781d76a93
BLAKE2b-256 6743fc99880a8cba558ab26cb87f0a317c09f870d4b49275207bd5824e4380dc

See more details on using hashes here.

File details

Details for the file click_aliases-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: click_aliases-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for click_aliases-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fc4e047de3d950d9b575c5928010308b733b85baa76240ff7448b81e5d7c290d
MD5 09662da3bb632c57c033f0799a846dee
BLAKE2b-256 a53467b8cd38f683233191da35d2460e0f6c1475fd9e4d0f4f9299a30a4f5aa4

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