views:

14

answers:

1

I'm using some Ruby code that shells out to stty size to get the size of the terminal, but I'm running on Windows. What is the Windows equivalent?

A: 

The MODE command will report the size of the window buffer but not the actual window size.

You may have to write a utility to get the window size using GetConsoleScreenBufferInfo.

See: http://msdn.microsoft.com/en-us/library/ms683171(v=VS.85).aspx

MJZ