module TTY::Screen
def size_from_tput
- Api: - private
Returns:
-
(Array(Integer, Integer), nil)-
def size_from_tput return unless output.tty? && command_exist?("tput") lines = run_command("tput", "lines") return unless lines cols = run_command("tput", "cols") [lines.to_i, cols.to_i] if nonzero_column?(cols) end