Open pkulev opened 1 week ago
Thanks for opening this issue!
This is related to #73 and #29.
I would say this is not a bug, it is intentional. We do not rich mark-up click.confirm()
(and click.prompt()
) for the same reason we do not rich mark-up click.echo()
. The rationale is described in this comment here: https://github.com/ewels/rich-click/pull/29#issuecomment-2081474377
Rich has an internal feature for this as well: https://rich.readthedocs.io/en/stable/prompt.html
import rich.prompt
yes = rich.prompt.Confirm.ask("Confirm?")
I'll keep this issue open for now, but I am leaning toward this not being something we will do. IMO, users interested in a click.confirm()
or click.prompt()
that is marked up should use the rich.prompt
module.
That said, we still don't document this intentional decision, and we should point users toward this alternative.