I am using python click to implement a cli. Simplest example would allow me to say:
./mytest.py help
but also
./mytest.py h
In other words, the help command can be shortened to just h. This is the way many cli programs work, e.g. git.
From what I can tell the code snippet:
@click.command()
def help():
click.echo("Help!)
Will allow me to have:
./mytest.py help
But I don't know how to allow the synonym. I can't find anything that explains this.