cli_yeah {cloudfs} | R Documentation |
User Interface: Ask a Yes/No question
Description
This function is inspired by (if not mostly copied from)
usethis::ui_yeah
function. It's purpose is to ask user a yes/no question.
The differences are:
It is more limited in answer options customization. This is done on purpose to standardize command line dialogues in our code.
It uses
cli
package under the hood, socli
rich text formatting is possible.
Usage
cli_yeah(x, straight = FALSE, .envir = parent.frame())
Arguments
x |
Question to display. |
straight |
(logical) Ask a straight Yes/No question? By default (when
|
.envir |
Environment to evaluate the glue expressions in. |
Value
(logical) Returns TRUE
when the user selects a "yes" option and
FALSE
otherwise, i.e. when user selects a "no" option or refuses to make
a selection (cancels).