June 2019
Intermediate to advanced
328 pages
7h 27m
English
A number of keyboard shortcuts are at your disposal. You learned about several of them in Useful Shortcuts. For example you learned that Ctrl+l clears the screen, and Ctrl+a jumps to the beginning of the line. Use the bind -p command to see a list of all the defined commands available. It’s a long list, so use less:
| | $ bind -p | less |
| | "\C-g": abort |
| | "\C-x\C-g": abort |
| | "\e\C-g": abort |
| | "\C-j": accept-line |
| | "\C-m": accept-line |
| | ... |
In addition to the ones already defined, you can make your own. Try it out by using the bind command to map Ctrl+t to execute the pwd command:
| | $ bind '"\C-t": "pwd\n"' |
Note a couple things about this. First, you need single quotes around the keybinding definition. ...