[][src]Function term_basics_linux::prompt_scrollable

pub fn prompt_scrollable(msg: &str, his: &mut InputHistory) -> String

Prints a message to the user. The user can type its input next to the message on the same line. It will return the user input after the user pressed enter. It uses term_basics_linux::input_field_scrollable and supports the same operations.

Example

use term_basics_linux as tbl;
let mut his = tbl::InputHistory::new(10);
his.add(&"previously typed in name".to_string());
let name = tbl::prompt_scrollable("type your name: ", &mut his);
tbl::print("Your name: ");
tbl::println(name);