GNU Readline Library. Node: Readline Bare Essentials

prev UPReadline Interaction NEXTReadline Movement Commands

1.2.1: Readline Bare Essentials

In order to enter characters into the line, simply type them. The typed character appears where the cursor was, and then the cursor moves one space to the right. If you mistype a character, you can use your erase character to back up and delete the mistyped character.

Sometimes you may miss typing a character that you wanted to type, and not notice your error until you have typed several other characters. In that case, you can type C-B to move the cursor to the left, and then correct your mistake. Afterwards, you can move the cursor to the right with C-F.

When you add text in the middle of a line, you will notice that characters to the right of the cursor are `pushed over' to make room for the text that you have inserted. Likewise, when you delete text behind the cursor, characters to the right of the cursor are `pulled back' to fill in the blank space created by the removal of the text. A list of the basic bare essentials for editing the text of an input line follows.

C-B

Move back one character.

C-F Move forward one character.
DEL Delete the character to the left of the cursor.
C-D Delete the character underneath the cursor.
Printing characters Insert the character into the line at the cursor.
C-_ Undo the last editing command. You can undo all the way back to an empty line.

prev UPReadline Interaction NEXTReadline Movement Commands