If you use mintty as a terminal emulator (it has been the default terminal emulator for Cygwin for the past few years), you can use ANSI escape codes to control the terminal.
You can verify this by running the following Perl code snippet to resize the terminal emulator window:
$lines = 80;
$columns = 100;
print "\e[8;$lines;${columns}t";
Note. This does not work if you run it in a window screenand I do not know why. According to the screenman page , this escape sequence must be supported.
Description
The ANSI escape sequence syntax is not the easiest to read, but the documentation that provides the basis for the above sequence.
\e Escape, escape- ANSI.
Control Sequence Introduction (CSI).
, t, xterm
CSI Ps ; Ps ; Ps t
Window manipulation (from dtterm, as well as extensions).
These controls may be disabled using the allowWindowOps
resource. Valid values for the first (and any additional
parameters) are:
…
Ps = 8 ; height ; width -> Resize the text area to given
height and width in characters. Omitted parameters reuse the
current height or width. Zero parameters use the display's
height or width.