I assume I just need to run a shell command (from env's $SHELL or something), display its output, and relay user input.
For display, its mostly just outputting to string, but with ansi escape codes supported.
This rust terminal overview by a guy who I've seen a lot in the rust space and github goes over the most basic required features.
This and other sources are telling me to use nix::pty::forkpty but I really don't see why a simple Command won't do.
After just a bit more research, I guess the terminal emulator and shell talk to each other not with Stdio but with a pseudo-terminal, which is why we can't simply use Command's stdin and stdout.
I assume I just need to run a shell command (from env's $SHELL or something), display its output, and relay user input.
For display, its mostly just outputting to string, but with ansi escape codes supported.
This rust terminal overview by a guy who I've seen a lot in the rust space and github goes over the most basic required features.
This and other sources are telling me to use
nix::pty::forkptybut I really don't see why a simpleCommandwon't do.After just a bit more research, I guess the terminal emulator and shell talk to each other not with Stdio but with a pseudo-terminal, which is why we can't simply use Command's stdin and stdout.