Ask for Yes/No Confirmation
cli_yeah.RdInteractive yes/no confirmation with cli styling. Returns TRUE for yes, FALSE for no. Follows the pattern from cli issue #488.
Usage
cli_yeah(
text,
yes = c("Yes", "yeah"),
no = c("No", "nope"),
n_yes = 1,
n_no = 1,
shuffle = TRUE,
...,
.envir = parent.frame()
)Arguments
- text
The question text (supports cli styling)
- yes
Character vector of affirmative options (default: c("Yes", "yeah"))
- no
Character vector of negative options (default: c("No", "nope"))
- n_yes
Number of yes options to show (default: 1)
- n_no
Number of no options to show (default: 1)
- shuffle
Whether to shuffle the options (default: TRUE)
- ...
Additional arguments passed to cli::cli_alert()
- .envir
Environment for glue interpolation