From: James Gray Date: 2008-09-27T00:49:54+09:00 Subject: Re: How to get terminal dimensions without using curses or ncurses? On Sep 26, 2008, at 4:05 AM, Brian Candler wrote: > Kenneth McDonald wrote: >> I'd like to be able to print to terminal and do some reasonable >> formatting, without going to the trouble of learning curses. I simply >> need to know the dimensions of the terminal, but that info doesn't >> appear to be available in the ENV variables (which is what I'd >> expected.) Is there a way to get this info? >> >> Thanks, >> Ken > > There is code in Ruport that you could try. > > http://stonecode.svnrepository.com/svn/ruport/ruport/trunk/lib/ruport.rb > > Search down to "terminal_size" Looks to me like Greg took that code right out of HighLine. :) James Edward Gray II