1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
8 <sect1 id="ch-config-inputrc">
9 <?dbhtml filename="inputrc.html"?>
11 <title>Creating the /etc/inputrc File</title>
13 <indexterm zone="ch-config-inputrc">
14 <primary sortas="e-/etc/inputrc">/etc/inputrc</primary>
17 <para>The <filename>inputrc</filename> file is the configuration file for
18 the Readline library, which provides editing capabilities while the user is
19 entering a line from the terminal. It works by translating keyboard inputs
20 into specific actions. Readline is used by Bash and most other shells as
21 well as many other applications.</para>
23 <para>Most people do not need user-specific functionality so the command
24 below creates a global <filename>/etc/inputrc</filename> used by everyone who
25 logs in. If you later decide you need to override the defaults on a per-user
26 basis, you can create a <filename>.inputrc</filename> file in the user's home
27 directory with the modified mappings.</para>
29 <para>For more information on how to edit the <filename>inputrc</filename>
30 file, see <command>info bash</command> under the <emphasis>Readline Init
31 File</emphasis> section. <command>info readline</command> is also a good
32 source of information.</para>
34 <para>Below is a generic global <filename>inputrc</filename> along with comments
35 to explain what the various options do. Note that comments cannot be on the same
36 line as commands. Create the file using the following command:</para>
38 <screen><userinput>cat > /etc/inputrc << "EOF"
39 <literal># Begin /etc/inputrc
40 # Modified by Chris Lynn <roryo@roryo.dynup.net>
42 # Allow the command prompt to wrap to the next line
43 set horizontal-scroll-mode Off
49 # Turns off 8th bit stripping
52 # Keep the 8th bit for display
55 # none, visible or audible
58 # All of the following map the escape sequence of the value
59 # contained in the 1st argument to the readline specific functions
64 "\e[1~": beginning-of-line
66 "\e[5~": beginning-of-history
67 "\e[6~": end-of-history
69 "\e[2~": quoted-insert
72 "\eOH": beginning-of-line
76 "\e[H": beginning-of-line
79 # End /etc/inputrc</literal>
80 EOF</userinput></screen>