Move around the command line without reaching for the arrow keys.
| Editing |
bind |
| start of line |
ctrl+a |
| end of line |
ctrl+e |
| delete to end of line |
ctrl+k |
| delete to start of line |
ctrl+u |
| delete previous word |
ctrl+w |
| clear screen |
ctrl+l |
| move back one word |
⌥+← |
| move forward one word |
⌥+→ |
| History |
bind |
| search history |
ctrl+r |
| previous / next command |
ctrl+p / ctrl+n |
| run previous command |
!! |
| last argument of previous command |
!$ |
| Navigation |
bind |
| go to previous directory |
cd - |
| go home |
cd |
| cancel current command |
ctrl+c |
| suspend to background |
ctrl+z |
| bring job to foreground |
fg |