commit | f5a08b3f29127ae7ae3dd7b6c9f68f4aeb033d08 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Aug 25 07:55:59 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Aug 25 07:55:59 2022 +0000 |
tree | 018c66fcc6aaa261baa14a1ee7b0287f05167171 | |
parent | 1c6648784a23b23c9860ea0965247bc28186fb74 [diff] | |
parent | 427d44546617e3beabb2c5347655daa235bc4520 [diff] |
Snap for 8992082 from 427d44546617e3beabb2c5347655daa235bc4520 to gki13-boot-release Change-Id: I980aa97900db481c11a27cc354a810ef9a43e526
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.