Readline / Command Line Shortcuts

Readline / Command Line Shortcuts

CTRL-A Goto start of line
CTRL-E Goto end of line
CTRL-W Cut word to left
ALT-D Cut word to right
ALT-B Move one word to left
ALT-F Move one word to right

Turns out you can also use alt + arrow keys:
ALT-LEFT Move one word to left
ALT-RIGHT Move one word to right

By default ALT does not work in iTerm or Terminal on OS X. However this is a fix.

Leave a Reply

Your email address will not be published. Required fields are marked *