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