Registry / utility / is-terminal

is-terminal

JSON →
library0.4.17rscratesunverified

Test whether a given stream is a terminal.

# Cargo.toml [dependencies] is-terminal = "0.4.17"
INSTALL
IMPORT
SIG · IS-TERMINAL
I
is-terminal
utilityrustv0.4.17
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

is_terminal
use is_terminal::is_terminal;

Checks if stdout is a terminal and prints the result.

use is_terminal::is_terminal; fn main() { if is_terminal(&std::io::stdout()) { println!("stdout is a terminal"); } else { println!("stdout is not a terminal"); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.4.17latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
is-terminal — cargo add is-terminal · libregistry