terminal-prompt

Crates.ioterminal-prompt
lib.rsterminal-prompt
version0.2.3
sourcesrc
created_at2023-08-03 15:39:10.800518
updated_at2023-08-09 19:36:34.206738
descriptionTiny library for prompting sensitive or non-sensitive data on the terminal
homepage
repositoryhttps://github.com/de-vri-es/terminal-prompt-rs
max_upload_size
id933718
size18,307
Maarten de Vries (de-vri-es)

documentation

https://docs.rs/terminal-prompt

README

terminal-prompt

Tiny library for prompting sensitive or non-sensitive data on the terminal.

The only dependency is libc on Unix and winapi on Windows.

See Terminal for the API documentation.

Example

Read a username and password from the terminal:

use terminal_prompt::Terminal;
let mut terminal = Terminal::open()?;
let username = terminal.prompt("Username: ")?;
let password = terminal.prompt_sensitive("Password: ")?;
Commit count: 22

cargo fmt