0

Possible Duplicate:
How to change previous/next word shortcut in bash?

When connected to a ubuntu server bash shell, I can hold alt key and press the left or right keys to move forward or backward a word. It is incredibly useful.

Is this behaviour defined in the .bash_profile or can it be? I.e. can I bring this behaviour into my OSX shell?

Ross
  • 103

1 Answers1

1

Put this into your ~/.bash_profile:

bind '"\M-\e[C":forward-word'
bind '"\M-\e[D":backward-word'

Checked on OS X Lion.