glfs/postlfs/config/inputrc.xml

73 lines
2.4 KiB
XML
Raw Normal View History

<sect1 id="postlfs-config-inputrc">
<?dbhtml filename="inputrc.html" dir="postlfs"?>
<title>/etc/inputrc</title>
<para>There are a number of configuration files that are common to all
Linux systems. Inputrc deals with the mapping of the keybord in ceratin
situations. This file is the start-up file used by readline - the input
related library used by bash and most other shells. By changing this file
you can change how certain keys act in different situations. The following
is a simple inputrc along with comments to explain what the various
options do.</para>
<para>The following file can be used as
<filename>/etc/inputrc</filename> or <filename>~/.inputrc</filename> as
appropriate. See below for more details on which to use.</para>
<para>Please note that comments can <emphasis>not</emphasis> be on the
same line as commands in <filename>inputrc</filename>.</para>
<para><screen># Make sure we don't output everything on the 1 line
set horizontal-scroll-mode Off
# Enable 8bit input
set meta-flag On
set input-meta On
# Turns off 8th bit stripping
set convert-meta Off
# Keep the 8th bit for display
set output-meta On
# none, visible or audible
set bell-style none
# All of the following map the escape sequence of the
# value contained inside the 1st argument to the
# readline specific functions
"\eOd": backward-word
"\eOc": forward-word
# for linux console
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert
# for xterm
"\eOH": beginning-of-line
"\eOF": end-of-line</screen></para>
<para>Please see the manual pages for more information. For more
information, look at bash(1) and search for readline, or if you have
the readline package installed, look at readline(3). There is a lot that
can be done with this single rc file.</para>
<para>Note that the readline library checks ~/.inputrc, by default. If
you want to use <filename>/etc/inputrc</filename> as your global
inputrc (i.e. for all users), you will need to add the line
<screen><userinput>export INPUTRC=/etc/inputrc</userinput></screen>
to your .bash_profile, .bashrc or .profile file as appropriate. To make
the file truly global, you may wish to add it to your
<filename>/etc/profile</filename> file.</para>
<para>If you want to use per-user <userinput>.inputrc</userinput> files,
you can create one and drop it into <filename>/etc/skel</filename> for use
when creating new users.</para>
</sect1>