Hacker News new | ask | show | jobs
by hnlmorg 3196 days ago
Ahh so the prompt isn't bash then? That explains some of the bugs I got.

I'm not going to criticize your approach as it totally makes sense in terms of building a minimum viable product but I do think you're going to run into a lot of problems with that approach as your project gains traction as it's very different to how a terminal emulators traditionally work. Plus you'll potentially spend a lot of time reimplementing Bash features like it's builtins, scripting features and the multitude of parsers it runs (depending on if you're interested in having a REPL environment like you would normally would with $TERM + $SHELL).

That all said, it looks like you're handling pseudo TTYs decently, which is an easy thing to get wrong (I say that from experience as I've screwed up PTYs in the past!) but also probably the most important part to get right, in my opinion.