passterm 2.0.6

Read terminal password, check isatty
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2021-2024 Kyle Schreiber
// SPDX-License-Identifier: BSD-3-Clause

use passterm::{Stream, isatty};

fn main() {
    let stdin_tty = isatty(Stream::Stdin);
    let stdout_tty = isatty(Stream::Stdout);
    let stderr_tty = isatty(Stream::Stderr);

    eprintln!("stderr");
    println!("stdout");

    println!("stdin_tty : {}", stdin_tty);
    println!("stdout_tty: {}", stdout_tty);
    println!("stderr_tty: {}", stderr_tty);
}