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 details)
Built Distribution
File details
Details for the file click_aliases-1.0.5.tar.gz
.
File metadata
- Download URL: click_aliases-1.0.5.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e37d4cabbaad68e1c48ec0f063a59dfa15f0e7450ec901bd1ce4f4b954bc881d |
|
MD5 | e8d99716caefe5459d2e5fb820922c18 |
|
BLAKE2b-256 | 40d8adbaeadc13c9686b9bda8b4c50e5a3983f504faae2ffbea5165d5beb1cdb |
File details
Details for the file click_aliases-1.0.5-py3-none-any.whl
.
File metadata
- Download URL: click_aliases-1.0.5-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbb83a348acc00809fe18b6da13a7f6307bc71b3c5f69cc730e012dfb4bbfdc3 |
|
MD5 | 8edf4815097e52d22fecafb6415c392d |
|
BLAKE2b-256 | 3d1ad5e29a6f896293e32ab3e63201df5d396599e57a726575adaafbcd9d70a6 |