Переглянути джерело

chapter07: Translate inputrc configuration

Xi Ruoyao 7 роки тому
батько
коміт
80937c916b
1 змінених файлів з 28 додано та 30 видалено
  1. 28 30
      chapter07/inputrc.xml

+ 28 - 30
chapter07/inputrc.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
    <!ENTITY % general-entities SYSTEM "../general.ent">
@@ -8,59 +8,57 @@
 <sect1 id="ch-scripts-inputrc">
   <?dbhtml filename="inputrc.html"?>
 
-  <title>Creating the /etc/inputrc File</title>
+  <title>创建 /etc/inputrc 文件</title>
 
   <indexterm zone="ch-scripts-inputrc">
     <primary sortas="e-/etc/inputrc">/etc/inputrc</primary>
   </indexterm>
 
-  <para>The <filename>inputrc</filename> file is the configuration file for
-  then Readline library, which provides editing capabilities while the user is
-  entering  a line from the terminal. It works by tranlating keyboard inputs
-  into specific actions.  Readline is used by Bash and most other shells as
-  well as many other applications.</para>
+  <para><filename>inputrc</filename> 文件是 Readline 库的配置文件,
+	  该库在用户从控制台输入命令行时提供编辑功能。
+	  它的工作原理是将键盘输入翻译为特定动作。
+	  Readline 被 Bash 和大多数其他 shell ,以及许多其他程序使用。</para>
 
-  <para>Most people do not need user-specific functionality so the command
-  below creates a global <filename>/etc/inputrc</filename> used by everyone who
-  logs in. If you later decide you need to override the defaults on a per-user
-  basis, you can create a <filename>.inputrc</filename> file in the user's home
-  directory with the modified mappings.</para>
+  <para>多数人不需要 Readline 的用户配置功能,因此以下命令创建全局的
+  <filename>/etc/inputrc</filename> 文件,供所有登录用户使用。
+  如果您之后决定对于某个用户覆盖掉默认值,您可以在该用户的主目录下创建
+  <filename>.inputrc</filename> 文件,包含被修改的映射。</para>
 
-  <para>For more information on how to edit the <filename>inputrc</filename>
-  file, see <command>info bash</command> under the <emphasis>Readline Init
-  File</emphasis> section. <command>info readline</command> is also a good
-  source of information.</para>
+  <para>关于更多如何编写 <filename>inputrc</filename> 文件的信息,
+  参考 <command>info bash</command> 中 <emphasis>Readline Init
+  File</emphasis> 一节。 <command>info readline</command>
+  也是一个很好的信息源。</para>
 
-  <para>Below is a generic global <filename>inputrc</filename> along with comments
-  to explain what the various options do. Note that comments cannot be on the same
-  line as commands. Create the file using the following command:</para>
+  <para>下面是一个通用的全局 <filename>inputrc</filename> 文件,
+  包含解释一些选项含义的注释。注意注释不能和命令写在同一行。
+  执行下列命令创建该文件:</para>
 
 <screen><userinput>cat &gt; /etc/inputrc &lt;&lt; "EOF"
 <literal># Begin /etc/inputrc
-# Modified by Chris Lynn &lt;roryo@roryo.dynup.net&gt;
+# 由 Chris Lynn &lt;roryo@roryo.dynup.net&gt; 编辑
 
-# Allow the command prompt to wrap to the next line
+# 允许命令行折叠到下一行
 set horizontal-scroll-mode Off
 
-# Enable 8bit input
+# 允许 8 位输入
 set meta-flag On
 set input-meta On
 
-# Turns off 8th bit stripping
+# 不移除第 8 位
 set convert-meta Off
 
-# Keep the 8th bit for display
+# 显示时保留第 8 位
 set output-meta On
 
-# none, visible or audible
+# 可以设为 none,visible 或 audible
 set bell-style none
 
-# All of the following map the escape sequence of the value
-# contained in the 1st argument to the readline specific functions
+# 以下所有命令将第一参数中包含的 escape 序列
+# 映射为对应的 readline 功能
 "\eOd": backward-word
 "\eOc": forward-word
 
-# for linux console
+# 用于 linux 终端
 "\e[1~": beginning-of-line
 "\e[4~": end-of-line
 "\e[5~": beginning-of-history
@@ -68,11 +66,11 @@ set bell-style none
 "\e[3~": delete-char
 "\e[2~": quoted-insert
 
-# for xterm
+# 用于 xterm
 "\eOH": beginning-of-line
 "\eOF": end-of-line
 
-# for Konsole
+# 用于 Konsole
 "\e[H": beginning-of-line
 "\e[F": end-of-line