[][src]Function rubric::helpers::cli::confirm

pub fn confirm(message: &str) -> bool

Prints the message, then returns true if the user enters y/yes, false otherwise.

This method will append [y/N] to the message.

use rubric::helpers::cli;

if cli::confirm("Are you sure?") {
    // they entered y
} else {
    // they entered anything else
}