Registry / utility / termsize

termsize

JSON →
library0.1.9rscratesunverified

Retrieves the terminal size (width and height) in a cross-platform manner.

# Cargo.toml [dependencies] termsize = "0.1.9"
INSTALL
IMPORT
SIG · TERMSIZE
T
termsize
utilityrustv0.1.9
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.

get
use termsize::get;

Get the current terminal dimensions

use termsize; fn main() { if let Some(size) = termsize::get() { println!("Terminal size: {}x{}", size.cols, size.rows); } else { eprintln!("Could not determine terminal size"); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.9latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
termsize — cargo add termsize · libregistry