mirror of
https://github.com/crossterm-rs/crossterm.git
synced 2025-09-27 04:50:48 +00:00
11 lines
171 B
Rust
11 lines
171 B
Rust
use crossterm::tty::IsTty;
|
|
use std::io::stdin;
|
|
|
|
pub fn main() {
|
|
if stdin().is_tty() {
|
|
println!("Is TTY");
|
|
} else {
|
|
println!("Is not TTY");
|
|
}
|
|
}
|