4 ms·
It's ^W^W^W, not ^H^H^H.
by mpyne 13y ago
It's ^W^W^W, not ^H^H^H.
- fnordfnordfnord 13y agoAre you sure? I'm happy to be corrected if I am missing something. I'll admit I don't know the origin of this convention; but I don't understand how the caret code for "End Transmission Block" makes more sense than the one for "Backspace". https://en.wikipedia.org/wiki/ASCII#ASCII_control_code_chart https://en.wikipedia.org/wiki/ASCII#ASCII_control_code_chart
- totalforge 13y agoNERDS!!!!
- js2 13y agoControl-w deletes the previous word in Bash and in vi insert mode.
- jlgreco 13y agoI believe, at least in Linux, the canonical line disipline also does ctrl-w. Pretty sure that behaviour isn't POSIX though.
- fnordfnordfnord 13y agoTIL ...
- kps 13y agoControl-W for ‘delete word’ entered Unix in BSD 4.x, along with changing to ^U for line erase (Bell Labs used ^X), ^R for refresh (consensus has reverted to ^L), and ^T for status (which Linux annoyingly still doesn't have). These came from Tenex / TOPS-20, which also had a fancy command completion scheme whose vestiges can be seen in ftp(1) as well as Cicso gear. Job control (with ^Z and ^Y) entered at the same time. At least Linux/SysV saw the usefulness of that....
- jlgreco 13y agoAh, excellent! Good to know that it is more ubiquitous than I suspected. (The lack of ^T on Linux really annoys me too. What is worse is that it isn't just a matter of the line discipline sending SIGINFO for ^T... because Linux doesn't have SIGINFO at all. Means you can't even really hack up a pty wrapper program that emulates it, unless you are willing to have everything use a different signal in lieu of SIGINFO...)
- mpyne 13y agoThe Backspace key had the same scan code as Control-H, so ^H is what you would see when you typed Backspace on a misconfigured TTY (instead of it deleting the previous character). Control-W is what you use to delete the previous word (Edit: word, not character), so ^W is what you would have seen on TTYs/Editors that didn't support that command.