Handle this in readline(), so that we can respond to it by cancelling the current command input, or (later) terminating a command that is currently executing.
Though, other shells seem to instead only exit if the exit command is run, or sometimes if Ctrl-D is entered. Might want to come back to this eventually.
Also, this is only implemented for Node CLI. I didn't know where to start with making Puter's terminal exit correctly. :sweat_smile:
This also made me notice that Ctrl-C on a previous history item will erase that item. I didn't manage to fix that in the end, but did make some small improvements to the history code while I was there.
Fixes #65.
Handle this in readline(), so that we can respond to it by cancelling the current command input, or (later) terminating a command that is currently executing.
Though, other shells seem to instead only exit if the
exit
command is run, or sometimes ifCtrl-D
is entered. Might want to come back to this eventually.Also, this is only implemented for Node CLI. I didn't know where to start with making Puter's terminal exit correctly. :sweat_smile:
This also made me notice that Ctrl-C on a previous history item will erase that item. I didn't manage to fix that in the end, but did make some small improvements to the history code while I was there.