Adding upstream version 0.2.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
c7e0ec57a4
commit
7f48381065
14 changed files with 647 additions and 0 deletions
18
README.md
Normal file
18
README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# 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:
|
||||
```rust
|
||||
use terminal_prompt::Terminal;
|
||||
let mut terminal = Terminal::open()?;
|
||||
let username = terminal.prompt("Username: ")?;
|
||||
let password = terminal.prompt_sensitive("Password: ")?;
|
||||
```
|
||||
|
||||
[`Terminal`]: https://docs.rs/terminal-prompt/latest/terminal_prompt/struct.Terminal.html
|
Loading…
Add table
Add a link
Reference in a new issue