Move the cursor to Destination.
| Command | Destination |
|---|---|
| Ctrl + a | Start of line |
| Ctrl + e | End of line |
| Alt + b | Start of word |
| Alt + f | End of word |
Ctrl + xx: Start of line (and back again)
Delete everything between the current cursor position and Destination.
| Command | Destination |
|---|---|
| Ctrl + u | Start of line |
| Ctrl + k | End of line |
| Ctrl + w | Start of word |
| Alt + d | End of word |
| Command | Description |
|---|---|
| history | List all entries |
| history 3 | List last 3 entries |
| Ctrl + r | Search history (or next result) |
| Ctrl + s | Previous search result |
| Command | Description |
|---|---|
| !123 | Command #123 |
| !! | Last command |
| !-2 | Second-last command |
| !ssh | Last command beginning with ssh |
| !?ssh | Last command ending with ssh |
| !?ssh? | Last command containing ssh |
| !123:0 | Token [0] of command #123 |
| !!:0 | Token [0] of last command |
| !-2:0 | Token [0] of second-last command |
| !!:1* | Tokens [1] to [size-1] of last command |
| !!:1-$ | Tokens [1] to [size-1] of last command |
| !!:* | Tokens [1] to [size-1] of last command |
^foo^bar^: Replace foo with bar in last command and execute