List command line key bindings
While searching for… actually I don’t remember what I was searching for in the first place. I found something cool though, a way to get a list of readline bindings that use the Control key (Ctrl+A, Ctrl+E, etc.)
The command is pretty straightforward;
bind -p | grep -F "\C"
So of course, being naturally inquisitive I started picking apart the command. Turns out,
bind is a builtin BASH command. Used as
bind -p, it will return a list of all bindings on the system. Here’s the relevant portion of documentation.
Here’s another concise guide pertaining to keybindings. If you’re not careful, you could accidentally bind something that overrides another key that you need (I wound up being unable to type the letter ‘L’ for a while.) Probably best to try out your bind commands in a terminal (which you can exit from) before using them in a configuration file. Otherwise, editing the configuration file could be bothersome. Imagine trying to edit a file with an ‘L’ in the name… Not impossible, but certainly not as easy as it ought to be.