Skip to content

Allow both click.echo() and rich.print() as printing options. #233

Open
@dwreeves

Description

@dwreeves
  • Replace click.echo() everywhere in code as it currently exists with a toggle-able, non-user-facing echo.
    • Ensure rich.print() is always lazy-loaded!
  • Override help_option decorator and Command.get_help_option() method. The help_option override should be part of the shimmed overrides in __init__py.

This can be a 1.9 or later feature, but only with ability to toggle on via config with click.echo() as default. The config option should be: use_rich_print: bool = False.

I will not be doing this myself for the foreseeable future, or possibly ever, but I am open to anyone who wants to take a stab, as I think it is a reasonable feature since Rich is good at handling printing of text. Because this is the sort of feature that impacts user-specific runtimes more than it does the application itself, I would also be open to it being an environment variable. Maybe RICH_CLICK_USE_RICH_PRINT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions