Skip to main content

select_with_default

Function select_with_default 

Source
pub fn select_with_default<S: Into<String>>(
    prompt: S,
    items: &[String],
    default: usize,
) -> Result<usize>
Expand description

Prompt for selection with a default index

Returns the selected index. Returns the default in non-interactive mode.