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.5.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for click_aliases-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbb83a348acc00809fe18b6da13a7f6307bc71b3c5f69cc730e012dfb4bbfdc3 |
|
MD5 | 8edf4815097e52d22fecafb6415c392d |
|
BLAKE2b-256 | 3d1ad5e29a6f896293e32ab3e63201df5d396599e57a726575adaafbcd9d70a6 |