1 | <sect1 id="postlfs-config-inputrc">
|
---|
2 | <?dbhtml filename="inputrc.html" dir="postlfs"?>
|
---|
3 | <title>/etc/inputrc</title>
|
---|
4 |
|
---|
5 | <para>There are a number of configuration files that are common to all
|
---|
6 | linux system. Inputrc deals with the mapping of the keybord in ceratin
|
---|
7 | situations. This file is the start-up file used by readline - the input
|
---|
8 | related library used by bash and most other shells. By changing this file
|
---|
9 | you can change how certain keys act in different situations. The following
|
---|
10 | is a simple inputrc along with comments to explain what the various
|
---|
11 | options do.</para>
|
---|
12 |
|
---|
13 | <para>The following file can be used as
|
---|
14 | <filename>/etc/inputrc</filename> or <filename>~/.inputrc</filename> as
|
---|
15 | appropriate. See below for more details on which to use.</para>
|
---|
16 |
|
---|
17 | <para><screen># Make sure we dont output everything on the 1 line
|
---|
18 | set horizontal-scroll-mode Off
|
---|
19 |
|
---|
20 | set meta-flag On # Enables 8 bit input
|
---|
21 | set input-meta On # Enables 8 bit input
|
---|
22 | set convert-meta Off # Turns off 8th bit stripping
|
---|
23 | set output-meta On # Keep the 8th bit for display
|
---|
24 | set bell-style none # none,visable or audible
|
---|
25 |
|
---|
26 | # All of the following map the escape sequence of the
|
---|
27 | # value contained inside the 1st argument to the
|
---|
28 | # readline specific functions
|
---|
29 |
|
---|
30 | "\eOd": backward-word
|
---|
31 | "\eOc": forward-word
|
---|
32 |
|
---|
33 | # for linux console
|
---|
34 | "\e[1~": beginning-of-line
|
---|
35 | "\e[4~": end-of-line
|
---|
36 | "\e[5~": beginning-of-history
|
---|
37 | "\e[6~": end-of-history
|
---|
38 | "\e[3~": delete-char
|
---|
39 | "\e[2~": quoted-insert
|
---|
40 |
|
---|
41 | # for xterm
|
---|
42 | "\eOH": beginning-of-line
|
---|
43 | "\eOF": end-of-line</screen></para>
|
---|
44 |
|
---|
45 | <para>Please see man 3 readline for more infomation. There is a lot that
|
---|
46 | can be done with this single rc file.</para>
|
---|
47 |
|
---|
48 | <para>Note that the readline library checks ~/.inputrc, by default. If
|
---|
49 | you want to use <filename>/etc/inputrc</filename> as your global
|
---|
50 | inputrc (i.e. for all users), you will need to add the line
|
---|
51 | <userinput>export INPUTRC=/etc/inputrc</userinput> to your
|
---|
52 | .bash_profile, .bashrc or .profile file as appropriate.</para>
|
---|
53 |
|
---|
54 | <para>If you want to use per-user <userinput>.inputrc</userinput> files.
|
---|
55 | You can create one and drop it into <filename>/etc/skel</filename> for use
|
---|
56 | when creating new users.</para>
|
---|
57 |
|
---|
58 | </sect1>
|
---|