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

Emacs/readline bindings for Delete Word. Open up a bash shell, type in `foo bar baz`, then press ctrl-W twice.

'^W' is what would appear instead if you weren't in a readline/emacs editor, but instead a dumb line terminal. Thus, leaving '^W' behind makes it look like you didn't realize what you just corrected is still visible.

It's a joke. I've now explained and ruined it.



Slashdot posters would use ^H^H in their posts (backspace)


It goes back way further than that - probably to the dawn of IRC or so.


I believe it dates back to the unix talk(1) program, quite a bit earlier than IRC.


It’s from the dec terminal emulation, VT100. I think specifically when you connected to like an ansi type system with dec mode. Or something like that, the memories are fuzzy


The keystroke certainly does, but I was talking about people inserting ^h and ^w in the middle of conversations, which is a bit harder to nail down, though the practice is older than the parent thought.


^H was backspace on teletypes, which probably dates back to the 1960's.


Ah okay makes sense! It's amazing the gaps in knowledge I still have with a lot of things.

I've used Linux daily for like 15 years now, and I know about control characters, but since I never really used emacs (or readline beyond the copy+pasted command here or there) I just completely missed the meaning.


Not emacs (it means kill-region there, which deletes the text between the cursor and the mark and saves it in a holding area, fairly close to what windows does when you hit ^x, except the holding area is fancier).

This readline behavior follows a Unix tty driver. I'm not sure off the top of my head which one introduced it. I don't think it was on xenix but am pretty sure some 4.x bsd had it.


In days of yore the joke was always ^H^H after IBM/DEC backspace v delete confusion




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

Search: