Feature request, as in #646, we already had a discussion how to easily show default values for options. As context_settings is already used to configure global settings anyway, the idea would be to allow the following:
@click.command(
help='Command helptext',
context_settings=dict(show_default=True))
@click.option("--test", default="foobar", help="Option helptext")
def cli(test):
pass
Which should enable show_default for all options and give the following help text:
$ cli --help
Usage: cli [OPTIONS]
Command helptext
Options:
--test TEXT Option helptext. Default: 'foobar'
--help Show this message and exit.
Feature request, as in #646, we already had a discussion how to easily show default values for options. As
context_settingsis already used to configure global settings anyway, the idea would be to allow the following:Which should enable
show_defaultfor all options and give the following help text:$ cli --help Usage: cli [OPTIONS] Command helptext Options: --test TEXT Option helptext. Default: 'foobar' --help Show this message and exit.