inputrc.xml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. <sect1 id="ch-scripts-inputrc">
  8. <?dbhtml filename="inputrc.html"?>
  9. <title>Creating the /etc/inputrc File</title>
  10. <indexterm zone="ch-scripts-inputrc">
  11. <primary sortas="e-/etc/inputrc">/etc/inputrc</primary>
  12. </indexterm>
  13. <para>The <filename>inputrc</filename> file handles keyboard mapping for
  14. specific situations. This file is the startup file used by Readline &mdash; the
  15. input-related library &mdash; used by Bash and most other shells.</para>
  16. <para>Most people do not need user-specific keyboard mappings so the command
  17. below creates a global <filename>/etc/inputrc</filename> used by everyone who
  18. logs in. If you later decide you need to override the defaults on a per-user
  19. basis, you can create a <filename>.inputrc</filename> file in the user's home
  20. directory with the modified mappings.</para>
  21. <para>For more information on how to edit the <filename>inputrc</filename>
  22. file, see <command>info bash</command> under the <emphasis>Readline Init
  23. File</emphasis> section. <command>info readline</command> is also a good
  24. source of information.</para>
  25. <para>Below is a generic global <filename>inputrc</filename> along with comments
  26. to explain what the various options do. Note that comments cannot be on the same
  27. line as commands. Create the file using the following command:</para>
  28. <screen><userinput>cat &gt; /etc/inputrc &lt;&lt; "EOF"
  29. <literal># Begin /etc/inputrc
  30. # Modified by Chris Lynn &lt;roryo@roryo.dynup.net&gt;
  31. # Allow the command prompt to wrap to the next line
  32. set horizontal-scroll-mode Off
  33. # Enable 8bit input
  34. set meta-flag On
  35. set input-meta On
  36. # Turns off 8th bit stripping
  37. set convert-meta Off
  38. # Keep the 8th bit for display
  39. set output-meta On
  40. # none, visible or audible
  41. set bell-style none
  42. # All of the following map the escape sequence of the value
  43. # contained in the 1st argument to the readline specific functions
  44. "\eOd": backward-word
  45. "\eOc": forward-word
  46. # for linux console
  47. "\e[1~": beginning-of-line
  48. "\e[4~": end-of-line
  49. "\e[5~": beginning-of-history
  50. "\e[6~": end-of-history
  51. "\e[3~": delete-char
  52. "\e[2~": quoted-insert
  53. # for xterm
  54. "\eOH": beginning-of-line
  55. "\eOF": end-of-line
  56. # for Konsole
  57. "\e[H": beginning-of-line
  58. "\e[F": end-of-line
  59. # End /etc/inputrc</literal>
  60. EOF</userinput></screen>
  61. </sect1>