/usr/bin/bash: Difference between revisions

Line 1,538: Line 1,538:


=== Readline Command Names ===
=== Readline Command Names ===
      The  following is a list of the names of the commands and the default key sequences to which they
The  following is a list of the names of the commands and the default key sequences to which they are bound.  Command names without an accompanying key sequence are unbound by  default.  In  the following  descriptions, point refers to the current cursor position, and mark refers to a cursor position saved by the set-mark command.  The text between the point and mark is  referred  to  as the region.
      are bound.  Command names without an accompanying key sequence are unbound by  default.  In  the
      following  descriptions, point refers to the current cursor position, and mark refers to a cursor
      position saved by the set-mark command.  The text between the point and mark is  referred  to  as
      the region.


  Commands for Moving
Commands for Moving
      beginning-of-line (C-a)
;beginning-of-line (C-a)
              Move to the start of the current line.
:Move to the start of the current line.
      end-of-line (C-e)
;end-of-line (C-e)
              Move to the end of the line.
:Move to the end of the line.
      forward-char (C-f)
;forward-char (C-f)
              Move forward a character.
:Move forward a character.
      backward-char (C-b)
;backward-char (C-b)
              Move back a character.
:Move back a character.
      forward-word (M-f)
;forward-word (M-f)
              Move  forward  to the end of the next word.  Words are composed of alphanumeric characters
:Move  forward  to the end of the next word.  Words are composed of alphanumeric characters (letters and digits).
              (letters and digits).
;backward-word (M-b)
      backward-word (M-b)
:Move back to the start of the current or previous word.  Words are  composed  of  alphanumeric characters (letters and digits).
              Move back to the start of the current or previous word.  Words are  composed  of  alphanu‐
;shell-forward-word
              meric characters (letters and digits).
:Move  forward  to  the  end  of  the  next  word.  Words are delimited by non-quoted shell metacharacters.
      shell-forward-word
;shell-backward-word
              Move  forward  to  the  end  of  the  next  word.  Words are delimited by non-quoted shell
:Move back to the start of the current or previous word.  Words are delimited by non-quoted shell metacharacters.
              metacharacters.
;previous-screen-line
      shell-backward-word
:Attempt  to  move point to the same physical screen column on the previous physical screen line. This will not have the desired effect if the current Readline line does not take  up more  than one physical line or if point is not greater than the length of the prompt plus the screen width.
              Move back to the start of the current or previous word.  Words are delimited by non-quoted
;next-screen-line
              shell metacharacters.
:Attempt to move point to the same physical screen column on the next physical screen line. This  will  not have the desired effect if the current Readline line does not take up more than one physical line or if the length of the current Readline line is not  greater  than the length of the prompt plus the screen width.
      previous-screen-line
;clear-display (M-C-l)
              Attempt  to  move point to the same physical screen column on the previous physical screen
:Clear  the screen and, if possible, the terminal's scrollback buffer, then redraw the current line, leaving the current line at the top of the screen.
              line. This will not have the desired effect if the current Readline line does not take  up
;clear-screen (C-l)
              more  than one physical line or if point is not greater than the length of the prompt plus
:Clear the screen, then redraw the current line, leaving the current line at the top of the screen.  With an argument, refresh the current line without clearing the screen.
              the screen width.
;redraw-current-line
      next-screen-line
:Refresh the current line.
              Attempt to move point to the same physical screen column on the next physical screen line.
              This  will  not have the desired effect if the current Readline line does not take up more
              than one physical line or if the length of the current Readline line is not  greater  than
              the length of the prompt plus the screen width.
      clear-display (M-C-l)
              Clear  the screen and, if possible, the terminal's scrollback buffer, then redraw the cur‐
              rent line, leaving the current line at the top of the screen.
      clear-screen (C-l)
              Clear the screen, then redraw the current line, leaving the current line at the top of the
              screen.  With an argument, refresh the current line without clearing the screen.
      redraw-current-line
              Refresh the current line.


=== Commands for Manipulating the History ===
=== Commands for Manipulating the History ===