commit 36afebd9778a8048ac5212d52c797b50b1615cbd
parent b4ca44433abf5aafd04677d72391ca782c95487f
Author: Alex Balgavy <alexander.balgavy@spaceapplications.com>
Date: Fri, 24 Oct 2025 21:23:18 +0200
sshw: fix terminal size
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/scripts/sshw b/scripts/sshw
@@ -31,6 +31,7 @@ for {set i 0} {$i < $argc} {incr i} {
-R -
-D -
-L -
+ -i -
-J {
lappend command $ssharg [lindex $argv [expr {$i + 1}]]
incr i
@@ -67,10 +68,17 @@ proc login {pass command} {
# Variables written in procedures don't change globally,
# but spawn_id has to be global for expect to work.
global spawn_id
+ global spawn_out
# Connect
eval spawn $command
+ trap {
+ set rows [stty rows]
+ set cols [stty columns]
+ stty rows $rows columns $cols < $spawn_out(slave,name)
+ } WINCH
+
expect {
# Change password as needed
-ex "New password: " {