1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<h1 class="subsection">Letting Readline Type For You</h1> <dl compact> <dt id="index-complete-_0028TAB_0029"><span><code>complete (<span class="key">TAB</span>)</code></span></dt> <dd>
<p>Attempt to perform completion on the text before point. The actual completion performed is application-specific. Bash attempts completion treating the text as a variable (if the text begins with ‘<samp>$</samp>’), username (if the text begins with ‘<samp>~</samp>’), hostname (if the text begins with ‘<samp>@</samp>’), or command (including aliases and functions) in turn. If none of these produces a match, filename completion is attempted. </p> </dd> <dt id="index-possible_002dcompletions-_0028M_002d_003f_0029"><span><code>possible-completions (M-?)</code></span></dt> <dd>
<p>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 <code>completion-display-width</code>, the value of the environment variable <code>COLUMNS</code>, or the screen width, in that order. </p> </dd> <dt id="index-insert_002dcompletions-_0028M_002d_002a_0029"><span><code>insert-completions (M-*)</code></span></dt> <dd>
<p>Insert all completions of the text before point that would have been generated by <code>possible-completions</code>. </p> </dd> <dt id="index-menu_002dcomplete-_0028_0029"><span><code>menu-complete ()</code></span></dt> <dd>
<p>Similar to <code>complete</code>, but replaces the word to be completed with a single match from the list of possible completions. Repeated execution of <code>menu-complete</code> steps through the list of possible completions, inserting each match in turn. At the end of the list of completions, the bell is rung (subject to the setting of <code>bell-style</code>) and the original text is restored. An argument of <var>n</var> moves <var>n</var> positions forward in the list of matches; a negative argument may be used to move backward through the list. This command is intended to be bound to <code>TAB</code>, but is unbound by default. </p> </dd> <dt id="index-menu_002dcomplete_002dbackward-_0028_0029"><span><code>menu-complete-backward ()</code></span></dt> <dd>
<p>Identical to <code>menu-complete</code>, but moves backward through the list of possible completions, as if <code>menu-complete</code> had been given a negative argument. </p> </dd> <dt id="index-delete_002dchar_002dor_002dlist-_0028_0029"><span><code>delete-char-or-list ()</code></span></dt> <dd>
<p>Deletes the character under the cursor if not at the beginning or end of the line (like <code>delete-char</code>). If at the end of the line, behaves identically to <code>possible-completions</code>. This command is unbound by default. </p> </dd> <dt id="index-complete_002dfilename-_0028M_002d_002f_0029"><span><code>complete-filename (M-/)</code></span></dt> <dd>
<p>Attempt filename completion on the text before point. </p> </dd> <dt id="index-possible_002dfilename_002dcompletions-_0028C_002dx-_002f_0029"><span><code>possible-filename-completions (C-x /)</code></span></dt> <dd>
<p>List the possible completions of the text before point, treating it as a filename. </p> </dd> <dt id="index-complete_002dusername-_0028M_002d_007e_0029"><span><code>complete-username (M-~)</code></span></dt> <dd>
<p>Attempt completion on the text before point, treating it as a username. </p> </dd> <dt id="index-possible_002dusername_002dcompletions-_0028C_002dx-_007e_0029"><span><code>possible-username-completions (C-x ~)</code></span></dt> <dd>
<p>List the possible completions of the text before point, treating it as a username. </p> </dd> <dt id="index-complete_002dvariable-_0028M_002d_0024_0029"><span><code>complete-variable (M-$)</code></span></dt> <dd>
<p>Attempt completion on the text before point, treating it as a shell variable. </p> </dd> <dt id="index-possible_002dvariable_002dcompletions-_0028C_002dx-_0024_0029"><span><code>possible-variable-completions (C-x $)</code></span></dt> <dd>
<p>List the possible completions of the text before point, treating it as a shell variable. </p> </dd> <dt id="index-complete_002dhostname-_0028M_002d_0040_0029"><span><code>complete-hostname (M-@)</code></span></dt> <dd>
<p>Attempt completion on the text before point, treating it as a hostname. </p> </dd> <dt id="index-possible_002dhostname_002dcompletions-_0028C_002dx-_0040_0029"><span><code>possible-hostname-completions (C-x @)</code></span></dt> <dd>
<p>List the possible completions of the text before point, treating it as a hostname. </p> </dd> <dt id="index-complete_002dcommand-_0028M_002d_0021_0029"><span><code>complete-command (M-!)</code></span></dt> <dd>
<p>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. </p> </dd> <dt id="index-possible_002dcommand_002dcompletions-_0028C_002dx-_0021_0029"><span><code>possible-command-completions (C-x !)</code></span></dt> <dd>
<p>List the possible completions of the text before point, treating it as a command name. </p> </dd> <dt id="index-dynamic_002dcomplete_002dhistory-_0028M_002dTAB_0029"><span><code>dynamic-complete-history (M-<span class="key">TAB</span>)</code></span></dt> <dd>
<p>Attempt completion on the text before point, comparing the text against lines from the history list for possible completion matches. </p> </dd> <dt id="index-dabbrev_002dexpand-_0028_0029"><span><code>dabbrev-expand ()</code></span></dt> <dd>
<p>Attempt menu completion on the text before point, comparing the text against lines from the history list for possible completion matches. </p> </dd> <dt id="index-complete_002dinto_002dbraces-_0028M_002d_007b_0029"><span><code>complete-into-braces (M-{)</code></span></dt> <dd>
<p>Perform filename completion and insert the list of possible completions enclosed within braces so the list is available to the shell (see <a href="brace-expansion">Brace Expansion</a>). </p> </dd> </dl><div class="_attribution">
<p class="_attribution-p">
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.<br>Licensed under the GNU Free Documentation License.<br>
<a href="https://www.gnu.org/software/bash/manual/html_node/Commands-For-Completion.html" class="_attribution-link">https://www.gnu.org/software/bash/manual/html_node/Commands-For-Completion.html</a>
</p>
</div>
|