[][src]Function term_basics_linux::prompt

pub fn prompt(msg: &str) -> 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 and supports the same operations.

Example

use term_basics_linux as tbl;
let name = tbl::prompt("type your name: ");
tbl::print("Your name: ");
tbl::println(name);