Add aliases to click-hotoffthehamster commands
Project description
Add (multiple) aliases to a click group or command.
In your click app:
import click_hotoffthehamster as click
from click_hotoffthehamster 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
Built Distribution
File details
Details for the file click_hotoffthehamster_alias-1.0.7.tar.gz
.
File metadata
- Download URL: click_hotoffthehamster_alias-1.0.7.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b70ccdcfcf6f4d693cc32e20647b40328eb57c671d7bff9d1d271cb9cc49750 |
|
MD5 | 0bc2e6131bbf73dfaf168e187b0a4a47 |
|
BLAKE2b-256 | dd418847245cb94a63c1f517657ab5b2802a39c4c10b72791b28dfe94b99df86 |
File details
Details for the file click_hotoffthehamster_alias-1.0.7-py3-none-any.whl
.
File metadata
- Download URL: click_hotoffthehamster_alias-1.0.7-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cd19d2f5434b89c9df67934b9ee2a62d21e439e616e007f26e05bef9027c914 |
|
MD5 | 3f3c830fdf819cf87f334e6c94d658f8 |
|
BLAKE2b-256 | 375e7d8e4f8fc960a5c091a0ab767327bc9046f1e9586901434abad3220de50f |