Reads a line of text interactively from the console, using the given `prompt` and pre-filling the input with `previous`. If `history` is not `None`, then this appends the newly entered line into the history and allows navigating through it.
(
console: &mut dyn Console,
prompt: &str,
previous: &str,
mut history: Option<&mut Vec<String>>,
echo: bool,
)
| 435 | /// the input with `previous`. If `history` is not `None`, then this appends the newly entered line |
| 436 | /// into the history and allows navigating through it. |
| 437 | async fn read_line_interactive( |
| 438 | console: &mut dyn Console, |
| 439 | prompt: &str, |
| 440 | previous: &str, |
| 441 | mut history: Option<&mut Vec<String>>, |
| 442 | echo: bool, |
| 443 | ) -> io::Result<String> { |
| 444 | Readline::new(console, prompt, previous, history.take(), echo)?.run().await |
| 445 | } |
| 446 | |
| 447 | /// Reads a line of text interactively from the console, which is not expected to be a TTY. |
| 448 | async fn read_line_raw(console: &mut dyn Console) -> io::Result<String> { |
no test coverage detected