1 | <sect1 id="postlfs-config-inputrc">
|
---|
2 | <?dbhtml filename="inputrc.html" dir="postlfs"?>
|
---|
3 | <title>/etc/inputrc</title>
|
---|
4 |
|
---|
5 | <para><filename>inputrc</filename> deals with the mapping of the keyboard for
|
---|
6 | certain situations. This file is the start-up file used by
|
---|
7 | <application>readline</application> - the input related library used by
|
---|
8 | <application>Bash</application> and most other shells.</para>
|
---|
9 |
|
---|
10 | <para>For more information see <command>info bash</command> -- <emphasis
|
---|
11 | role="strong">Node: Readline Init</emphasis> file as well as
|
---|
12 | <command>info readline</command>. There is a lot that can be done with this
|
---|
13 | one rc file.</para>
|
---|
14 |
|
---|
15 | <para>The following is a base <filename>/etc/inputrc</filename> along with
|
---|
16 | comments to explain what the various options do.</para>
|
---|
17 |
|
---|
18 | <para>Please note that comments can <emphasis>not</emphasis> be on the
|
---|
19 | same line as commands in <filename>inputrc</filename>.</para>
|
---|
20 |
|
---|
21 | <screen><userinput><command>cat > /etc/inputrc << "EOF"</command>
|
---|
22 | # Begin /etc/inputrc
|
---|
23 |
|
---|
24 | # Make sure we don't output everything on the 1 line
|
---|
25 | set horizontal-scroll-mode Off
|
---|
26 |
|
---|
27 | # Enable 8bit input
|
---|
28 | set meta-flag On
|
---|
29 | set input-meta On
|
---|
30 |
|
---|
31 | # Turns off 8th bit stripping
|
---|
32 | set convert-meta Off
|
---|
33 |
|
---|
34 | # Keep the 8th bit for display
|
---|
35 | set output-meta On
|
---|
36 |
|
---|
37 | # none, visible or audible
|
---|
38 | set bell-style none
|
---|
39 |
|
---|
40 | # All of the following map the escape sequence of the
|
---|
41 | # value contained inside the 1st argument to the
|
---|
42 | # readline specific functions
|
---|
43 |
|
---|
44 | "\eOd": backward-word
|
---|
45 | "\eOc": forward-word
|
---|
46 |
|
---|
47 | # for linux console
|
---|
48 | "\e[1~": beginning-of-line
|
---|
49 | "\e[4~": end-of-line
|
---|
50 | "\e[5~": beginning-of-history
|
---|
51 | "\e[6~": end-of-history
|
---|
52 | "\e[3~": delete-char
|
---|
53 | "\e[2~": quoted-insert
|
---|
54 |
|
---|
55 | # for xterm
|
---|
56 | "\eOH": beginning-of-line
|
---|
57 | "\eOF": end-of-line
|
---|
58 |
|
---|
59 | # End /etc/inputrc
|
---|
60 | <command>EOF</command></userinput></screen>
|
---|
61 |
|
---|
62 | <para>Global values are set in <filename>/etc/inputrc</filename>.
|
---|
63 | Personal user values as are set in <filename>~/.inputrc</filename>. The
|
---|
64 | <filename>~/.inputrc</filename> file will override the global settings
|
---|
65 | file. The previous page sets up <application>Bash</application> to use
|
---|
66 | <filename>/etc/inputrc</filename> by default. If you want your system
|
---|
67 | to use both, it might be a good idea to place a default
|
---|
68 | <filename>.inputrc</filename> into the <filename>/etc/skel</filename>
|
---|
69 | directory for use with new users.</para>
|
---|
70 |
|
---|
71 | </sect1>
|
---|