Terminal Utilities
Provides a cross-platform way to disable terminal echo or check if a stream is a tty.
Functionality similar to python getpass and os.isatty
Tested on Linux, macOS, and Windows. BSD will also probably work but hasn't been tested.
The windows portion uses the new official windows crate instead of the older winapi crate.
Example: Get a password
use read_password;
Write;
print!;
stdout.flush?;
let pass = read_password?;
println!;
println!;
Example: Check if standard output has been redirected
use
let is_tty = isatty;
if is_tty else