4 ms·
Note that I think that's a Bash thing, and the default is Emacs-style bindings (C-a, C-e, C-p, C-n) which include C-r for reverse interactive search of the hist
by spacemanaki 16y ago
Note that I think that's a Bash thing, and the default is Emacs-style bindings (C-a, C-e, C-p, C-n) which include C-r for reverse interactive search of the history. I use that every day, a dozen or more times.
- fkcek 16y agoMy favorite is C-t to correct typos like 'liek' instead of 'like', I put the cursor between the e and the k and i press C-t.
- graywh 16y agoIt's actually a Readline thing.
- spacemanaki 16y agoYeah, that makes sense. Still, my point was that it's not specific to Terminal.app, so someone on another Unix would probably find it useful.
- CountSessine 16y agoSomething I've always wondered though - did emacs take them from readline or did readline take them from emacs? How old is readline? Where did all of those C-a, C-e, etc conventions come from?
- mturmon 16y agoThey came from emacs. Readline is now around v6, readline v2 seems to have been from the mid 1990s. There is a smaller set of standard commands for killing (C-h for char, C-w for word, C-u for line) which are used in many terminal apps. They are orthogonal to emacs, and probably about as old (1970s).
- spudlyo 16y agoThose emacs style editing commands actually came from TECO in the 70s. Crazy that those editing commands are hardwired into my brain nearly 40 years later.