/usr/bin/bash: Difference between revisions

Line 2,008: Line 2,008:


=== Miscellaneous ===
=== Miscellaneous ===
      re-read-init-file (C-x C-r)
;re-read-init-file (C-x C-r)
              Read in the contents of the inputrc file, and incorporate any bindings or variable assign‐
:Read in the contents of the inputrc file, and incorporate any bindings or variable assignments found there.
              ments found there.
;abort (C-g)
      abort (C-g)
:Abort  the current editing command and ring the terminal's bell (subject to the setting of bell-style).
              Abort  the current editing command and ring the terminal's bell (subject to the setting of
;do-lowercase-version (M-A, M-B, M-x, ...)
              bell-style).
:If the metafied character x is uppercase, run the command that is bound to the corresponding metafied lowercase character.  The behavior is undefined if x is already lowercase.
      do-lowercase-version (M-A, M-B, M-x, ...)
;prefix-meta (ESC)
              If the metafied character x is uppercase, run the command that is bound to the correspond‐
:Metafy the next character typed.  ESC f is equivalent to Meta-f.
              ing metafied lowercase character.  The behavior is undefined if x is already lowercase.
;undo (C-_, C-x C-u)
      prefix-meta (ESC)
:Incremental undo, separately remembered for each line.
              Metafy the next character typed.  ESC f is equivalent to Meta-f.
;revert-line (M-r)
      undo (C-_, C-x C-u)
:Undo  all changes made to this line.  This is like executing the undo command enough times to return the line to its initial state.
              Incremental undo, separately remembered for each line.
;tilde-expand (M-&)
      revert-line (M-r)
:Perform tilde expansion on the current word.
              Undo  all changes made to this line.  This is like executing the undo command enough times
;set-mark (C-@, M-<space>)
              to return the line to its initial state.
:Set the mark to the point.  If a numeric argument is supplied, the mark is set to that position.
      tilde-expand (M-&)
;exchange-point-and-mark (C-x C-x)
              Perform tilde expansion on the current word.
: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.
      set-mark (C-@, M-<space>)
;character-search (C-])
              Set the mark to the point.  If a numeric argument is supplied, the mark is set to that po‐
:A character is read and point is moved to the next occurrence of that character.  A  negative count searches for previous occurrences.
              sition.
;character-search-backward (M-C-])
      exchange-point-and-mark (C-x C-x)
:A  character  is  read and point is moved to the previous occurrence of that character.  A negative count searches for subsequent occurrences.
              Swap  the  point with the mark.  The current cursor position is set to the saved position,
;skip-csi-sequence
              and the old cursor position is saved as the mark.
: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 "\[", 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-[.
      character-search (C-])
;insert-comment (M-#)
              A character is read and point is moved to the next occurrence of that character.  A  nega‐
:Without a numeric argument, the value of the readline comment-begin 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 comment-begin,  the  value  is  inserted,  otherwise  the  characters in comment-begin 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 comment-begin 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.
              tive count searches for previous occurrences.
;glob-complete-word (M-g)
      character-search-backward (M-C-])
: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 filenames for possible completions.
              A  character  is  read and point is moved to the previous occurrence of that character.  A
;glob-expand-word (C-x *)
              negative count searches for subsequent occurrences.
:The  word  before  point  is  treated as a pattern for pathname expansion, and the list of matching filenames is inserted, replacing the word.  If a numeric argument is supplied, an asterisk is appended before pathname expansion.
      skip-csi-sequence
;glob-list-expansions (C-x g)
              Read enough characters to consume a multi-key sequence such as those defined for keys like
:The  list  of  expansions that would have been generated by glob-expand-word is displayed, and the line is redrawn.  If a numeric argument is supplied, an asterisk is  appended  before pathname expansion.
              Home  and  End.  Such  sequences  begin  with a Control Sequence Indicator (CSI), usually
;dump-functions
              ESC-[.  If this sequence is bound to "\[", keys producing such sequences will have no  ef‐
: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.
              fect unless explicitly bound to a readline command, instead of inserting stray characters
;dump-variables
              into the editing buffer.  This is unbound by default, but usually bound to ESC-[.
:Print  all  of  the  settable  readline  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.
      insert-comment (M-#)
;dump-macros
              Without a numeric argument, the value of the readline comment-begin variable  is  inserted
: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.
              at  the  beginning  of  the current line.  If a numeric argument is supplied, this command
;display-shell-version (C-x C-v)
              acts as a toggle: if the characters at the beginning of the line do not match the value of
:Display version information about the current instance of bash.
              comment-begin,  the  value  is  inserted,  otherwise  the  characters in comment-begin are
              deleted from the beginning of the line.  In either case, the line is accepted as if a new‐
              line had  been typed. The default value of comment-begin 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.
      glob-complete-word (M-g)
              The word before point is treated as a pattern for pathname expansion, with an asterisk im‐
              plicitly appended.  This pattern is used to generate a list of matching filenames for pos‐
              sible completions.
      glob-expand-word (C-x *)
              The  word  before  point  is  treated as a pattern for pathname expansion, and the list of
              matching filenames is inserted, replacing the word.  If a numeric argument is supplied, an
              asterisk is appended before pathname expansion.
      glob-list-expansions (C-x g)
              The  list  of  expansions that would have been generated by glob-expand-word is displayed,
              and the line is redrawn.  If a numeric argument is supplied, an asterisk is  appended  be‐
              fore pathname expansion.
      dump-functions
              Print all of the functions and their key bindings to the readline output stream.  If a nu‐
              meric argument is supplied, the output is formatted in such a way that it can be made part
              of an inputrc file.
      dump-variables
              Print  all  of  the  settable  readline  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.
      dump-macros
              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.
      display-shell-version (C-x C-v)
              Display version information about the current instance of bash.


=== Programmable Completion ===
=== Programmable Completion ===