Add (mutiple) aliases to a click group or command
Project description
click-aliases
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.4.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for click_aliases-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27b416fd9117c05a744459ea13d01db8fa489e6efbc7e23a8ef5a744b7afbfb9 |
|
MD5 | 74e0377bffaff62030b5254e00811442 |
|
BLAKE2b-256 | 7eb7dd8bf2f67acf74707e97782e40188c3911799d69d53cb71113e82be8caa2 |