diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/bash/miscellaneous-commands.html | |
new repository
Diffstat (limited to 'devdocs/bash/miscellaneous-commands.html')
| -rw-r--r-- | devdocs/bash/miscellaneous-commands.html | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/devdocs/bash/miscellaneous-commands.html b/devdocs/bash/miscellaneous-commands.html new file mode 100644 index 00000000..f53171a8 --- /dev/null +++ b/devdocs/bash/miscellaneous-commands.html @@ -0,0 +1,34 @@ +<h1 class="subsection">Some Miscellaneous Commands</h1> <dl compact> <dt id="index-re_002dread_002dinit_002dfile-_0028C_002dx-C_002dr_0029"><span><code>re-read-init-file (C-x C-r)</code></span></dt> <dd> +<p>Read in the contents of the <var>inputrc</var> file, and incorporate any bindings or variable assignments found there. </p> </dd> <dt id="index-abort-_0028C_002dg_0029"><span><code>abort (C-g)</code></span></dt> <dd> +<p>Abort the current editing command and ring the terminal’s bell (subject to the setting of <code>bell-style</code>). </p> </dd> <dt id="index-do_002dlowercase_002dversion-_0028M_002dA_002c-M_002dB_002c-M_002dx_002c-_2026_0029"><span><code>do-lowercase-version (M-A, M-B, M-<var>x</var>, …)</code></span></dt> <dd> +<p>If the metafied character <var>x</var> is upper case, run the command that is bound to the corresponding metafied lower case character. The behavior is undefined if <var>x</var> is already lower case. </p> </dd> <dt id="index-prefix_002dmeta-_0028ESC_0029"><span><code>prefix-meta (<span class="key">ESC</span>)</code></span></dt> <dd> +<p>Metafy the next character typed. This is for keyboards without a meta key. Typing ‘<samp><span class="key">ESC</span> f</samp>’ is equivalent to typing <kbd>M-f</kbd>. </p> </dd> <dt id="index-undo-_0028C_002d_005f-or-C_002dx-C_002du_0029"><span><code>undo (C-_ or C-x C-u)</code></span></dt> <dd> +<p>Incremental undo, separately remembered for each line. </p> </dd> <dt id="index-revert_002dline-_0028M_002dr_0029"><span><code>revert-line (M-r)</code></span></dt> <dd> +<p>Undo all changes made to this line. This is like executing the <code>undo</code> command enough times to get back to the beginning. </p> </dd> <dt id="index-tilde_002dexpand-_0028M_002d_0026_0029"><span><code>tilde-expand (M-&)</code></span></dt> <dd> +<p>Perform tilde expansion on the current word. </p> </dd> <dt id="index-set_002dmark-_0028C_002d_0040_0029"><span><code>set-mark (C-@)</code></span></dt> <dd> +<p>Set the mark to the point. If a numeric argument is supplied, the mark is set to that position. </p> </dd> <dt id="index-exchange_002dpoint_002dand_002dmark-_0028C_002dx-C_002dx_0029"><span><code>exchange-point-and-mark (C-x C-x)</code></span></dt> <dd> +<p>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. </p> </dd> <dt id="index-character_002dsearch-_0028C_002d_005d_0029"><span><code>character-search (C-])</code></span></dt> <dd> +<p>A character is read and point is moved to the next occurrence of that character. A negative argument searches for previous occurrences. </p> </dd> <dt id="index-character_002dsearch_002dbackward-_0028M_002dC_002d_005d_0029"><span><code>character-search-backward (M-C-])</code></span></dt> <dd> +<p>A character is read and point is moved to the previous occurrence of that character. A negative argument searches for subsequent occurrences. </p> </dd> <dt id="index-skip_002dcsi_002dsequence-_0028_0029"><span><code>skip-csi-sequence ()</code></span></dt> <dd> +<p>Read enough characters to consume a multi-key sequence such as those defined for keys like Home and End. Such sequences begin with a Control Sequence Indicator (CSI), usually ESC-[. If this sequence is bound to "\e[", keys producing such sequences will have no effect unless explicitly bound to a Readline command, instead of inserting stray characters into the editing buffer. This is unbound by default, but usually bound to ESC-[. </p> </dd> <dt id="index-insert_002dcomment-_0028M_002d_0023_0029"><span><code>insert-comment (M-#)</code></span></dt> <dd> +<p>Without a numeric argument, the value of the <code>comment-begin</code> variable 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 <code>comment-begin</code>, the value is inserted, otherwise the characters in <code>comment-begin</code> are 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 <code>comment-begin</code> causes 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. </p> </dd> <dt id="index-dump_002dfunctions-_0028_0029"><span><code>dump-functions ()</code></span></dt> <dd> +<p>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 <var>inputrc</var> file. This command is unbound by default. </p> </dd> <dt id="index-dump_002dvariables-_0028_0029"><span><code>dump-variables ()</code></span></dt> <dd> +<p>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 <var>inputrc</var> file. This command is unbound by default. </p> </dd> <dt id="index-dump_002dmacros-_0028_0029"><span><code>dump-macros ()</code></span></dt> <dd> +<p>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 <var>inputrc</var> file. This command is unbound by default. </p> </dd> <dt id="index-spell_002dcorrect_002dword-_0028C_002dx-s_0029"><span><code>spell-correct-word (C-x s)</code></span></dt> <dd> +<p>Perform spelling correction on the current word, treating it as a directory or filename, in the same way as the <code>cdspell</code> shell option. Word boundaries are the same as those used by <code>shell-forward-word</code>. </p> </dd> <dt id="index-glob_002dcomplete_002dword-_0028M_002dg_0029"><span><code>glob-complete-word (M-g)</code></span></dt> <dd> +<p>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. </p> </dd> <dt id="index-glob_002dexpand_002dword-_0028C_002dx-_002a_0029"><span><code>glob-expand-word (C-x *)</code></span></dt> <dd> +<p>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 ‘<samp>*</samp>’ is appended before pathname expansion. </p> </dd> <dt id="index-glob_002dlist_002dexpansions-_0028C_002dx-g_0029"><span><code>glob-list-expansions (C-x g)</code></span></dt> <dd> +<p>The list of expansions that would have been generated by <code>glob-expand-word</code> is displayed, and the line is redrawn. If a numeric argument is supplied, a ‘<samp>*</samp>’ is appended before pathname expansion. </p> </dd> <dt id="index-display_002dshell_002dversion-_0028C_002dx-C_002dv_0029"><span><code>display-shell-version (C-x C-v)</code></span></dt> <dd> +<p>Display version information about the current instance of Bash. </p> </dd> <dt id="index-shell_002dexpand_002dline-_0028M_002dC_002de_0029"><span><code>shell-expand-line (M-C-e)</code></span></dt> <dd> +<p>Expand the line as the shell does. This performs alias and history expansion as well as all of the shell word expansions (see <a href="shell-expansions">Shell Expansions</a>). </p> </dd> <dt id="index-history_002dexpand_002dline-_0028M_002d_005e_0029"><span><code>history-expand-line (M-^)</code></span></dt> <dd> +<p>Perform history expansion on the current line. </p> </dd> <dt id="index-magic_002dspace-_0028_0029"><span><code>magic-space ()</code></span></dt> <dd> +<p>Perform history expansion on the current line and insert a space (see <a href="history-interaction">History Expansion</a>). </p> </dd> <dt id="index-alias_002dexpand_002dline-_0028_0029"><span><code>alias-expand-line ()</code></span></dt> <dd> +<p>Perform alias expansion on the current line (see <a href="aliases">Aliases</a>). </p> </dd> <dt id="index-history_002dand_002dalias_002dexpand_002dline-_0028_0029"><span><code>history-and-alias-expand-line ()</code></span></dt> <dd> +<p>Perform history and alias expansion on the current line. </p> </dd> <dt id="index-insert_002dlast_002dargument-_0028M_002d_002e-or-M_002d_005f_0029"><span><code>insert-last-argument (M-. or M-_)</code></span></dt> <dd> +<p>A synonym for <code>yank-last-arg</code>. </p> </dd> <dt id="index-edit_002dand_002dexecute_002dcommand-_0028C_002dx-C_002de_0029"><span><code>edit-and-execute-command (C-x C-e)</code></span></dt> <dd> +<p>Invoke an editor on the current command line, and execute the result as shell commands. Bash attempts to invoke <code>$VISUAL</code>, <code>$EDITOR</code>, and <code>emacs</code> as the editor, in that order. </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/Miscellaneous-Commands.html" class="_attribution-link">https://www.gnu.org/software/bash/manual/html_node/Miscellaneous-Commands.html</a> + </p> +</div> |
