Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's ^W^W^W, not ^H^H^H.


Are 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


The 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.


Control-w deletes the previous word in Bash and in vi insert mode.


I believe, at least in Linux, the canonical line disipline also does ctrl-w. Pretty sure that behaviour isn't POSIX though.


Control-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....


Ah, 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...)


TIL ...


NERDS!!!!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: