source: archive/inputrc.xml

trunk
Last change on this file was 3f2db3a6, checked in by Pierre Labastie <pierre.labastie@…>, 17 months ago

Remove sect1info tags

They only contain a date tag that is nowhere used.

  • Property mode set to 100644
File size: 3.5 KB
Line 
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">
5 %general-entities;
6]>
7
8<sect1 id="postlfs-config-inputrc" xreflabel="Introduction to /etc/inputrc">
9 <?dbhtml filename="inputrc.html"?>
10
11
12 <title>Introduction to /etc/inputrc</title>
13
14 <indexterm zone="postlfs-config-inputrc">
15 <primary sortas="e-etc-inputrc">/etc/inputrc</primary>
16 </indexterm>
17
18 <indexterm zone="postlfs-config-inputrc">
19 <primary sortas="e-AA.inputrc">~/.inputrc</primary>
20 </indexterm>
21
22 <para><filename>/etc/inputrc</filename> deals with the mapping of the
23 keyboard for certain situations. This file is the start-up file used by
24 <application>readline</application>, the input related library used by
25 <application>bash</application> and most other shells.</para>
26
27 <para>For more information see <command>info bash</command>&mdash;<emphasis
28 role="strong">Node: Readline Init</emphasis> file as well as
29 <command>info readline</command>. There is a lot that can be done with this
30 one rc file.</para>
31
32 <para>Global values are set in <filename>/etc/inputrc</filename>.
33 Personal user values are set in <filename>~/.inputrc</filename>. The
34 <filename>~/.inputrc</filename> file will override the global settings
35 file. A later page sets up <application>Bash</application> to use
36 <filename>/etc/inputrc</filename> if there is no <filename>.inputrc</filename>
37 for a user when <filename>/etc/profile</filename> is read (usually at login).
38 If you want your system to use both, or don't want <emphasis>global</emphasis>
39 keyboard handling, it is a good idea to place a default
40 <filename>.inputrc</filename> into the <filename
41 class="directory">/etc/skel</filename> directory for use with new users.</para>
42
43 <para>Below is a base <filename>/etc/inputrc</filename> along with
44 comments to explain what the various options do. Note that comments
45 can <emphasis>not</emphasis> be on the same line as commands.</para>
46
47 <para>If you will create an <filename>.inputrc</filename> in
48 <filename class="directory">/etc/skel</filename> using the command below,
49 change the command's output to <filename>/etc/skel/.inputrc</filename> and
50 be sure to check/set permissions afterward. Then you can just copy that
51 file to <filename>/etc/inputrc</filename> and the home directory
52 of any user already existing in the system, including <systemitem
53 class="username">root</systemitem>, that needs
54 a private version of the file. Be sure to use the <option>-p</option>
55 parameter of <command>cp</command> to maintain permissions and be sure to
56 change owner and group appropriately.</para>
57
58<screen role="root"><userinput>cat &gt; /etc/inputrc &lt;&lt; "EOF"
59<literal># Begin /etc/inputrc
60
61# Make sure everything is not output to one line
62set horizontal-scroll-mode Off
63
64# Enable 8bit input
65set meta-flag On
66set input-meta On
67
68# Turns off 8th bit stripping
69set convert-meta Off
70
71# Keep the 8th bit for display
72set output-meta On
73
74# none, visible or audible
75set bell-style none
76
77# All of the following map the escape sequence of the
78# value contained inside the 1st argument to the
79# readline specific functions
80
81"\eOd": backward-word
82"\eOc": forward-word
83
84# for linux console
85"\e[1~": beginning-of-line
86"\e[4~": end-of-line
87"\e[5~": beginning-of-history
88"\e[6~": end-of-history
89"\e[3~": delete-char
90"\e[2~": quoted-insert
91
92# for xterm
93"\eOH": beginning-of-line
94"\eOF": end-of-line
95
96# End /etc/inputrc</literal>
97EOF</userinput></screen>
98
99</sect1>
Note: See TracBrowser for help on using the repository browser.