9
3
I'll often find myself writing out long commands in the bash shell - things with many arguments, web addresses, routes, etc and so on. Every so often I will realize I forgot to, say, put my "bundle exec" at the beginning of the command, or misspelled something, or forgot quotes. Or something as simply as putting "cd" instead of "vim".
Thus begins the tedious process of holding the left arrow key until I get back to the beginning of the command.
Is there an any way to jump to the beginning of the line again?
2You might want to get rid of the default terminal app, and download iTerm – Clement Herreman – 2011-10-25T15:44:48.333
Why? I just checked, and it seems to behave pretty much the same. (The home key works, now, but since I have the other keys that doesn't really matter). What does it offer that would make it worth redoing all my settings and configurations and tasks and whatnot? – GlyphGryph – 2011-10-25T15:49:57.073
This seems like something you can setup with .inputrc – Rob – 2011-10-25T16:42:41.973
Also, to jump one word at a time, use ⌥B and ⌥F to jump back and forth, respectively. – fideli – 2011-11-01T01:08:35.307
@fideli, but only if you’ve enabled “Use Option as meta key”. Note that as of Mac OS X Lion 10.7, Terminal’s default keyboard settings map Option-Left Arrow/Right Arrow to Esc-b/f so there’s no configuration needed. – Chris Page – 2011-11-03T03:40:46.547