source: chapter07/inputrc.xml@ 32220fb

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.0 6.1 6.1.1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 32220fb was b32e803, checked in by Zack Winkles <winkie@…>, 20 years ago

Committed Alexander's i18n patch

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

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