Whenever you create a command or group with Click, there's a default --help option to bring the usage guide:
import click
@click.command()
def main():
click.echo('Success!')
if __name__ == '__main__':
main()
If I run the file with the --help, I should get:
$ python file.py --help
Usage: file.py [OPTIONS]
Options:
--help Show this message and exit.
Now, Click allows you to override how the help option is called through the terminal via a parameter in the decorator:
@click.command(
context_settings=dict(
help_option_names=['-f', '--foo']
)
)
def main():
click.echo('Success!')
$ python file.py -f
Usage: file.py [OPTIONS]
Options:
-f, --foo Show this message and exit.
However, rummaging through Click's documentation, I don't see a similar option to override the default help message.
Is there a parameter to specify to click.command that overrides the text "Show this message and exit" when calling for help in the terminal?