Skip to main content

pick

Function pick 

Source
pub fn pick(title: &str, options: &[String]) -> Result<Option<usize>>
Expand description

Number the options and read a 1-based choice from stdin. EOF or input that is not a valid number picks nothing, so non-interactive callers fall through to their error path.