Enable aliases for Click
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.1.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for click_aliases-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 229ecab12a97d1d5ce3f1fd7ce16da0e4333a24ebe3b34d8b7a6d0a1d2cfab90 |
|
MD5 | 792b2835877eb5c6f1bab8280e4e6915 |
|
BLAKE2b-256 | 7f2fef20be7d95d305218c9ecdb40b03b5d3286c50de374970e3a9c7790dd6d5 |