Chapter 8: Command Line Editing

115

# For FTP

$if Ftp

"\C-xg": "get \M-?"

"\C-xt": "put \M-?"

"\M-.": yank-last-arg

$endif

8.4 Bindable Readline Commands

This section describes Readline commands that may be bound to key sequences. You can list your key bindings by executing bind -P or, for a more terse format, suitable for an inputrc file, bind -p. (See Section 4.2 [Bash Builtins], page 48.) 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.

8.4.1 Commands For Moving beginning-of-line (C-a)

Move to the start of the current line. end-of-line (C-e)

Move to the end of the line. forward-char (C-f)

Move forward a character. backward-char (C-b)

Move back a character. forward-word (M-f)

Move forward to the end of the next word. Words are composed of letters and digits. backward-word (M-b)

Move back to the start of the current or previous word. Words are composed of letters and digits. shell-forward-word ()

Move forward to the end of the next word. Words are delimited by non-quoted shell metacharacters. shell-backward-word ()

Move back to the start of the current or previous word. Words are delimited by non-quoted shell metacharacters. clear-screen (C-l)

Clear the screen and redraw the current line, leaving the current line at the top of the screen. redraw-current-line ()

Refresh the current line. By default, this is unbound.