The bind -p command displays Readline function names and bindings in a format that can put directly into an initialization file. See Section 4.2 [Bash
Builtins], page 48. keyname: function-name or macro keyname is the name of a key spelled out in English. For example:
Control-u: universal-argument
Meta-Rubout: backward-kill-word
Control-o: "> output"
In the above example,
C-u is bound to the function universal-argument,
M-DEL is bound to the function backward-kill-word, and C-o is bound to run the macro expressed on the right hand side (that is, to insert the text ‘> output’ into the line).
A number of symbolic character names are recognized while processing this key binding syntax: DEL, ESC, ESCAPE, LFD,
NEWLINE, RET, RETURN, RUBOUT, SPACE, SPC, and TAB.
"keyseq": function-name or macro keyseq differs from keyname above in that strings denoting an en- tire key sequence can be specified, by placing the key sequence in double quotes. Some gnu Emacs style key escapes can be used, as in the following example, but the special character names are not recognized.
"\C-u": universal-argument
"\C-x\C-r": re-read-init-file
"\e[11~": "Function Key 1"
In the above example, C-u is again bound to the function universal-argument (just as it was in the first example), ‘C-x
C-r’ is bound to the function re-read-init-file, and ‘ESC [ 1 1
~’ is bound to insert the text ‘Function Key 1’.
The following gnu Emacs style escape sequences are available when specifying key sequences:
\C- control prefix
\M- meta prefix
\e an escape character
\\ backslash
\"
", a double quotation mark
\’
’, a single quote or apostrophe
In addition to the gnu Emacs style escape sequences, a second set of backslash escapes is available:
\a alert (bell)
\b backspace