IRB: How to get the display column width

Installation

gem install ruby-terminfo

Usage

require 'terminfo'
p TermInfo.screen_size        # [lines, columns]

Resources