terminal_size

Function terminal_size_of

Source
pub fn terminal_size_of<Fd: AsFd>(fd: Fd) -> Option<(Width, Height)>
Expand description

Returns the size of the terminal using the given file descriptor, if available.

If the given file descriptor is not a tty, returns None