Callback that print the help page on ``<stdout>`` and exits.
(ctx: Context, param: Parameter, value: bool)
| 558 | """ |
| 559 | |
| 560 | def show_help(ctx: Context, param: Parameter, value: bool) -> None: |
| 561 | """Callback that print the help page on ``<stdout>`` and exits.""" |
| 562 | if value and not ctx.resilient_parsing: |
| 563 | echo(ctx.get_help(), color=ctx.color) |
| 564 | ctx.exit() |
| 565 | |
| 566 | if not param_decls: |
| 567 | param_decls = ("--help",) |