commit | 3a0b3496f467f9e1a4cb40fe12fd008d872f30dd | [log] [tgz] |
---|---|---|
author | Matthew Maurer <[email protected]> | Thu May 26 12:32:27 2022 -0700 |
committer | Matthew Maurer <[email protected]> | Fri May 27 15:17:15 2022 -0700 |
tree | 018c66fcc6aaa261baa14a1ee7b0287f05167171 | |
parent | b0635c5ca913a4adac28e61dd66ffbc1e6e3427d [diff] |
Update TEST_MAPPING Test: None Bug: 233924440 Change-Id: I69ea56de3ceab942c697a2ad9ef5a059b5a6c539
Rust library to getting the size of your terminal.
Works on Linux, MacOS, Windows, and illumos.
use terminal_size::{Width, Height, terminal_size}; let size = terminal_size(); if let Some((Width(w), Height(h))) = size { println!("Your terminal is {} cols wide and {} lines tall", w, h); } else { println!("Unable to get terminal size"); }
This crate requires a minimum rust version of 1.31.0 (2018-12-06)
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.