magic-space ()
Perform history expansion on the current line and insert a space (see Section 9.3
[History Interaction], page 135). alias-expand-line ()
Perform alias expansion on the current line (see Section 6.6 [Aliases], page 88). history-and-alias-expand-line ()
Perform history and alias expansion on the current line. insert-last-argument (M-. or M-_)
A synonym for yank-last-arg. operate-and-get-next (C-o)
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. edit-and-execute-command (C-xC-e)
Invoke an editor on the current command line, and execute the result as shell commands.
Bash attempts to invoke $VISUAL, $EDITOR, and emacs as the editor, in that order.
8.5 Readline vi Mode
While the Readline library does not have a full set of vi editing functions, it does contain enough to allow simple editing of the line. The Readline vi mode behaves as specified in the posix standard.
In order to switch interactively between emacs and vi editing modes, use the ‘set -o emacs’ and ‘set -o vi’ commands (see Section 4.3.1 [The Set Builtin], page 58).
The
Readline default is emacs mode.
When you enter a line in vi mode, you are already placed in ‘insertion’ mode, as if you had typed an ‘i’. Pressing ESC switches you into ‘command’ mode, where you can edit the text of the line with the standard vi movement keys, move to previous history lines with
‘k’ and subsequent lines with ‘j’, and so forth.
8.6 Programmable Completion
When word completion is attempted for an argument to a command for which a completion specification (a compspec) has been defined using the complete builtin (see Section 8.7
[Programmable Completion Builtins], page 126), the programmable completion facilities are invoked.
First, the command name is identified. If a compspec has been defined for that command, the compspec is used to generate the list of possible completions for the word.
If the command word is the empty string (completion attempted at the beginning of an empty line), any compspec defined with the -E option to complete is used. If the command word is a full pathname, a compspec for the full pathname is searched for first. If no compspec is found for the full pathname, an attempt is made to find a compspec for the portion following the final slash. If those searches do not result in a compspec, any compspec defined with the -D option to complete is used as the default.