diff options
Diffstat (limited to 'examples/username-password.rs')
-rw-r--r-- | examples/username-password.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/username-password.rs b/examples/username-password.rs new file mode 100644 index 0000000..93071c9 --- /dev/null +++ b/examples/username-password.rs @@ -0,0 +1,10 @@ +use terminal_prompt::Terminal; + +fn main() -> std::io::Result<()> { + let mut terminal = Terminal::open()?; + let username = terminal.prompt("Username: ")?; + let password = terminal.prompt_sensitive("Password: ")?; + println!("Username: {username}"); + println!("Password: {password}"); + Ok(()) +} |