Skip to content

doblabs/click-hotoffthehamster-alias

 
 

Repository files navigation

click-hotoffthehamster-alias

Build Status

Coverage Status

Documentation Status

GitHub Release Status

PyPI Release Status

PyPI Supported Python Versions

License Status

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.

About

Dob Click aliases (using click-hotoffthehamster fork)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Makefile 60.5%
  • Shell 29.4%
  • Python 10.1%