Skip to main content

ask

Function ask 

Source
pub fn ask(question: &str) -> Option<String>
Expand description

Asks question on stderr and reads one non-empty line from stdin.

None when there is no terminal to ask, or when stdin reaches end of file. The question goes to stderr so that a caller’s own answer stays the only thing on stdout.