complete (TAB) ¶Attempt to perform completion on the text before point. The actual completion performed is application-specific. Bash attempts completion by first checking for any programmable completions for the command word (see Programmable Completion), otherwise treating the text as a variable (if the text begins with ‘$’), username (if the text begins with ‘~’), hostname (if the text begins with ‘@’), or command (including aliases, functions, and builtins) in turn. If none of these produces a match, it falls back to filename completion.
possible-completions (M-?) ¶List the possible completions of the text before point.
When displaying completions, Readline sets the number of columns used
for display to the value of completion-display-width, the value of
the environment variable COLUMNS, or the screen width, in that order.
insert-completions (M-*) ¶Insert all completions of the text before point that would have
been generated by possible-completions,
separated by a space.
menu-complete () ¶Similar to complete, but replaces the word to be completed
with a single match from the list of possible completions.
Repeatedly executing menu-complete steps through the list
of possible completions, inserting each match in turn.
At the end of the list of completions,
menu-complete rings the bell
(subject to the setting of bell-style)
and restores the original text.
An argument of n moves n positions forward in the list
of matches; a negative argument moves backward through the list.
This command is intended to be bound to TAB, but is unbound
by default.
menu-complete-backward () ¶Identical to menu-complete, but moves backward through the list
of possible completions, as if menu-complete had been given a
negative argument.
This command is unbound by default.
export-completions () ¶Perform completion on the word before point as described above and write the list of possible completions to Readline’s output stream using the following format, writing information on separate lines:
If there are no matches, the first line will be “0”, and this command does not print any output after the S:E. If there is only a single match, this prints a single line containing it. If there is more than one match, this prints the common prefix of the matches, which may be empty, on the first line after the S:E, then the matches on subsequent lines. In this case, N will include the first line with the common prefix.
The user or application should be able to accommodate the possibility of a blank line. The intent is that the user or application reads N lines after the line containing S:E to obtain the match list. This command is unbound by default.
delete-char-or-list () ¶Deletes the character under the cursor if not at the beginning or
end of the line (like delete-char).
At the end of the line, it behaves identically to possible-completions.
This command is unbound by default.
complete-filename (M-/) ¶Attempt filename completion on the text before point.
possible-filename-completions (C-x /) ¶List the possible completions of the text before point, treating it as a filename.
complete-username (M-~) ¶Attempt completion on the text before point, treating it as a username.
possible-username-completions (C-x ~) ¶List the possible completions of the text before point, treating it as a username.
complete-variable (M-$) ¶Attempt completion on the text before point, treating it as a shell variable.
possible-variable-completions (C-x $) ¶List the possible completions of the text before point, treating it as a shell variable.
complete-hostname (M-@) ¶Attempt completion on the text before point, treating it as a hostname.
possible-hostname-completions (C-x @) ¶List the possible completions of the text before point, treating it as a hostname.
complete-command (M-!) ¶Attempt completion on the text before point, treating it as a command name. Command completion attempts to match the text against aliases, reserved words, shell functions, shell builtins, and finally executable filenames, in that order.
possible-command-completions (C-x !) ¶List the possible completions of the text before point, treating it as a command name.
dynamic-complete-history (M-TAB) ¶Attempt completion on the text before point, comparing the text against history list entries for possible completion matches.
dabbrev-expand () ¶Attempt menu completion on the text before point, comparing the text against lines from the history list for possible completion matches.
complete-into-braces (M-{) ¶Perform filename completion and insert the list of possible completions enclosed within braces so the list is available to the shell (see Brace Expansion).