Solution 1:
$ echo $TERM $LINES $COLUMNS
screen-256color 41 146
$ docker exec -it -e TERM=$TERM -e LINES=$LINES -e COLUMNS=$COLUMNS YOUR_CONTAINER_NAME bash
Solution 2:
$ reset
Solution 3:
$ stty size
41 146
$ stty rows 41 cols 146
screen-256color 41 146
41 146
; reload the autohotkey script.
^!r::Reload
; input date and time
#d::
FormatTime, mydatetime,, M/d/yyyy HH:mm:ss
SendInput, %mydatetime%
return
; input date
#f::
FormatTime, mydate,, M/d/yyyy
SendInput, %mydate%
return
; input date
#y::
FormatTime, mydate,, yyyy-MM-dd
SendInput, %mydate%
return
; press ctrl-alt 1
^!1::
SendInput, Hello World
return
; In command prompt window, press shift + insert to paste from clipboard
#IfWinActive ahk_class ConsoleWindowClass
<+Insert::
SendInput, {Raw}%clipboard%
return
#IfWinActive
(new TextEncoder('utf-8').encode('foo')).length