pub fn get_terminal_width() -> usize
Expand description
Get the width of the terminal.
This function attempts to determine the terminal width using multiple approaches:
- Environment variables: Check COLUMNS and TERM_WIDTH
- Use ioctl system call to get terminal size directly
- Try tput command as fallback
- Fallback to 80 columns