Chapter 4: Shell Builtin Commands

49

-m keymap Use keymap as the keymap to be affected by the subsequent bindings. Acceptable keymap names are emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move, vi-command, and vi-insert. vi is equivalent to vi-command; emacs is equivalent to emacs-standard.

-l

List the names of all Readline functions.

-p

Display Readline function names and bindings in such a way that they can be used as input or in a Readline initialization file.

-P

List current Readline function names and bindings.

-v

Display Readline variable names and values in such a way that they can be used as input or in a Readline initialization file.

-V

List current Readline variable names and values.

-s

Display Readline key sequences bound to macros and the strings they output in such a way that they can be used as input or in a

Readline initialization file.

-S

Display Readline key sequences bound to macros and the strings they output.

-f filename

Read key bindings from filename.

-q function

Query about which keys invoke the named function.

-u function

Unbind all keys bound to the named function.

-r keyseq Remove any current binding for keyseq.

-x keyseq:shell-command

Cause shell-command to be executed whenever keyseq is entered.

When shell-command is executed, the shell sets the READLINE_

LINE variable to the contents of the Readline line buffer and the

READLINE_POINT variable to the current location of the insertion point. If the executed command changes the value of READLINE_

LINE or READLINE_POINT, those new values will be reflected in the editing state.

-X

List all key sequences bound to shell commands and the associated commands in a format that can be reused as input.

The return status is zero unless an invalid option is supplied or an error occurs. builtin builtin [shell-builtin [args]]

Run a shell builtin, passing it args, and return its exit status. This is useful when defining a shell function with the same name as a shell builtin, retaining the functionality of the builtin within the function. The return status is non- zero if shell-builtin is not a shell builtin command.