Interesting, I have not heard of these terms before. Thanks for sharing!
I think this adds the bit of nuance that was bugging me: using something like ncurses or vim, presumably when you press a key like ctrl-z or ctrl-d it actually sends the character to the app. It would feel a bit silly if the terminal intercepted the ctrl-d, flushed some buffer, and the program had to reverse engineer whether you pressed ctrl-d or enter or something.
For raw mode, I assume the app asks the tty to please forward some characters to the app. Otherwise, in the default cooked mode, the tty intercepts those control characters to call certain functions. I suppose some REPLs may choose to emulate a cooked mode on top of raw mode, and so they have to handle the \x04 in the same way a tty would to keep it functioning like the user expects. I believe readline
does something like this, which is why you had to use bash --noediting
for ctrl-d to run the command. Good food for thought :)
I also have to say, naming it "cooked mode" is extremely funny as gen z. I love that
Ohh I gotcha. Honestly no sweat, its kind of just a bit of fun trivia really :)