Skip to main content

confirm

Function confirm 

Source
pub fn confirm(prompt: &str) -> bool
Expand description

Asks a yes/no question on stdout and reads the answer from stdin.

Prints "<prompt> [y/N]: " (the default is no) and reads one line, also when stdin is not a terminal. y, yes, a and ano in any case are yes; everything else is no. See the module documentation for the comparison with click.