inputrc.xml 2.6 KB

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