For the Linux bash shell users out there, here are some short cuts that will save you time when entering commands (from Getting Started with Bash):
- Commands to take advantage of bash’s Emacs Mode:
| ctrl-a | Move cursor to beginning of line |
| ctrl-e | Move cursor to end of line |
| meta-b | Move cursor back one word |
| meta-f | Move cursor forward one word |
| ctrl-w | Cut the last word |
| ctrl-u | Cut everything before the cursor |
| ctrl-k | Cut everything after the cursor |
| ctrl-y | Paste the last thing to be cut |
| ctrl-_ | Undo |
The above commands are the default emac version. There is also a “vi” version you can use which mimics vi editing commands. I am a vi users, so I’m tempted to try the vi mode sometime. See the tutorial for more information.
Related posts: