/usr/bin/bash: Difference between revisions

Line 1,702: Line 1,702:


=== Commands for Changing Text ===
=== Commands for Changing Text ===
      end-of-file (usually C-d)
;end-of-file (usually C-d)
              The character indicating end-of-file as set, for example, by ``stty''.  If this  character
:The character indicating end-of-file as set, for example, by ``stty''.  If this  character is  read  when  there  are no characters on the line, and point is at the beginning of the line, Readline interprets it as the end of input and returns EOF.
              is  read  when  there  are no characters on the line, and point is at the beginning of the
;delete-char (C-d)
              line, Readline interprets it as the end of input and returns EOF.
:Delete the character at point.  If this function is bound to the same character as the tty EOF character, as C-d commonly is, see above for the effects.
      delete-char (C-d)
;backward-delete-char (Rubout)
              Delete the character at point.  If this function is bound to the same character as the tty
:Delete  the  character behind the cursor.  When given a numeric argument, save the deleted text on the kill ring.
              EOF character, as C-d commonly is, see above for the effects.
;forward-backward-delete-char
      backward-delete-char (Rubout)
:Delete the character under the cursor, unless the cursor is at the end  of  the  line,  in which case the character behind the cursor is deleted.
              Delete  the  character behind the cursor.  When given a numeric argument, save the deleted
;quoted-insert (C-q, C-v)
              text on the kill ring.
:Add  the next character typed to the line verbatim.  This is how to insert characters like C-q, for example.
      forward-backward-delete-char
;tab-insert (C-v TAB)
              Delete the character under the cursor, unless the cursor is at the end  of  the  line,  in
:Insert a tab character.
              which case the character behind the cursor is deleted.
;self-insert (a, b, A, 1, !, ...)
      quoted-insert (C-q, C-v)
:Insert the character typed.
              Add  the next character typed to the line verbatim.  This is how to insert characters like
;transpose-chars (C-t)
              C-q, for example.
:Drag the character before point forward over the character at point, moving point  forward as  well.  If point is at the end of the line, then this transposes the two characters before point.  Negative arguments have no effect.
      tab-insert (C-v TAB)
;transpose-words (M-t)
              Insert a tab character.
:Drag the word before point past the word after point, moving point over that word as well. If point is at the end of the line, this transposes the last two words on the line.
      self-insert (a, b, A, 1, !, ...)
;upcase-word (M-u)
              Insert the character typed.
:Uppercase the current (or following) word.  With a negative argument, uppercase the previous word, but do not move point.
      transpose-chars (C-t)
;downcase-word (M-l)
              Drag the character before point forward over the character at point, moving point  forward
:Lowercase the current (or following) word.  With a negative argument, lowercase the previous word, but do not move point.
              as  well.  If point is at the end of the line, then this transposes the two characters be‐
;capitalize-word (M-c)
              fore point.  Negative arguments have no effect.
:Capitalize the current (or following) word.  With a negative argument, capitalize the previous word, but do not move point.
      transpose-words (M-t)
;overwrite-mode
              Drag the word before point past the word after point, moving point over that word as well.
:Toggle overwrite mode.  With an explicit positive numeric argument, switches to  overwrite mode.  With an explicit non-positive numeric argument, switches to insert mode.  This command affects only emacs mode; vi mode does overwrite differently.  Each call to readline() starts  in  insert  mode.  In overwrite mode, characters bound to self-insert replace the text at point rather than pushing the text  to  the  right.  Characters  bound  to  backward-delete-char  replace  the character before point with a space.  By default, this command is unbound.
              If point is at the end of the line, this transposes the last two words on the line.
      upcase-word (M-u)
              Uppercase the current (or following) word.  With a negative argument, uppercase the previ‐
              ous word, but do not move point.
      downcase-word (M-l)
              Lowercase the current (or following) word.  With a negative argument, lowercase the previ‐
              ous word, but do not move point.
      capitalize-word (M-c)
              Capitalize the current (or following) word.  With a negative argument, capitalize the pre‐
              vious word, but do not move point.
      overwrite-mode
              Toggle overwrite mode.  With an explicit positive numeric argument, switches to  overwrite
              mode.  With an explicit non-positive numeric argument, switches to insert mode.  This com‐
              mand affects only emacs mode; vi mode does overwrite differently.  Each call to readline()
              starts  in  insert  mode.  In overwrite mode, characters bound to self-insert replace the
              text at point rather than pushing the text  to  the  right.  Characters  bound  to  back‐
              ward-delete-char  replace  the character before point with a space.  By default, this com‐
              mand is unbound.


=== Killing and Yanking ===
=== Killing and Yanking ===