askYesNo
will accept case-independent partial matches to the prompts.
If no response
is given the value of default
will be returned; if a non-empty
string that doesn't match any of the prompts is entered, an error will be
raised.
If a function or single character string naming a function
is given for prompts
, it will be called as
fn(msg = msg, default = default, prompts = prompts, ...)
. On
Windows, the GUI uses the unexported utils:::askYesNoWinDialog
function for this purpose.
If strings (or a string such as "Y/N/C"
) are given as prompts
,
the choices will be mapped to lowercase for the non-default choices, and
left as-is for the default choice.