|GNU Bash Reference Manual|
by Chet Ramey and Brian Fox
Paperback (6"x9"), 180 pages
RRP £19.95 ($29.95)
"An essential resource .... the most detailed coverage available for all aspects of Bash" --- Linux User and Developer Magazine (Issue 37, Mar 2004) Get a printed copy>>>
8.4.8 Some Miscellaneous Commands
re-read-init-file (C-x C-r)
- Read in the contents of the inputrc file, and incorporate any bindings or variable assignments found there.
Abort the current editing command and
ring the terminal's bell (subject to the setting of
do-uppercase-version (M-a, M-b, M-x, ...)
- If the metafied character x is lowercase, run the command that is bound to the corresponding uppercase character.
- Metafy the next character typed. This is for keyboards without a meta key. Typing ‘ESC f’ is equivalent to typing M-f.
undo (C-_ or C-x C-u)
- Incremental undo, separately remembered for each line.
Undo all changes made to this line. This is like executing the
undocommand enough times to get back to the beginning.
- Perform tilde expansion on the current word.
- Set the mark to the point. If a numeric argument is supplied, the mark is set to that position.
exchange-point-and-mark (C-x C-x)
- Swap the point with the mark. The current cursor position is set to the saved position, and the old cursor position is saved as the mark.
- A character is read and point is moved to the next occurrence of that character. A negative count searches for previous occurrences.
- A character is read and point is moved to the previous occurrence of that character. A negative count searches for subsequent occurrences.
Without a numeric argument, the value of the
comment-beginvariable is inserted at the beginning of the current line. If a numeric argument is supplied, this command acts as a toggle: if the characters at the beginning of the line do not match the value of
comment-begin, the value is inserted, otherwise the characters in
comment-beginare deleted from the beginning of the line. In either case, the line is accepted as if a newline had been typed. The default value of
comment-begincauses this command to make the current line a shell comment. If a numeric argument causes the comment character to be removed, the line will be executed by the shell.
- Print all of the functions and their key bindings to the Readline output stream. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an inputrc file. This command is unbound by default.
- Print all of the settable variables and their values to the Readline output stream. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an inputrc file. This command is unbound by default.
- Print all of the Readline key sequences bound to macros and the strings they output. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an inputrc file. This command is unbound by default.
- The word before point is treated as a pattern for pathname expansion, with an asterisk implicitly appended. This pattern is used to generate a list of matching file names for possible completions.
glob-expand-word (C-x *)
- The word before point is treated as a pattern for pathname expansion, and the list of matching file names is inserted, replacing the word. If a numeric argument is supplied, a ‘*’ is appended before pathname expansion.
glob-list-expansions (C-x g)
The list of expansions that would have been generated by
glob-expand-wordis displayed, and the line is redrawn. If a numeric argument is supplied, a ‘*’ is appended before pathname expansion.
display-shell-version (C-x C-v)
- Display version information about the current instance of Bash.
- Expand the line as the shell does. This performs alias and history expansion as well as all of the shell word expansions (see section 3.5 Shell Expansions).
- Perform history expansion on the current line.
- Perform history expansion on the current line and insert a space (see section 9.3 History Expansion).
- Perform alias expansion on the current line (see section 6.6 Aliases).
- Perform history and alias expansion on the current line.
insert-last-argument (M-. or M-_)
A synonym for
- Accept the current line for execution and fetch the next line relative to the current line from the history for editing. Any argument is ignored.
Invoke an editor on the current command line, and execute the result as shell
Bash attempts to invoke
emacsas the editor, in that order.
|ISBN 0954161777||GNU Bash Reference Manual||See the print edition|