Bash keyboard shortcuts on Mac OS X

Alec Jacobson

March 14, 2010

weblog/

Found this list of Bash keyboard shortcuts on Mac OS X. Here are my favorites that I want to remember: Say you have typed ( where the pipe, "|", represents where your cursor is):
mv foo bar|
Then if you hit CTRL+[ then B you will move back one word:
mv foo |bar
To go forward again hit CTRL+[ then F:
mv foo bar|
Now the coolest one, to swap the last two words hit CTRL+[ then T:
mv bar foo|