This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Resizing a terminal window


David,
you're very welcome!
H.

On 5/7/2010 12:29 PM, J. David Boyd wrote:
Hans Horn<hannes@2horns.com> writes:

David,

This took me forever to figure out!

'expect' does not forward SIGWINCH
(http://en.wikipedia.org/wiki/SIGWINCH) unless told to do so.

Add the following snippet (between lines marked with
###################) to the beginning of your 'expect' script:

#!/bin/sh
# \
exec expect -f "$0" ${1+"$@"}

###################
trap { # trap sigwinch and pass it to the child we spawned
   set rows [stty rows]
   set cols [stty columns]
   stty rows $rows columns $cols<  $spawn_out(slave,name)
} WINCH
###################

set host [lindex $argv 0]
...

I use this to log on from cygwin to various AIX and LINUX machines.

Good luck and let me know how goes,
Hans


That worked perfectly!  Thank you very much, I don't think I would have
ever figured that out!

Dave



-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]