Troubles printing a shell to a view
Author: bLukaCreated Feb 17, 2019Updated Dec 2, 2020
Hello,
I'm having troubles trying to run a shell inside a view.
I'm going through a pseudo-terminal (currently using kr/pty's module here: https://github.com/kr/pty).
I had an issue passing my view as the dest of my io.Copy, having the pseudo-terminal as source. I needed to rewrite io.Copy using Gui.Update on each write.
Next, I am able to print the prompt, but unable to print any other following output (like commands I'd type). It seems fmt.Fprint doesn't like forwarding my pseudo-terminal output to my view.
Everything works absolutely fine when I replace the io.Writer of my view by os.Stdout.
Would gocui be able to handle this use case?
Source: jroimartin/gocui