Is there a way to enable Ctrl + ← / → keyboard shortcuts (go to previous / next word) in the Bash console installed with MSysGit?
question from:https://stackoverflow.com/questions/4094828/msysgit-bash-how-to-enable-ctrlleft-right-arrowsIs there a way to enable Ctrl + ← / → keyboard shortcuts (go to previous / next word) in the Bash console installed with MSysGit?
question from:https://stackoverflow.com/questions/4094828/msysgit-bash-how-to-enable-ctrlleft-right-arrowsAt your Bash prompt, press Ctrl-v Ctrl-Left-Arrow and Ctrl-v Ctrl-Right-Arrow and make note of the output. You should see something like: ^[OD
and ^[OC
or similar. Add the following lines to your ~/.inputrc
:
"eOC": forward-word
"eOD": backward-word
where you will substitute e
for escape (^[
) and the rest of the characters you got (OD
, OC
or similar).
To re-read the file and make the changes active immediately, press Ctrl-x Ctrl-r.