| 1 |
|
| 2 |
# This file controls the behaviour of line input editing for |
| 3 |
# programs that use the Gnu Readline library. Existing programs |
| 4 |
# include FTP, Bash, and Gdb. |
| 5 |
# |
| 6 |
# You can re-read the inputrc file with C-x C-r. |
| 7 |
# Lines beginning with '#' are comments. |
| 8 |
# |
| 9 |
# First, include any systemwide bindings and variable assignments from |
| 10 |
# /etc/Inputrc |
| 11 |
$include /etc/Inputrc |
| 12 |
|
| 13 |
# |
| 14 |
# Set various bindings for emacs mode. |
| 15 |
|
| 16 |
set editing-mode emacs |
| 17 |
|
| 18 |
$if mode=emacs |
| 19 |
|
| 20 |
Meta-Control-h: backward-kill-word Text after the function name is ignored |
| 21 |
|
| 22 |
# |
| 23 |
# Arrow keys in keypad mode |
| 24 |
# |
| 25 |
#"\M-OD": backward-char |
| 26 |
#"\M-OC": forward-char |
| 27 |
#"\M-OA": previous-history |
| 28 |
#"\M-OB": next-history |
| 29 |
# |
| 30 |
# Arrow keys in ANSI mode |
| 31 |
# |
| 32 |
"\M-[D": backward-char |
| 33 |
"\M-[C": forward-char |
| 34 |
"\M-[A": previous-history |
| 35 |
"\M-[B": next-history |
| 36 |
# |
| 37 |
# Arrow keys in 8 bit keypad mode |
| 38 |
# |
| 39 |
#"\M-\C-OD": backward-char |
| 40 |
#"\M-\C-OC": forward-char |
| 41 |
#"\M-\C-OA": previous-history |
| 42 |
#"\M-\C-OB": next-history |
| 43 |
# |
| 44 |
# Arrow keys in 8 bit ANSI mode |
| 45 |
# |
| 46 |
#"\M-\C-[D": backward-char |
| 47 |
#"\M-\C-[C": forward-char |
| 48 |
#"\M-\C-[A": previous-history |
| 49 |
#"\M-\C-[B": next-history |
| 50 |
|
| 51 |
C-q: quoted-insert |
| 52 |
|
| 53 |
$endif |
| 54 |
|
| 55 |
# An old-style binding. This happens to be the default. |
| 56 |
TAB: complete |
| 57 |
|
| 58 |
# Macros that are convenient for shell interaction |
| 59 |
$if Bash |
| 60 |
# edit the path |
| 61 |
"\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f" |
| 62 |
# prepare to type a quoted word -- insert open and close double quotes |
| 63 |
# and move to just after the open quote |
| 64 |
"\C-x\"": "\"\"\C-b" |
| 65 |
# insert a backslash (testing backslash escapes in sequences and macros) |
| 66 |
"\C-x\\": "\\" |
| 67 |
# Quote the current or previous word |
| 68 |
"\C-xq": "\eb\"\ef\"" |
| 69 |
# Add a binding to refresh the line, which is unbound |
| 70 |
"\C-xr": redraw-current-line |
| 71 |
# Edit variable on current line. |
| 72 |
"\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y=" |
| 73 |
$endif |
| 74 |
|
| 75 |
# use a visible bell if one is available |
| 76 |
set bell-style visible |
| 77 |
|
| 78 |
# don't strip characters to 7 bits when reading |
| 79 |
set input-meta on |
| 80 |
|
| 81 |
# allow iso-latin1 characters to be inserted rather than converted to |
| 82 |
# prefix-meta sequences |
| 83 |
set convert-meta off |
| 84 |
|
| 85 |
# display characters with the eighth bit set directly rather than |
| 86 |
# as meta-prefixed characters |
| 87 |
set output-meta on |
| 88 |
|
| 89 |
# if there are more than 150 possible completions for a word, ask the |
| 90 |
# user if he wants to see all of them |
| 91 |
set completion-query-items 150 |
| 92 |
|
| 93 |
# For FTP |
| 94 |
$if Ftp |
| 95 |
"\C-xg": "get \M-?" |
| 96 |
"\C-xt": "put \M-?" |
| 97 |
"\M-.": yank-last-arg |
| 98 |
$endif |