click icon indicating copy to clipboard operation
click copied to clipboard

Allow epilog without indentation.

Open Phrogz opened this issue 8 months ago • 2 comments

When adding an epilog to a group, the text appears to be indented under the commands list.

@click.group(
    context_settings={"max_content_width": 100, "show_default": True},
    epilog="""\b
    Example Usage:
        # Run this stuff first
        $ some-command
        
        # Then run this command
        my-click-script go
    """,
)
def regression() -> None:
    """This is a tool with lots of commands."""
    pass
$ regression --help

Usage: regression [OPTIONS] COMMAND [ARGS]...

  This is a tool with lots of commands.

Options:
  --help  Show this message and exit.

Commands:
  bundle  Wrap it all up.
  guard   Run lots of verifications.
  report  Generate a report from a bundle.
  run     Do stuff.
  store   Don't use this; it's for CI/CD only.
  verify  Compare two reports and verify they are identical.

  Example Usage:
      # Run this stuff first
      $ some-command
      
      # Then run this command
      regression guard

I want the entire epilog to not be indented. Perhaps indent-epilog=False?

Phrogz avatar Apr 09 '25 23:04 Phrogz

I will keep an eye on this to see if it gathers community support.

Rowlando13 avatar Apr 11 '25 06:04 Rowlando13

It has my support! Is there a simple workaround for that in the meantime?

jpmvferreira avatar Jul 31 '25 21:07 jpmvferreira