source: chapter07/inputrc.xml@ 1375d26

Last change on this file since 1375d26 was a811dff0, checked in by Matthew Burgess <matthew@…>, 20 years ago
  • (chapter07/*.xml) RELAX NG validation fixes

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/LFS-RNG/BOOK@4351 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

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