Files
LFS_Book/chapter07/inputrc.xml

71 lines
3.4 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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">
%general-entities;
]>
<sect1 id="ch-scripts-inputrc">
<?dbhtml filename="inputrc.html"?>
<title>Создание файла /etc/inputrc File</title>
<indexterm zone="ch-scripts-inputrc">
<primary sortas="e-/etc/inputrc">/etc/inputrc</primary>
</indexterm>
<para>Файл inputrc-это файл конфигурации библиотеки Readline, который предоставляет возможности редактирования при вводе пользователем строки из терминала. Он перенаправляет ввода с клавиатуры в конкретные действия. Readline используется в Bash и большинством других оболочек, а также многими другими приложениями.</para>
<para>Большинство людей не нуждаются в настраиваемой вручную функциональности, поэтому команда ниже создает глобальный <filename>/etc/inputrc</filename>, используемый всеми, кто входит в систему. Если вы позже решите, что необходимо переопределить значения по умолчанию для каждого пользователя, можно создать файл <filename>.inputrc</filename> в домашнем каталоге пользователя с измененными назначениями.</para>
<para>Дополнительные сведения о редактировании файла <filename>inputrc</filename> см. в разделе <command>info bash</command> в секции <emphasis>Readline Init
File</emphasis>.<command>info readline</command> также является хорошим источником информации.</para>
<para>Ниже приведен общий глобальный inputrc вместе с комментариями, чтобы объяснить, что делают различные варианты. Обратите внимание, что комментарии не могут находиться в одной строке с командами. Создайте файл, выполнив следующую команду:</para>
<screen><userinput>cat &gt; /etc/inputrc &lt;&lt; "EOF"
<literal># Begin /etc/inputrc
# Modified by 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
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 in 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
# for Konsole
"\e[H": beginning-of-line
"\e[F": end-of-line
# End /etc/inputrc</literal>
EOF</userinput></screen>
</sect1>