News for hackers. Stuff that matters.
Re:"Rules" that terminal programs follow by CorrectHorseBat on Thursday December 12, 2024 @03:48PM (#42403183)
ctrl-w and ctrl-u are just the emacs edit commands from readline. If you are a sensible person and use vi mode they do nothing.
Re:"Rules" that terminal programs follow by blueflow on Thursday December 12, 2024 @05:17PM (#42403994)
Do an "stty -a" in the terminal - you will see these two keys are handled by the kernel itself and will also work with programs reading dumbly from stdin, like "cat".
Re:"Rules" that terminal programs follow by kps on Thursday December 12, 2024 @05:29PM (#42404095)
Ctrl-W originates (on Un*x) from the ‘new’ BSD tty driver in the late '70s. Ctrl-U vs Ctrl-X was one of those BSD-vs-AT&T things (where V7 defaulted to ‘@’ 'cause your terminal might not have those fancy control characters). `vi` respected the current tty settings.
Re:"Rules" that terminal programs follow by d3VwsX on Friday December 13, 2024 @09:39AM (#42408782)
Ctrl-w and ctrl-u in a default emacs do not even do the same things as in readline.

C-w is (usually) kill-region (similar to what most editors call "cut").

C-u is universal-argument, that is used as a prefix for other commands to add arguments.