Click: enable -h as an alias for --help

Created on 7 Dec 2016  Â·  2Comments  Â·  Source: pallets/click

Maybe I'm just not finding this in the docs, but is there a way to enable -h as an alias for --help? If not, could this option be added?

Most helpful comment

CONTEXT_SETTINGS = {'help_option_names': ['-h', '--help']}
@click.group(context_settings=CONTEXT_SETTINGS)

All 2 comments

CONTEXT_SETTINGS = {'help_option_names': ['-h', '--help']}
@click.group(context_settings=CONTEXT_SETTINGS)

Awesome, thanks Robin.

On Dec 7, 2016 1:17 PM, "Robbin Bonthond" notifications@github.com wrote:

CONTEXT_SETTINGS = {'help_option_names': ['-h', '--help']}
@click.group(context_settings=CONTEXT_SETTINGS)

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pallets/click/issues/700#issuecomment-265576080, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAgHct1aPCPpkImBXrVl9vl6W9yi0Jkzks5rFyJ4gaJpZM4LHDM6
.

Was this page helpful?
0 / 5 - 0 ratings