Hacker News new | ask | show | jobs
by jerf 23 days ago
Not only can you implement that with PTYs, it's how they operate by default. That's why you can telnet to an HTTP server and make a mistake and use backspace to fix it. The terminal will only send lines over. You have to use a command to put it into "raw" mode so the application gets every keystroke immediately. You have to ask for your PTY to not work that way.
1 comments

That's not the same thing - with a pty in line mode, you get one line that you can edit, and when you hit enter, it gets sent. With Domain/OS, you still get to edit your last line until you hit enter... but if the process is otherwise blocked and doesn't consume it immediately, you can up-arrow and continue editing the earlier bits too. (Pretty sure it didn't work with telnet in particular, the common cases I remember were issuing a foo;bar;baz commandline and "working on" the input to baz while foo and bar were still running.)