Could probably use Win32 functions for this. Maybe FreeConsole first, then AttachConsole with ATTACH_PARENT_PROCESS, then maybe able to use regular Golang stdin/out/err (otherwise use GetStdHandle or something maybe)
Might need a child process instead of doing this right in the asciinema process
Actually, reviewing how it starts a new shell, we could easily just start cmd.exe and steal that info
FreeConsole
first, thenAttachConsole
withATTACH_PARENT_PROCESS
, then maybe able to use regular Golang stdin/out/err (otherwise useGetStdHandle
or something maybe)