Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / amd64 / html / readline.html
CommitLineData
920dae64
AT
1<HTML>
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3<!-- Created on July, 27 2004 by texi2html 1.64 -->
4<!--
5Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
6 Karl Berry <karl@freefriends.org>
7 Olaf Bachmann <obachman@mathematik.uni-kl.de>
8 and many others.
9Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
10Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
11
12-->
13<HEAD>
14<TITLE>GNU Readline Library: </TITLE>
15
16<META NAME="description" CONTENT="GNU Readline Library: ">
17<META NAME="keywords" CONTENT="GNU Readline Library: ">
18<META NAME="resource-type" CONTENT="document">
19<META NAME="distribution" CONTENT="global">
20<META NAME="Generator" CONTENT="texi2html 1.64">
21
22</HEAD>
23
24<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
25
26<A NAME="SEC_Top"></A>
27<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
28<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
29<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
30<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
31<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
32</TR></TABLE>
33<H1>GNU Readline Library</H1></P><P>
34
35This document describes the GNU Readline Library, a utility which aids
36in the consistency of user interface across discrete programs which
37provide a command line interface.
38</P><P>
39
40<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
41<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC1">1. Command Line Editing</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">GNU Readline User's Manual.</TD></TR>
42<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC23">2. Programming with GNU Readline</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">GNU Readline Programmer's Manual.</TD></TR>
43<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC49">A. Copying This Manual</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Copying this manual.</TD></TR>
44<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC52">Concept Index</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Index of concepts described in this manual.</TD></TR>
45<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC53">Function and Variable Index</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Index of externally visible functions
46 and variables.</TD></TR>
47</TABLE></BLOCKQUOTE>
48<P>
49
50<HR SIZE=1>
51<A NAME="SEC1"></A>
52<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
53<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> &lt; </A>]</TD>
54<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC2"> &gt; </A>]</TD>
55<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
56<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> Up </A>]</TD>
57<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> &gt;&gt; </A>]</TD>
58<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
59<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
60<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
61<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
62</TR></TABLE>
63<A NAME="Command Line Editing"></A>
64<H1> 1. Command Line Editing </H1>
65<!--docid::SEC1::-->
66<P>
67
68This chapter describes the basic features of the GNU
69command line editing interface.
70</P><P>
71
72<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
73<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC2">1.1 Introduction to Line Editing</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Notation used in this text.</TD></TR>
74<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC3">1.2 Readline Interaction</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The minimum set of commands for editing a line.</TD></TR>
75<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC9">1.3 Readline Init File</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Customizing Readline from a user's view.</TD></TR>
76<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC13">1.4 Bindable Readline Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A description of most of the Readline commands
77 available for binding</TD></TR>
78<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC22">1.5 Readline vi Mode</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A short description of how to make Readline
79 behave like the vi editor.</TD></TR>
80</TABLE></BLOCKQUOTE>
81<P>
82
83<A NAME="Introduction and Notation"></A>
84<HR SIZE="6">
85<A NAME="SEC2"></A>
86<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
87<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC1"> &lt; </A>]</TD>
88<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> &gt; </A>]</TD>
89<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
90<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC1"> Up </A>]</TD>
91<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> &gt;&gt; </A>]</TD>
92<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
93<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
94<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
95<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
96</TR></TABLE>
97<H2> 1.1 Introduction to Line Editing </H2>
98<!--docid::SEC2::-->
99<P>
100
101The following paragraphs describe the notation used to represent
102keystrokes.
103</P><P>
104
105The text <KBD>C-k</KBD> is read as `Control-K' and describes the character
106produced when the <KBD>k</KBD> key is pressed while the Control key
107is depressed.
108</P><P>
109
110The text <KBD>M-k</KBD> is read as `Meta-K' and describes the character
111produced when the Meta key (if you have one) is depressed, and the <KBD>k</KBD>
112key is pressed.
113The Meta key is labeled <KBD>ALT</KBD> on many keyboards.
114On keyboards with two keys labeled <KBD>ALT</KBD> (usually to either side of
115the space bar), the <KBD>ALT</KBD> on the left side is generally set to
116work as a Meta key.
117The <KBD>ALT</KBD> key on the right may also be configured to work as a
118Meta key or may be configured as some other modifier, such as a
119Compose key for typing accented characters.
120</P><P>
121
122If you do not have a Meta or <KBD>ALT</KBD> key, or another key working as
123a Meta key, the identical keystroke can be generated by typing <KBD>ESC</KBD>
124<EM>first</EM>, and then typing <KBD>k</KBD>.
125Either process is known as <EM>metafying</EM> the <KBD>k</KBD> key.
126</P><P>
127
128The text <KBD>M-C-k</KBD> is read as `Meta-Control-k' and describes the
129character produced by <EM>metafying</EM> <KBD>C-k</KBD>.
130</P><P>
131
132In addition, several keys have their own names. Specifically,
133<KBD>DEL</KBD>, <KBD>ESC</KBD>, <KBD>LFD</KBD>, <KBD>SPC</KBD>, <KBD>RET</KBD>, and <KBD>TAB</KBD> all
134stand for themselves when seen in this text, or in an init file
135(see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
136If your keyboard lacks a <KBD>LFD</KBD> key, typing <KBD>C-j</KBD> will
137produce the desired character.
138The <KBD>RET</KBD> key may be labeled <KBD>Return</KBD> or <KBD>Enter</KBD> on
139some keyboards.
140</P><P>
141
142<A NAME="Readline Interaction"></A>
143<HR SIZE="6">
144<A NAME="SEC3"></A>
145<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
146<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC2"> &lt; </A>]</TD>
147<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC4"> &gt; </A>]</TD>
148<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> &lt;&lt; </A>]</TD>
149<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC1"> Up </A>]</TD>
150<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> &gt;&gt; </A>]</TD>
151<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
152<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
153<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
154<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
155</TR></TABLE>
156<H2> 1.2 Readline Interaction </H2>
157<!--docid::SEC3::-->
158<P>
159
160Often during an interactive session you type in a long line of text,
161only to notice that the first word on the line is misspelled. The
162Readline library gives you a set of commands for manipulating the text
163as you type it in, allowing you to just fix your typo, and not forcing
164you to retype the majority of the line. Using these editing commands,
165you move the cursor to the place that needs correction, and delete or
166insert the text of the corrections. Then, when you are satisfied with
167the line, you simply press <KBD>RET</KBD>. You do not have to be at the
168end of the line to press <KBD>RET</KBD>; the entire line is accepted
169regardless of the location of the cursor within the line.
170</P><P>
171
172<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
173<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC4">1.2.1 Readline Bare Essentials</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The least you need to know about Readline.</TD></TR>
174<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC5">1.2.2 Readline Movement Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Moving about the input line.</TD></TR>
175<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC6">1.2.3 Readline Killing Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to delete text, and how to get it back!</TD></TR>
176<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC7">1.2.4 Readline Arguments</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Giving numeric arguments to commands.</TD></TR>
177<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC8">1.2.5 Searching for Commands in the History</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Searching through previous lines.</TD></TR>
178</TABLE></BLOCKQUOTE>
179<P>
180
181<A NAME="Readline Bare Essentials"></A>
182<HR SIZE="6">
183<A NAME="SEC4"></A>
184<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
185<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> &lt; </A>]</TD>
186<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC5"> &gt; </A>]</TD>
187<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> &lt;&lt; </A>]</TD>
188<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> Up </A>]</TD>
189<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> &gt;&gt; </A>]</TD>
190<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
191<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
192<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
193<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
194</TR></TABLE>
195<H3> 1.2.1 Readline Bare Essentials </H3>
196<!--docid::SEC4::-->
197<P>
198
199In order to enter characters into the line, simply type them. The typed
200character appears where the cursor was, and then the cursor moves one
201space to the right. If you mistype a character, you can use your
202erase character to back up and delete the mistyped character.
203</P><P>
204
205Sometimes you may mistype a character, and
206not notice the error until you have typed several other characters. In
207that case, you can type <KBD>C-b</KBD> to move the cursor to the left, and then
208correct your mistake. Afterwards, you can move the cursor to the right
209with <KBD>C-f</KBD>.
210</P><P>
211
212When you add text in the middle of a line, you will notice that characters
213to the right of the cursor are `pushed over' to make room for the text
214that you have inserted. Likewise, when you delete text behind the cursor,
215characters to the right of the cursor are `pulled back' to fill in the
216blank space created by the removal of the text. A list of the bare
217essentials for editing the text of an input line follows.
218</P><P>
219
220<DL COMPACT>
221<DT><KBD>C-b</KBD>
222<DD>Move back one character.
223<DT><KBD>C-f</KBD>
224<DD>Move forward one character.
225<DT><KBD>DEL</KBD> or <KBD>Backspace</KBD>
226<DD>Delete the character to the left of the cursor.
227<DT><KBD>C-d</KBD>
228<DD>Delete the character underneath the cursor.
229<DT>Printing characters
230<DD>Insert the character into the line at the cursor.
231<DT><KBD>C-_</KBD> or <KBD>C-x C-u</KBD>
232<DD>Undo the last editing command. You can undo all the way back to an
233empty line.
234</DL>
235<P>
236
237(Depending on your configuration, the <KBD>Backspace</KBD> key be set to
238delete the character to the left of the cursor and the <KBD>DEL</KBD> key set
239to delete the character underneath the cursor, like <KBD>C-d</KBD>, rather
240than the character to the left of the cursor.)
241</P><P>
242
243<A NAME="Readline Movement Commands"></A>
244<HR SIZE="6">
245<A NAME="SEC5"></A>
246<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
247<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC4"> &lt; </A>]</TD>
248<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC6"> &gt; </A>]</TD>
249<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC6"> &lt;&lt; </A>]</TD>
250<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> Up </A>]</TD>
251<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> &gt;&gt; </A>]</TD>
252<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
253<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
254<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
255<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
256</TR></TABLE>
257<H3> 1.2.2 Readline Movement Commands </H3>
258<!--docid::SEC5::-->
259<P>
260
261The above table describes the most basic keystrokes that you need
262in order to do editing of the input line. For your convenience, many
263other commands have been added in addition to <KBD>C-b</KBD>, <KBD>C-f</KBD>,
264<KBD>C-d</KBD>, and <KBD>DEL</KBD>. Here are some commands for moving more rapidly
265about the line.
266</P><P>
267
268<DL COMPACT>
269<DT><KBD>C-a</KBD>
270<DD>Move to the start of the line.
271<DT><KBD>C-e</KBD>
272<DD>Move to the end of the line.
273<DT><KBD>M-f</KBD>
274<DD>Move forward a word, where a word is composed of letters and digits.
275<DT><KBD>M-b</KBD>
276<DD>Move backward a word.
277<DT><KBD>C-l</KBD>
278<DD>Clear the screen, reprinting the current line at the top.
279</DL>
280<P>
281
282Notice how <KBD>C-f</KBD> moves forward a character, while <KBD>M-f</KBD> moves
283forward a word. It is a loose convention that control keystrokes
284operate on characters while meta keystrokes operate on words.
285</P><P>
286
287<A NAME="Readline Killing Commands"></A>
288<HR SIZE="6">
289<A NAME="SEC6"></A>
290<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
291<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC5"> &lt; </A>]</TD>
292<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC7"> &gt; </A>]</TD>
293<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC7"> &lt;&lt; </A>]</TD>
294<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> Up </A>]</TD>
295<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> &gt;&gt; </A>]</TD>
296<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
297<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
298<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
299<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
300</TR></TABLE>
301<H3> 1.2.3 Readline Killing Commands </H3>
302<!--docid::SEC6::-->
303<P>
304
305<A NAME="IDX1"></A>
306<A NAME="IDX2"></A>
307</P><P>
308
309<EM>Killing</EM> text means to delete the text from the line, but to save
310it away for later use, usually by <EM>yanking</EM> (re-inserting)
311it back into the line.
312(`Cut' and `paste' are more recent jargon for `kill' and `yank'.)
313</P><P>
314
315If the description for a command says that it `kills' text, then you can
316be sure that you can get the text back in a different (or the same)
317place later.
318</P><P>
319
320When you use a kill command, the text is saved in a <EM>kill-ring</EM>.
321Any number of consecutive kills save all of the killed text together, so
322that when you yank it back, you get it all. The kill
323ring is not line specific; the text that you killed on a previously
324typed line is available to be yanked back later, when you are typing
325another line.
326<A NAME="IDX3"></A>
327</P><P>
328
329Here is the list of commands for killing text.
330</P><P>
331
332<DL COMPACT>
333<DT><KBD>C-k</KBD>
334<DD>Kill the text from the current cursor position to the end of the line.
335<P>
336
337<DT><KBD>M-d</KBD>
338<DD>Kill from the cursor to the end of the current word, or, if between
339words, to the end of the next word.
340Word boundaries are the same as those used by <KBD>M-f</KBD>.
341<P>
342
343<DT><KBD>M-<KBD>DEL</KBD></KBD>
344<DD>Kill from the cursor the start of the current word, or, if between
345words, to the start of the previous word.
346Word boundaries are the same as those used by <KBD>M-b</KBD>.
347<P>
348
349<DT><KBD>C-w</KBD>
350<DD>Kill from the cursor to the previous whitespace. This is different than
351<KBD>M-<KBD>DEL</KBD></KBD> because the word boundaries differ.
352<P>
353
354</DL>
355<P>
356
357Here is how to <EM>yank</EM> the text back into the line. Yanking
358means to copy the most-recently-killed text from the kill buffer.
359</P><P>
360
361<DL COMPACT>
362<DT><KBD>C-y</KBD>
363<DD>Yank the most recently killed text back into the buffer at the cursor.
364<P>
365
366<DT><KBD>M-y</KBD>
367<DD>Rotate the kill-ring, and yank the new top. You can only do this if
368the prior command is <KBD>C-y</KBD> or <KBD>M-y</KBD>.
369</DL>
370<P>
371
372<A NAME="Readline Arguments"></A>
373<HR SIZE="6">
374<A NAME="SEC7"></A>
375<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
376<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC6"> &lt; </A>]</TD>
377<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC8"> &gt; </A>]</TD>
378<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC8"> &lt;&lt; </A>]</TD>
379<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> Up </A>]</TD>
380<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> &gt;&gt; </A>]</TD>
381<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
382<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
383<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
384<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
385</TR></TABLE>
386<H3> 1.2.4 Readline Arguments </H3>
387<!--docid::SEC7::-->
388<P>
389
390You can pass numeric arguments to Readline commands. Sometimes the
391argument acts as a repeat count, other times it is the <I>sign</I> of the
392argument that is significant. If you pass a negative argument to a
393command which normally acts in a forward direction, that command will
394act in a backward direction. For example, to kill text back to the
395start of the line, you might type <SAMP>`M-- C-k'</SAMP>.
396</P><P>
397
398The general way to pass numeric arguments to a command is to type meta
399digits before the command. If the first `digit' typed is a minus
400sign (<SAMP>`-'</SAMP>), then the sign of the argument will be negative. Once
401you have typed one meta digit to get the argument started, you can type
402the remainder of the digits, and then the command. For example, to give
403the <KBD>C-d</KBD> command an argument of 10, you could type <SAMP>`M-1 0 C-d'</SAMP>,
404which will delete the next ten characters on the input line.
405</P><P>
406
407<A NAME="Searching"></A>
408<HR SIZE="6">
409<A NAME="SEC8"></A>
410<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
411<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC7"> &lt; </A>]</TD>
412<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> &gt; </A>]</TD>
413<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> &lt;&lt; </A>]</TD>
414<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> Up </A>]</TD>
415<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> &gt;&gt; </A>]</TD>
416<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
417<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
418<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
419<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
420</TR></TABLE>
421<H3> 1.2.5 Searching for Commands in the History </H3>
422<!--docid::SEC8::-->
423<P>
424
425Readline provides commands for searching through the command history
426for lines containing a specified string.
427There are two search modes: <EM>incremental</EM> and <EM>non-incremental</EM>.
428</P><P>
429
430Incremental searches begin before the user has finished typing the
431search string.
432As each character of the search string is typed, Readline displays
433the next entry from the history matching the string typed so far.
434An incremental search requires only as many characters as needed to
435find the desired history entry.
436To search backward in the history for a particular string, type
437<KBD>C-r</KBD>. Typing <KBD>C-s</KBD> searches forward through the history.
438The characters present in the value of the <CODE>isearch-terminators</CODE> variable
439are used to terminate an incremental search.
440If that variable has not been assigned a value, the <KBD>ESC</KBD> and
441<KBD>C-J</KBD> characters will terminate an incremental search.
442<KBD>C-g</KBD> will abort an incremental search and restore the original line.
443When the search is terminated, the history entry containing the
444search string becomes the current line.
445</P><P>
446
447To find other matching entries in the history list, type <KBD>C-r</KBD> or
448<KBD>C-s</KBD> as appropriate.
449This will search backward or forward in the history for the next
450entry matching the search string typed so far.
451Any other key sequence bound to a Readline command will terminate
452the search and execute that command.
453For instance, a <KBD>RET</KBD> will terminate the search and accept
454the line, thereby executing the command from the history list.
455A movement command will terminate the search, make the last line found
456the current line, and begin editing.
457</P><P>
458
459Readline remembers the last incremental search string. If two
460<KBD>C-r</KBD>s are typed without any intervening characters defining a new
461search string, any remembered search string is used.
462</P><P>
463
464Non-incremental searches read the entire search string before starting
465to search for matching history lines. The search string may be
466typed by the user or be part of the contents of the current line.
467</P><P>
468
469<A NAME="Readline Init File"></A>
470<HR SIZE="6">
471<A NAME="SEC9"></A>
472<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
473<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC8"> &lt; </A>]</TD>
474<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC10"> &gt; </A>]</TD>
475<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> &lt;&lt; </A>]</TD>
476<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC1"> Up </A>]</TD>
477<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> &gt;&gt; </A>]</TD>
478<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
479<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
480<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
481<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
482</TR></TABLE>
483<H2> 1.3 Readline Init File </H2>
484<!--docid::SEC9::-->
485<P>
486
487Although the Readline library comes with a set of Emacs-like
488keybindings installed by default, it is possible to use a different set
489of keybindings.
490Any user can customize programs that use Readline by putting
491commands in an <EM>inputrc</EM> file, conventionally in his home directory.
492The name of this
493file is taken from the value of the environment variable <CODE>INPUTRC</CODE>. If
494that variable is unset, the default is <TT>`~/.inputrc'</TT>.
495</P><P>
496
497When a program which uses the Readline library starts up, the
498init file is read, and the key bindings are set.
499</P><P>
500
501In addition, the <CODE>C-x C-r</CODE> command re-reads this init file, thus
502incorporating any changes that you might have made to it.
503</P><P>
504
505<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
506<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Syntax for the commands in the inputrc file.</TD></TR>
507</TABLE>
508
509<br>
510<TABLE BORDER=0 CELLSPACING=0>
511<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC11">1.3.2 Conditional Init Constructs</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Conditional key bindings in the inputrc file.</TD></TR>
512</TABLE>
513
514<br>
515<TABLE BORDER=0 CELLSPACING=0>
516<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC12">1.3.3 Sample Init File</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">An example inputrc file.</TD></TR>
517</TABLE></BLOCKQUOTE>
518<P>
519
520<A NAME="Readline Init File Syntax"></A>
521<HR SIZE="6">
522<A NAME="SEC10"></A>
523<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
524<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> &lt; </A>]</TD>
525<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC11"> &gt; </A>]</TD>
526<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> &lt;&lt; </A>]</TD>
527<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> Up </A>]</TD>
528<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> &gt;&gt; </A>]</TD>
529<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
530<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
531<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
532<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
533</TR></TABLE>
534<H3> 1.3.1 Readline Init File Syntax </H3>
535<!--docid::SEC10::-->
536<P>
537
538There are only a few basic constructs allowed in the
539Readline init file. Blank lines are ignored.
540Lines beginning with a <SAMP>`#'</SAMP> are comments.
541Lines beginning with a <SAMP>`$'</SAMP> indicate conditional
542constructs (see section <A HREF="readline.html#SEC11">1.3.2 Conditional Init Constructs</A>). Other lines
543denote variable settings and key bindings.
544</P><P>
545
546<DL COMPACT>
547<DT>Variable Settings
548<DD>You can modify the run-time behavior of Readline by
549altering the values of variables in Readline
550using the <CODE>set</CODE> command within the init file.
551The syntax is simple:
552<P>
553
554<TABLE><tr><td>&nbsp;</td><td class=example><pre>set <VAR>variable</VAR> <VAR>value</VAR>
555</pre></td></tr></table></P><P>
556
557Here, for example, is how to
558change from the default Emacs-like key binding to use
559<CODE>vi</CODE> line editing commands:
560</P><P>
561
562<TABLE><tr><td>&nbsp;</td><td class=example><pre>set editing-mode vi
563</pre></td></tr></table></P><P>
564
565Variable names and values, where appropriate, are recognized without regard
566to case.
567</P><P>
568
569A great deal of run-time behavior is changeable with the following
570variables.
571</P><P>
572
573<A NAME="IDX4"></A>
574<DL COMPACT>
575
576<DT><CODE>bell-style</CODE>
577<DD><A NAME="IDX5"></A>
578Controls what happens when Readline wants to ring the terminal bell.
579If set to <SAMP>`none'</SAMP>, Readline never rings the bell. If set to
580<SAMP>`visible'</SAMP>, Readline uses a visible bell if one is available.
581If set to <SAMP>`audible'</SAMP> (the default), Readline attempts to ring
582the terminal's bell.
583<P>
584
585<DT><CODE>comment-begin</CODE>
586<DD><A NAME="IDX6"></A>
587The string to insert at the beginning of the line when the
588<CODE>insert-comment</CODE> command is executed. The default value
589is <CODE>"#"</CODE>.
590<P>
591
592<DT><CODE>completion-ignore-case</CODE>
593<DD>If set to <SAMP>`on'</SAMP>, Readline performs filename matching and completion
594in a case-insensitive fashion.
595The default value is <SAMP>`off'</SAMP>.
596<P>
597
598<DT><CODE>completion-query-items</CODE>
599<DD><A NAME="IDX7"></A>
600The number of possible completions that determines when the user is
601asked whether the list of possibilities should be displayed.
602If the number of possible completions is greater than this value,
603Readline will ask the user whether or not he wishes to view
604them; otherwise, they are simply listed.
605This variable must be set to an integer value greater than or equal to 0.
606The default limit is <CODE>100</CODE>.
607<P>
608
609<DT><CODE>convert-meta</CODE>
610<DD><A NAME="IDX8"></A>
611If set to <SAMP>`on'</SAMP>, Readline will convert characters with the
612eighth bit set to an ASCII key sequence by stripping the eighth
613bit and prefixing an <KBD>ESC</KBD> character, converting them to a
614meta-prefixed key sequence. The default value is <SAMP>`on'</SAMP>.
615<P>
616
617<DT><CODE>disable-completion</CODE>
618<DD><A NAME="IDX9"></A>
619If set to <SAMP>`On'</SAMP>, Readline will inhibit word completion.
620Completion characters will be inserted into the line as if they had
621been mapped to <CODE>self-insert</CODE>. The default is <SAMP>`off'</SAMP>.
622<P>
623
624<DT><CODE>editing-mode</CODE>
625<DD><A NAME="IDX10"></A>
626The <CODE>editing-mode</CODE> variable controls which default set of
627key bindings is used. By default, Readline starts up in Emacs editing
628mode, where the keystrokes are most similar to Emacs. This variable can be
629set to either <SAMP>`emacs'</SAMP> or <SAMP>`vi'</SAMP>.
630<P>
631
632<DT><CODE>enable-keypad</CODE>
633<DD><A NAME="IDX11"></A>
634When set to <SAMP>`on'</SAMP>, Readline will try to enable the application
635keypad when it is called. Some systems need this to enable the
636arrow keys. The default is <SAMP>`off'</SAMP>.
637<P>
638
639<DT><CODE>expand-tilde</CODE>
640<DD><A NAME="IDX12"></A>
641If set to <SAMP>`on'</SAMP>, tilde expansion is performed when Readline
642attempts word completion. The default is <SAMP>`off'</SAMP>.
643<P>
644
645<A NAME="IDX13"></A>
646If set to <SAMP>`on'</SAMP>, the history code attempts to place point at the
647same location on each history line retrieved with <CODE>previous-history</CODE>
648or <CODE>next-history</CODE>.
649</P><P>
650
651<DT><CODE>horizontal-scroll-mode</CODE>
652<DD><A NAME="IDX14"></A>
653This variable can be set to either <SAMP>`on'</SAMP> or <SAMP>`off'</SAMP>. Setting it
654to <SAMP>`on'</SAMP> means that the text of the lines being edited will scroll
655horizontally on a single screen line when they are longer than the width
656of the screen, instead of wrapping onto a new screen line. By default,
657this variable is set to <SAMP>`off'</SAMP>.
658<P>
659
660<DT><CODE>input-meta</CODE>
661<DD><A NAME="IDX15"></A>
662<A NAME="IDX16"></A>
663If set to <SAMP>`on'</SAMP>, Readline will enable eight-bit input (it
664will not clear the eighth bit in the characters it reads),
665regardless of what the terminal claims it can support. The
666default value is <SAMP>`off'</SAMP>. The name <CODE>meta-flag</CODE> is a
667synonym for this variable.
668<P>
669
670<DT><CODE>isearch-terminators</CODE>
671<DD><A NAME="IDX17"></A>
672The string of characters that should terminate an incremental search without
673subsequently executing the character as a command (see section <A HREF="readline.html#SEC8">1.2.5 Searching for Commands in the History</A>).
674If this variable has not been given a value, the characters <KBD>ESC</KBD> and
675<KBD>C-J</KBD> will terminate an incremental search.
676<P>
677
678<DT><CODE>keymap</CODE>
679<DD><A NAME="IDX18"></A>
680Sets Readline's idea of the current keymap for key binding commands.
681Acceptable <CODE>keymap</CODE> names are
682<CODE>emacs</CODE>,
683<CODE>emacs-standard</CODE>,
684<CODE>emacs-meta</CODE>,
685<CODE>emacs-ctlx</CODE>,
686<CODE>vi</CODE>,
687<CODE>vi-move</CODE>,
688<CODE>vi-command</CODE>, and
689<CODE>vi-insert</CODE>.
690<CODE>vi</CODE> is equivalent to <CODE>vi-command</CODE>; <CODE>emacs</CODE> is
691equivalent to <CODE>emacs-standard</CODE>. The default value is <CODE>emacs</CODE>.
692The value of the <CODE>editing-mode</CODE> variable also affects the
693default keymap.
694<P>
695
696<DT><CODE>mark-directories</CODE>
697<DD>If set to <SAMP>`on'</SAMP>, completed directory names have a slash
698appended. The default is <SAMP>`on'</SAMP>.
699<P>
700
701<DT><CODE>mark-modified-lines</CODE>
702<DD><A NAME="IDX19"></A>
703This variable, when set to <SAMP>`on'</SAMP>, causes Readline to display an
704asterisk (<SAMP>`*'</SAMP>) at the start of history lines which have been modified.
705This variable is <SAMP>`off'</SAMP> by default.
706<P>
707
708<DT><CODE>mark-symlinked-directories</CODE>
709<DD><A NAME="IDX20"></A>
710If set to <SAMP>`on'</SAMP>, completed names which are symbolic links
711to directories have a slash appended (subject to the value of
712<CODE>mark-directories</CODE>).
713The default is <SAMP>`off'</SAMP>.
714<P>
715
716<DT><CODE>match-hidden-files</CODE>
717<DD><A NAME="IDX21"></A>
718This variable, when set to <SAMP>`on'</SAMP>, causes Readline to match files whose
719names begin with a <SAMP>`.'</SAMP> (hidden files) when performing filename
720completion, unless the leading <SAMP>`.'</SAMP> is
721supplied by the user in the filename to be completed.
722This variable is <SAMP>`on'</SAMP> by default.
723<P>
724
725<DT><CODE>output-meta</CODE>
726<DD><A NAME="IDX22"></A>
727If set to <SAMP>`on'</SAMP>, Readline will display characters with the
728eighth bit set directly rather than as a meta-prefixed escape
729sequence. The default is <SAMP>`off'</SAMP>.
730<P>
731
732<DT><CODE>page-completions</CODE>
733<DD><A NAME="IDX23"></A>
734If set to <SAMP>`on'</SAMP>, Readline uses an internal <CODE>more</CODE>-like pager
735to display a screenful of possible completions at a time.
736This variable is <SAMP>`on'</SAMP> by default.
737<P>
738
739<DT><CODE>print-completions-horizontally</CODE>
740<DD>If set to <SAMP>`on'</SAMP>, Readline will display completions with matches
741sorted horizontally in alphabetical order, rather than down the screen.
742The default is <SAMP>`off'</SAMP>.
743<P>
744
745<DT><CODE>show-all-if-ambiguous</CODE>
746<DD><A NAME="IDX24"></A>
747This alters the default behavior of the completion functions. If
748set to <SAMP>`on'</SAMP>,
749words which have more than one possible completion cause the
750matches to be listed immediately instead of ringing the bell.
751The default value is <SAMP>`off'</SAMP>.
752<P>
753
754<DT><CODE>show-all-if-unmodified</CODE>
755<DD><A NAME="IDX25"></A>
756This alters the default behavior of the completion functions in
757a fashion similar to <VAR>show-all-if-ambiguous</VAR>.
758If set to <SAMP>`on'</SAMP>,
759words which have more than one possible completion without any
760possible partial completion (the possible completions don't share
761a common prefix) cause the matches to be listed immediately instead
762of ringing the bell.
763The default value is <SAMP>`off'</SAMP>.
764<P>
765
766<DT><CODE>visible-stats</CODE>
767<DD><A NAME="IDX26"></A>
768If set to <SAMP>`on'</SAMP>, a character denoting a file's type
769is appended to the filename when listing possible
770completions. The default is <SAMP>`off'</SAMP>.
771<P>
772
773</DL>
774<P>
775
776<DT>Key Bindings
777<DD>The syntax for controlling key bindings in the init file is
778simple. First you need to find the name of the command that you
779want to change. The following sections contain tables of the command
780name, the default keybinding, if any, and a short description of what
781the command does.
782<P>
783
784Once you know the name of the command, simply place on a line
785in the init file the name of the key
786you wish to bind the command to, a colon, and then the name of the
787command. The name of the key
788can be expressed in different ways, depending on what you find most
789comfortable.
790</P><P>
791
792In addition to command names, readline allows keys to be bound
793to a string that is inserted when the key is pressed (a <VAR>macro</VAR>).
794</P><P>
795
796<DL COMPACT>
797<DT><VAR>keyname</VAR>: <VAR>function-name</VAR> or <VAR>macro</VAR>
798<DD><VAR>keyname</VAR> is the name of a key spelled out in English. For example:
799<TABLE><tr><td>&nbsp;</td><td class=example><pre>Control-u: universal-argument
800Meta-Rubout: backward-kill-word
801Control-o: "&#62; output"
802</pre></td></tr></table><P>
803
804In the above example, <KBD>C-u</KBD> is bound to the function
805<CODE>universal-argument</CODE>,
806<KBD>M-DEL</KBD> is bound to the function <CODE>backward-kill-word</CODE>, and
807<KBD>C-o</KBD> is bound to run the macro
808expressed on the right hand side (that is, to insert the text
809<SAMP>`&#62; output'</SAMP> into the line).
810</P><P>
811
812A number of symbolic character names are recognized while
813processing this key binding syntax:
814<VAR>DEL</VAR>,
815<VAR>ESC</VAR>,
816<VAR>ESCAPE</VAR>,
817<VAR>LFD</VAR>,
818<VAR>NEWLINE</VAR>,
819<VAR>RET</VAR>,
820<VAR>RETURN</VAR>,
821<VAR>RUBOUT</VAR>,
822<VAR>SPACE</VAR>,
823<VAR>SPC</VAR>,
824and
825<VAR>TAB</VAR>.
826</P><P>
827
828<DT>"<VAR>keyseq</VAR>": <VAR>function-name</VAR> or <VAR>macro</VAR>
829<DD><VAR>keyseq</VAR> differs from <VAR>keyname</VAR> above in that strings
830denoting an entire key sequence can be specified, by placing
831the key sequence in double quotes. Some GNU Emacs style key
832escapes can be used, as in the following example, but the
833special character names are not recognized.
834<P>
835
836<TABLE><tr><td>&nbsp;</td><td class=example><pre>"\C-u": universal-argument
837"\C-x\C-r": re-read-init-file
838"\e[11~": "Function Key 1"
839</pre></td></tr></table></P><P>
840
841In the above example, <KBD>C-u</KBD> is again bound to the function
842<CODE>universal-argument</CODE> (just as it was in the first example),
843<SAMP>`<KBD>C-x</KBD> <KBD>C-r</KBD>'</SAMP> is bound to the function <CODE>re-read-init-file</CODE>,
844and <SAMP>`<KBD>ESC</KBD> <KBD>[</KBD> <KBD>1</KBD> <KBD>1</KBD> <KBD>~</KBD>'</SAMP> is bound to insert
845the text <SAMP>`Function Key 1'</SAMP>.
846</P><P>
847
848</DL>
849<P>
850
851The following GNU Emacs style escape sequences are available when
852specifying key sequences:
853</P><P>
854
855<DL COMPACT>
856<DT><CODE><KBD>\C-</KBD></CODE>
857<DD>control prefix
858<DT><CODE><KBD>\M-</KBD></CODE>
859<DD>meta prefix
860<DT><CODE><KBD>\e</KBD></CODE>
861<DD>an escape character
862<DT><CODE><KBD>\\</KBD></CODE>
863<DD>backslash
864<DT><CODE><KBD>\"</KBD></CODE>
865<DD><KBD>"</KBD>, a double quotation mark
866<DT><CODE><KBD>\'</KBD></CODE>
867<DD><KBD>'</KBD>, a single quote or apostrophe
868</DL>
869<P>
870
871In addition to the GNU Emacs style escape sequences, a second
872set of backslash escapes is available:
873</P><P>
874
875<DL COMPACT>
876<DT><CODE>\a</CODE>
877<DD>alert (bell)
878<DT><CODE>\b</CODE>
879<DD>backspace
880<DT><CODE>\d</CODE>
881<DD>delete
882<DT><CODE>\f</CODE>
883<DD>form feed
884<DT><CODE>\n</CODE>
885<DD>newline
886<DT><CODE>\r</CODE>
887<DD>carriage return
888<DT><CODE>\t</CODE>
889<DD>horizontal tab
890<DT><CODE>\v</CODE>
891<DD>vertical tab
892<DT><CODE>\<VAR>nnn</VAR></CODE>
893<DD>the eight-bit character whose value is the octal value <VAR>nnn</VAR>
894(one to three digits)
895<DT><CODE>\x<VAR>HH</VAR></CODE>
896<DD>the eight-bit character whose value is the hexadecimal value <VAR>HH</VAR>
897(one or two hex digits)
898</DL>
899<P>
900
901When entering the text of a macro, single or double quotes must
902be used to indicate a macro definition.
903Unquoted text is assumed to be a function name.
904In the macro body, the backslash escapes described above are expanded.
905Backslash will quote any other character in the macro text,
906including <SAMP>`"'</SAMP> and <SAMP>`''</SAMP>.
907For example, the following binding will make <SAMP>`<KBD>C-x</KBD> \'</SAMP>
908insert a single <SAMP>`\'</SAMP> into the line:
909<TABLE><tr><td>&nbsp;</td><td class=example><pre>"\C-x\\": "\\"
910</pre></td></tr></table></P><P>
911
912</DL>
913<P>
914
915<A NAME="Conditional Init Constructs"></A>
916<HR SIZE="6">
917<A NAME="SEC11"></A>
918<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
919<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC10"> &lt; </A>]</TD>
920<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC12"> &gt; </A>]</TD>
921<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC12"> &lt;&lt; </A>]</TD>
922<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> Up </A>]</TD>
923<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> &gt;&gt; </A>]</TD>
924<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
925<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
926<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
927<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
928</TR></TABLE>
929<H3> 1.3.2 Conditional Init Constructs </H3>
930<!--docid::SEC11::-->
931<P>
932
933Readline implements a facility similar in spirit to the conditional
934compilation features of the C preprocessor which allows key
935bindings and variable settings to be performed as the result
936of tests. There are four parser directives used.
937</P><P>
938
939<DL COMPACT>
940<DT><CODE>$if</CODE>
941<DD>The <CODE>$if</CODE> construct allows bindings to be made based on the
942editing mode, the terminal being used, or the application using
943Readline. The text of the test extends to the end of the line;
944no characters are required to isolate it.
945<P>
946
947<DL COMPACT>
948<DT><CODE>mode</CODE>
949<DD>The <CODE>mode=</CODE> form of the <CODE>$if</CODE> directive is used to test
950whether Readline is in <CODE>emacs</CODE> or <CODE>vi</CODE> mode.
951This may be used in conjunction
952with the <SAMP>`set keymap'</SAMP> command, for instance, to set bindings in
953the <CODE>emacs-standard</CODE> and <CODE>emacs-ctlx</CODE> keymaps only if
954Readline is starting out in <CODE>emacs</CODE> mode.
955<P>
956
957<DT><CODE>term</CODE>
958<DD>The <CODE>term=</CODE> form may be used to include terminal-specific
959key bindings, perhaps to bind the key sequences output by the
960terminal's function keys. The word on the right side of the
961<SAMP>`='</SAMP> is tested against both the full name of the terminal and
962the portion of the terminal name before the first <SAMP>`-'</SAMP>. This
963allows <CODE>sun</CODE> to match both <CODE>sun</CODE> and <CODE>sun-cmd</CODE>,
964for instance.
965<P>
966
967<DT><CODE>application</CODE>
968<DD>The <VAR>application</VAR> construct is used to include
969application-specific settings. Each program using the Readline
970library sets the <VAR>application name</VAR>, and you can test for
971a particular value.
972This could be used to bind key sequences to functions useful for
973a specific program. For instance, the following command adds a
974key sequence that quotes the current or previous word in Bash:
975<TABLE><tr><td>&nbsp;</td><td class=example><pre>$if Bash
976# Quote the current or previous word
977"\C-xq": "\eb\"\ef\""
978$endif
979</pre></td></tr></table></DL>
980<P>
981
982<DT><CODE>$endif</CODE>
983<DD>This command, as seen in the previous example, terminates an
984<CODE>$if</CODE> command.
985<P>
986
987<DT><CODE>$else</CODE>
988<DD>Commands in this branch of the <CODE>$if</CODE> directive are executed if
989the test fails.
990<P>
991
992<DT><CODE>$include</CODE>
993<DD>This directive takes a single filename as an argument and reads commands
994and bindings from that file.
995For example, the following directive reads from <TT>`/etc/inputrc'</TT>:
996<TABLE><tr><td>&nbsp;</td><td class=example><pre>$include /etc/inputrc
997</pre></td></tr></table></DL>
998<P>
999
1000<A NAME="Sample Init File"></A>
1001<HR SIZE="6">
1002<A NAME="SEC12"></A>
1003<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1004<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC11"> &lt; </A>]</TD>
1005<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> &gt; </A>]</TD>
1006<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> &lt;&lt; </A>]</TD>
1007<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> Up </A>]</TD>
1008<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> &gt;&gt; </A>]</TD>
1009<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1010<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1011<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1012<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1013</TR></TABLE>
1014<H3> 1.3.3 Sample Init File </H3>
1015<!--docid::SEC12::-->
1016<P>
1017
1018Here is an example of an <VAR>inputrc</VAR> file. This illustrates key
1019binding, variable assignment, and conditional syntax.
1020</P><P>
1021
1022<TABLE><tr><td>&nbsp;</td><td class=example><pre># This file controls the behaviour of line input editing for
1023# programs that use the GNU Readline library. Existing
1024# programs include FTP, Bash, and GDB.
1025#
1026# You can re-read the inputrc file with C-x C-r.
1027# Lines beginning with '#' are comments.
1028#
1029# First, include any systemwide bindings and variable
1030# assignments from /etc/Inputrc
1031$include /etc/Inputrc
1032
1033#
1034# Set various bindings for emacs mode.
1035
1036set editing-mode emacs
1037
1038$if mode=emacs
1039
1040Meta-Control-h: backward-kill-word Text after the function name is ignored
1041
1042#
1043# Arrow keys in keypad mode
1044#
1045#"\M-OD": backward-char
1046#"\M-OC": forward-char
1047#"\M-OA": previous-history
1048#"\M-OB": next-history
1049#
1050# Arrow keys in ANSI mode
1051#
1052"\M-[D": backward-char
1053"\M-[C": forward-char
1054"\M-[A": previous-history
1055"\M-[B": next-history
1056#
1057# Arrow keys in 8 bit keypad mode
1058#
1059#"\M-\C-OD": backward-char
1060#"\M-\C-OC": forward-char
1061#"\M-\C-OA": previous-history
1062#"\M-\C-OB": next-history
1063#
1064# Arrow keys in 8 bit ANSI mode
1065#
1066#"\M-\C-[D": backward-char
1067#"\M-\C-[C": forward-char
1068#"\M-\C-[A": previous-history
1069#"\M-\C-[B": next-history
1070
1071C-q: quoted-insert
1072
1073$endif
1074
1075# An old-style binding. This happens to be the default.
1076TAB: complete
1077
1078# Macros that are convenient for shell interaction
1079$if Bash
1080# edit the path
1081"\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
1082# prepare to type a quoted word --
1083# insert open and close double quotes
1084# and move to just after the open quote
1085"\C-x\"": "\"\"\C-b"
1086# insert a backslash (testing backslash escapes
1087# in sequences and macros)
1088"\C-x\\": "\\"
1089# Quote the current or previous word
1090"\C-xq": "\eb\"\ef\""
1091# Add a binding to refresh the line, which is unbound
1092"\C-xr": redraw-current-line
1093# Edit variable on current line.
1094"\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
1095$endif
1096
1097# use a visible bell if one is available
1098set bell-style visible
1099
1100# don't strip characters to 7 bits when reading
1101set input-meta on
1102
1103# allow iso-latin1 characters to be inserted rather
1104# than converted to prefix-meta sequences
1105set convert-meta off
1106
1107# display characters with the eighth bit set directly
1108# rather than as meta-prefixed characters
1109set output-meta on
1110
1111# if there are more than 150 possible completions for
1112# a word, ask the user if he wants to see all of them
1113set completion-query-items 150
1114
1115# For FTP
1116$if Ftp
1117"\C-xg": "get \M-?"
1118"\C-xt": "put \M-?"
1119"\M-.": yank-last-arg
1120$endif
1121</pre></td></tr></table></P><P>
1122
1123<A NAME="Bindable Readline Commands"></A>
1124<HR SIZE="6">
1125<A NAME="SEC13"></A>
1126<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1127<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC12"> &lt; </A>]</TD>
1128<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC14"> &gt; </A>]</TD>
1129<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &lt;&lt; </A>]</TD>
1130<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC1"> Up </A>]</TD>
1131<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1132<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1133<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1134<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1135<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1136</TR></TABLE>
1137<H2> 1.4 Bindable Readline Commands </H2>
1138<!--docid::SEC13::-->
1139<P>
1140
1141<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
1142<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Moving about the line.</TD></TR>
1143<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Getting at previous lines.</TD></TR>
1144<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Commands for changing text.</TD></TR>
1145<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Commands for killing and yanking.</TD></TR>
1146<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Specifying numeric arguments, repeat counts.</TD></TR>
1147<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Getting Readline to do the typing for you.</TD></TR>
1148<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC20">1.4.7 Keyboard Macros</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Saving and re-executing typed characters</TD></TR>
1149<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Other miscellaneous commands.</TD></TR>
1150</TABLE></BLOCKQUOTE>
1151<P>
1152
1153This section describes Readline commands that may be bound to key
1154sequences.
1155Command names without an accompanying key sequence are unbound by default.
1156</P><P>
1157
1158In the following descriptions, <EM>point</EM> refers to the current cursor
1159position, and <EM>mark</EM> refers to a cursor position saved by the
1160<CODE>set-mark</CODE> command.
1161The text between the point and mark is referred to as the <EM>region</EM>.
1162</P><P>
1163
1164<A NAME="Commands For Moving"></A>
1165<HR SIZE="6">
1166<A NAME="SEC14"></A>
1167<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1168<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> &lt; </A>]</TD>
1169<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC15"> &gt; </A>]</TD>
1170<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &lt;&lt; </A>]</TD>
1171<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1172<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1173<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1174<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1175<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1176<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1177</TR></TABLE>
1178<H3> 1.4.1 Commands For Moving </H3>
1179<!--docid::SEC14::-->
1180<DL COMPACT>
1181<A NAME="IDX27"></A>
1182<DT><CODE>beginning-of-line (C-a)</CODE>
1183<DD><A NAME="IDX28"></A>
1184Move to the start of the current line.
1185<P>
1186
1187<A NAME="IDX29"></A>
1188<DT><CODE>end-of-line (C-e)</CODE>
1189<DD><A NAME="IDX30"></A>
1190Move to the end of the line.
1191<P>
1192
1193<A NAME="IDX31"></A>
1194<DT><CODE>forward-char (C-f)</CODE>
1195<DD><A NAME="IDX32"></A>
1196Move forward a character.
1197<P>
1198
1199<A NAME="IDX33"></A>
1200<DT><CODE>backward-char (C-b)</CODE>
1201<DD><A NAME="IDX34"></A>
1202Move back a character.
1203<P>
1204
1205<A NAME="IDX35"></A>
1206<DT><CODE>forward-word (M-f)</CODE>
1207<DD><A NAME="IDX36"></A>
1208Move forward to the end of the next word. Words are composed of
1209letters and digits.
1210<P>
1211
1212<A NAME="IDX37"></A>
1213<DT><CODE>backward-word (M-b)</CODE>
1214<DD><A NAME="IDX38"></A>
1215Move back to the start of the current or previous word. Words are
1216composed of letters and digits.
1217<P>
1218
1219<A NAME="IDX39"></A>
1220<DT><CODE>clear-screen (C-l)</CODE>
1221<DD><A NAME="IDX40"></A>
1222Clear the screen and redraw the current line,
1223leaving the current line at the top of the screen.
1224<P>
1225
1226<A NAME="IDX41"></A>
1227<DT><CODE>redraw-current-line ()</CODE>
1228<DD><A NAME="IDX42"></A>
1229Refresh the current line. By default, this is unbound.
1230<P>
1231
1232</DL>
1233<P>
1234
1235<A NAME="Commands For History"></A>
1236<HR SIZE="6">
1237<A NAME="SEC15"></A>
1238<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1239<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC14"> &lt; </A>]</TD>
1240<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC16"> &gt; </A>]</TD>
1241<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC16"> &lt;&lt; </A>]</TD>
1242<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1243<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1244<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1245<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1246<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1247<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1248</TR></TABLE>
1249<H3> 1.4.2 Commands For Manipulating The History </H3>
1250<!--docid::SEC15::-->
1251<P>
1252
1253<DL COMPACT>
1254<A NAME="IDX43"></A>
1255<DT><CODE>accept-line (Newline or Return)</CODE>
1256<DD><A NAME="IDX44"></A>
1257Accept the line regardless of where the cursor is.
1258If this line is
1259non-empty, it may be added to the history list for future recall with
1260<CODE>add_history()</CODE>.
1261If this line is a modified history line, the history line is restored
1262to its original state.
1263<P>
1264
1265<A NAME="IDX45"></A>
1266<DT><CODE>previous-history (C-p)</CODE>
1267<DD><A NAME="IDX46"></A>
1268Move `back' through the history list, fetching the previous command.
1269<P>
1270
1271<A NAME="IDX47"></A>
1272<DT><CODE>next-history (C-n)</CODE>
1273<DD><A NAME="IDX48"></A>
1274Move `forward' through the history list, fetching the next command.
1275<P>
1276
1277<A NAME="IDX49"></A>
1278<DT><CODE>beginning-of-history (M-&#60;)</CODE>
1279<DD><A NAME="IDX50"></A>
1280Move to the first line in the history.
1281<P>
1282
1283<A NAME="IDX51"></A>
1284<DT><CODE>end-of-history (M-&#62;)</CODE>
1285<DD><A NAME="IDX52"></A>
1286Move to the end of the input history, i.e., the line currently
1287being entered.
1288<P>
1289
1290<A NAME="IDX53"></A>
1291<DT><CODE>reverse-search-history (C-r)</CODE>
1292<DD><A NAME="IDX54"></A>
1293Search backward starting at the current line and moving `up' through
1294the history as necessary. This is an incremental search.
1295<P>
1296
1297<A NAME="IDX55"></A>
1298<DT><CODE>forward-search-history (C-s)</CODE>
1299<DD><A NAME="IDX56"></A>
1300Search forward starting at the current line and moving `down' through
1301the the history as necessary. This is an incremental search.
1302<P>
1303
1304<A NAME="IDX57"></A>
1305<DT><CODE>non-incremental-reverse-search-history (M-p)</CODE>
1306<DD><A NAME="IDX58"></A>
1307Search backward starting at the current line and moving `up'
1308through the history as necessary using a non-incremental search
1309for a string supplied by the user.
1310<P>
1311
1312<A NAME="IDX59"></A>
1313<DT><CODE>non-incremental-forward-search-history (M-n)</CODE>
1314<DD><A NAME="IDX60"></A>
1315Search forward starting at the current line and moving `down'
1316through the the history as necessary using a non-incremental search
1317for a string supplied by the user.
1318<P>
1319
1320<A NAME="IDX61"></A>
1321<DT><CODE>history-search-forward ()</CODE>
1322<DD><A NAME="IDX62"></A>
1323Search forward through the history for the string of characters
1324between the start of the current line and the point.
1325This is a non-incremental search.
1326By default, this command is unbound.
1327<P>
1328
1329<A NAME="IDX63"></A>
1330<DT><CODE>history-search-backward ()</CODE>
1331<DD><A NAME="IDX64"></A>
1332Search backward through the history for the string of characters
1333between the start of the current line and the point. This
1334is a non-incremental search. By default, this command is unbound.
1335<P>
1336
1337<A NAME="IDX65"></A>
1338<DT><CODE>yank-nth-arg (M-C-y)</CODE>
1339<DD><A NAME="IDX66"></A>
1340Insert the first argument to the previous command (usually
1341the second word on the previous line) at point.
1342With an argument <VAR>n</VAR>,
1343insert the <VAR>n</VAR>th word from the previous command (the words
1344in the previous command begin with word 0). A negative argument
1345inserts the <VAR>n</VAR>th word from the end of the previous command.
1346<P>
1347
1348<A NAME="IDX67"></A>
1349<DT><CODE>yank-last-arg (M-. or M-_)</CODE>
1350<DD><A NAME="IDX68"></A>
1351Insert last argument to the previous command (the last word of the
1352previous history entry). With an
1353argument, behave exactly like <CODE>yank-nth-arg</CODE>.
1354Successive calls to <CODE>yank-last-arg</CODE> move back through the history
1355list, inserting the last argument of each line in turn.
1356<P>
1357
1358</DL>
1359<P>
1360
1361<A NAME="Commands For Text"></A>
1362<HR SIZE="6">
1363<A NAME="SEC16"></A>
1364<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1365<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC15"> &lt; </A>]</TD>
1366<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC17"> &gt; </A>]</TD>
1367<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC17"> &lt;&lt; </A>]</TD>
1368<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1369<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1370<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1371<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1372<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1373<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1374</TR></TABLE>
1375<H3> 1.4.3 Commands For Changing Text </H3>
1376<!--docid::SEC16::-->
1377<P>
1378
1379<DL COMPACT>
1380<A NAME="IDX69"></A>
1381<DT><CODE>delete-char (C-d)</CODE>
1382<DD><A NAME="IDX70"></A>
1383Delete the character at point. If point is at the
1384beginning of the line, there are no characters in the line, and
1385the last character typed was not bound to <CODE>delete-char</CODE>, then
1386return EOF.
1387<P>
1388
1389<A NAME="IDX71"></A>
1390<DT><CODE>backward-delete-char (Rubout)</CODE>
1391<DD><A NAME="IDX72"></A>
1392Delete the character behind the cursor. A numeric argument means
1393to kill the characters instead of deleting them.
1394<P>
1395
1396<A NAME="IDX73"></A>
1397<DT><CODE>forward-backward-delete-char ()</CODE>
1398<DD><A NAME="IDX74"></A>
1399Delete the character under the cursor, unless the cursor is at the
1400end of the line, in which case the character behind the cursor is
1401deleted. By default, this is not bound to a key.
1402<P>
1403
1404<A NAME="IDX75"></A>
1405<DT><CODE>quoted-insert (C-q or C-v)</CODE>
1406<DD><A NAME="IDX76"></A>
1407Add the next character typed to the line verbatim. This is
1408how to insert key sequences like <KBD>C-q</KBD>, for example.
1409<P>
1410
1411<A NAME="IDX77"></A>
1412<DT><CODE>tab-insert (M-<KBD>TAB</KBD>)</CODE>
1413<DD><A NAME="IDX78"></A>
1414Insert a tab character.
1415<P>
1416
1417<A NAME="IDX79"></A>
1418<DT><CODE>self-insert (a, b, A, 1, !, <small>...</small>)</CODE>
1419<DD><A NAME="IDX80"></A>
1420Insert yourself.
1421<P>
1422
1423<A NAME="IDX81"></A>
1424<DT><CODE>transpose-chars (C-t)</CODE>
1425<DD><A NAME="IDX82"></A>
1426Drag the character before the cursor forward over
1427the character at the cursor, moving the
1428cursor forward as well. If the insertion point
1429is at the end of the line, then this
1430transposes the last two characters of the line.
1431Negative arguments have no effect.
1432<P>
1433
1434<A NAME="IDX83"></A>
1435<DT><CODE>transpose-words (M-t)</CODE>
1436<DD><A NAME="IDX84"></A>
1437Drag the word before point past the word after point,
1438moving point past that word as well.
1439If the insertion point is at the end of the line, this transposes
1440the last two words on the line.
1441<P>
1442
1443<A NAME="IDX85"></A>
1444<DT><CODE>upcase-word (M-u)</CODE>
1445<DD><A NAME="IDX86"></A>
1446Uppercase the current (or following) word. With a negative argument,
1447uppercase the previous word, but do not move the cursor.
1448<P>
1449
1450<A NAME="IDX87"></A>
1451<DT><CODE>downcase-word (M-l)</CODE>
1452<DD><A NAME="IDX88"></A>
1453Lowercase the current (or following) word. With a negative argument,
1454lowercase the previous word, but do not move the cursor.
1455<P>
1456
1457<A NAME="IDX89"></A>
1458<DT><CODE>capitalize-word (M-c)</CODE>
1459<DD><A NAME="IDX90"></A>
1460Capitalize the current (or following) word. With a negative argument,
1461capitalize the previous word, but do not move the cursor.
1462<P>
1463
1464<A NAME="IDX91"></A>
1465<DT><CODE>overwrite-mode ()</CODE>
1466<DD><A NAME="IDX92"></A>
1467Toggle overwrite mode. With an explicit positive numeric argument,
1468switches to overwrite mode. With an explicit non-positive numeric
1469argument, switches to insert mode. This command affects only
1470<CODE>emacs</CODE> mode; <CODE>vi</CODE> mode does overwrite differently.
1471Each call to <CODE>readline()</CODE> starts in insert mode.
1472<P>
1473
1474In overwrite mode, characters bound to <CODE>self-insert</CODE> replace
1475the text at point rather than pushing the text to the right.
1476Characters bound to <CODE>backward-delete-char</CODE> replace the character
1477before point with a space.
1478</P><P>
1479
1480By default, this command is unbound.
1481</P><P>
1482
1483</DL>
1484<P>
1485
1486<A NAME="Commands For Killing"></A>
1487<HR SIZE="6">
1488<A NAME="SEC17"></A>
1489<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1490<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC16"> &lt; </A>]</TD>
1491<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC18"> &gt; </A>]</TD>
1492<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC18"> &lt;&lt; </A>]</TD>
1493<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1494<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1495<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1496<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1497<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1498<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1499</TR></TABLE>
1500<H3> 1.4.4 Killing And Yanking </H3>
1501<!--docid::SEC17::-->
1502<P>
1503
1504<DL COMPACT>
1505
1506<A NAME="IDX93"></A>
1507<DT><CODE>kill-line (C-k)</CODE>
1508<DD><A NAME="IDX94"></A>
1509Kill the text from point to the end of the line.
1510<P>
1511
1512<A NAME="IDX95"></A>
1513<DT><CODE>backward-kill-line (C-x Rubout)</CODE>
1514<DD><A NAME="IDX96"></A>
1515Kill backward to the beginning of the line.
1516<P>
1517
1518<A NAME="IDX97"></A>
1519<DT><CODE>unix-line-discard (C-u)</CODE>
1520<DD><A NAME="IDX98"></A>
1521Kill backward from the cursor to the beginning of the current line.
1522<P>
1523
1524<A NAME="IDX99"></A>
1525<DT><CODE>kill-whole-line ()</CODE>
1526<DD><A NAME="IDX100"></A>
1527Kill all characters on the current line, no matter where point is.
1528By default, this is unbound.
1529<P>
1530
1531<A NAME="IDX101"></A>
1532<DT><CODE>kill-word (M-d)</CODE>
1533<DD><A NAME="IDX102"></A>
1534Kill from point to the end of the current word, or if between
1535words, to the end of the next word.
1536Word boundaries are the same as <CODE>forward-word</CODE>.
1537<P>
1538
1539<A NAME="IDX103"></A>
1540<DT><CODE>backward-kill-word (M-<KBD>DEL</KBD>)</CODE>
1541<DD><A NAME="IDX104"></A>
1542Kill the word behind point.
1543Word boundaries are the same as <CODE>backward-word</CODE>.
1544<P>
1545
1546<A NAME="IDX105"></A>
1547<DT><CODE>unix-word-rubout (C-w)</CODE>
1548<DD><A NAME="IDX106"></A>
1549Kill the word behind point, using white space as a word boundary.
1550The killed text is saved on the kill-ring.
1551<P>
1552
1553<A NAME="IDX107"></A>
1554<DT><CODE>unix-filename-rubout ()</CODE>
1555<DD><A NAME="IDX108"></A>
1556Kill the word behind point, using white space and the slash character
1557as the word boundaries.
1558The killed text is saved on the kill-ring.
1559<P>
1560
1561<A NAME="IDX109"></A>
1562<DT><CODE>delete-horizontal-space ()</CODE>
1563<DD><A NAME="IDX110"></A>
1564Delete all spaces and tabs around point. By default, this is unbound.
1565<P>
1566
1567<A NAME="IDX111"></A>
1568<DT><CODE>kill-region ()</CODE>
1569<DD><A NAME="IDX112"></A>
1570Kill the text in the current region.
1571By default, this command is unbound.
1572<P>
1573
1574<A NAME="IDX113"></A>
1575<DT><CODE>copy-region-as-kill ()</CODE>
1576<DD><A NAME="IDX114"></A>
1577Copy the text in the region to the kill buffer, so it can be yanked
1578right away. By default, this command is unbound.
1579<P>
1580
1581<A NAME="IDX115"></A>
1582<DT><CODE>copy-backward-word ()</CODE>
1583<DD><A NAME="IDX116"></A>
1584Copy the word before point to the kill buffer.
1585The word boundaries are the same as <CODE>backward-word</CODE>.
1586By default, this command is unbound.
1587<P>
1588
1589<A NAME="IDX117"></A>
1590<DT><CODE>copy-forward-word ()</CODE>
1591<DD><A NAME="IDX118"></A>
1592Copy the word following point to the kill buffer.
1593The word boundaries are the same as <CODE>forward-word</CODE>.
1594By default, this command is unbound.
1595<P>
1596
1597<A NAME="IDX119"></A>
1598<DT><CODE>yank (C-y)</CODE>
1599<DD><A NAME="IDX120"></A>
1600Yank the top of the kill ring into the buffer at point.
1601<P>
1602
1603<A NAME="IDX121"></A>
1604<DT><CODE>yank-pop (M-y)</CODE>
1605<DD><A NAME="IDX122"></A>
1606Rotate the kill-ring, and yank the new top. You can only do this if
1607the prior command is <CODE>yank</CODE> or <CODE>yank-pop</CODE>.
1608</DL>
1609<P>
1610
1611<A NAME="Numeric Arguments"></A>
1612<HR SIZE="6">
1613<A NAME="SEC18"></A>
1614<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1615<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC17"> &lt; </A>]</TD>
1616<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC19"> &gt; </A>]</TD>
1617<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC19"> &lt;&lt; </A>]</TD>
1618<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1619<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1620<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1621<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1622<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1623<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1624</TR></TABLE>
1625<H3> 1.4.5 Specifying Numeric Arguments </H3>
1626<!--docid::SEC18::-->
1627<DL COMPACT>
1628
1629<A NAME="IDX123"></A>
1630<DT><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, <small>...</small> <KBD>M--</KBD>)</CODE>
1631<DD><A NAME="IDX124"></A>
1632Add this digit to the argument already accumulating, or start a new
1633argument. <KBD>M--</KBD> starts a negative argument.
1634<P>
1635
1636<A NAME="IDX125"></A>
1637<DT><CODE>universal-argument ()</CODE>
1638<DD><A NAME="IDX126"></A>
1639This is another way to specify an argument.
1640If this command is followed by one or more digits, optionally with a
1641leading minus sign, those digits define the argument.
1642If the command is followed by digits, executing <CODE>universal-argument</CODE>
1643again ends the numeric argument, but is otherwise ignored.
1644As a special case, if this command is immediately followed by a
1645character that is neither a digit or minus sign, the argument count
1646for the next command is multiplied by four.
1647The argument count is initially one, so executing this function the
1648first time makes the argument count four, a second time makes the
1649argument count sixteen, and so on.
1650By default, this is not bound to a key.
1651</DL>
1652<P>
1653
1654<A NAME="Commands For Completion"></A>
1655<HR SIZE="6">
1656<A NAME="SEC19"></A>
1657<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1658<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC18"> &lt; </A>]</TD>
1659<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC20"> &gt; </A>]</TD>
1660<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC20"> &lt;&lt; </A>]</TD>
1661<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1662<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1663<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1664<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1665<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1666<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1667</TR></TABLE>
1668<H3> 1.4.6 Letting Readline Type For You </H3>
1669<!--docid::SEC19::-->
1670<P>
1671
1672<DL COMPACT>
1673<A NAME="IDX127"></A>
1674<DT><CODE>complete (<KBD>TAB</KBD>)</CODE>
1675<DD><A NAME="IDX128"></A>
1676Attempt to perform completion on the text before point.
1677The actual completion performed is application-specific.
1678The default is filename completion.
1679<P>
1680
1681<A NAME="IDX129"></A>
1682<DT><CODE>possible-completions (M-?)</CODE>
1683<DD><A NAME="IDX130"></A>
1684List the possible completions of the text before point.
1685<P>
1686
1687<A NAME="IDX131"></A>
1688<DT><CODE>insert-completions (M-*)</CODE>
1689<DD><A NAME="IDX132"></A>
1690Insert all completions of the text before point that would have
1691been generated by <CODE>possible-completions</CODE>.
1692<P>
1693
1694<A NAME="IDX133"></A>
1695<DT><CODE>menu-complete ()</CODE>
1696<DD><A NAME="IDX134"></A>
1697Similar to <CODE>complete</CODE>, but replaces the word to be completed
1698with a single match from the list of possible completions.
1699Repeated execution of <CODE>menu-complete</CODE> steps through the list
1700of possible completions, inserting each match in turn.
1701At the end of the list of completions, the bell is rung
1702(subject to the setting of <CODE>bell-style</CODE>)
1703and the original text is restored.
1704An argument of <VAR>n</VAR> moves <VAR>n</VAR> positions forward in the list
1705of matches; a negative argument may be used to move backward
1706through the list.
1707This command is intended to be bound to <KBD>TAB</KBD>, but is unbound
1708by default.
1709<P>
1710
1711<A NAME="IDX135"></A>
1712<DT><CODE>delete-char-or-list ()</CODE>
1713<DD><A NAME="IDX136"></A>
1714Deletes the character under the cursor if not at the beginning or
1715end of the line (like <CODE>delete-char</CODE>).
1716If at the end of the line, behaves identically to
1717<CODE>possible-completions</CODE>.
1718This command is unbound by default.
1719<P>
1720
1721</DL>
1722<P>
1723
1724<A NAME="Keyboard Macros"></A>
1725<HR SIZE="6">
1726<A NAME="SEC20"></A>
1727<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1728<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC19"> &lt; </A>]</TD>
1729<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC21"> &gt; </A>]</TD>
1730<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC21"> &lt;&lt; </A>]</TD>
1731<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1732<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1733<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1734<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1735<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1736<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1737</TR></TABLE>
1738<H3> 1.4.7 Keyboard Macros </H3>
1739<!--docid::SEC20::-->
1740<DL COMPACT>
1741
1742<A NAME="IDX137"></A>
1743<DT><CODE>start-kbd-macro (C-x ()</CODE>
1744<DD><A NAME="IDX138"></A>
1745Begin saving the characters typed into the current keyboard macro.
1746<P>
1747
1748<A NAME="IDX139"></A>
1749<DT><CODE>end-kbd-macro (C-x ))</CODE>
1750<DD><A NAME="IDX140"></A>
1751Stop saving the characters typed into the current keyboard macro
1752and save the definition.
1753<P>
1754
1755<A NAME="IDX141"></A>
1756<DT><CODE>call-last-kbd-macro (C-x e)</CODE>
1757<DD><A NAME="IDX142"></A>
1758Re-execute the last keyboard macro defined, by making the characters
1759in the macro appear as if typed at the keyboard.
1760<P>
1761
1762</DL>
1763<P>
1764
1765<A NAME="Miscellaneous Commands"></A>
1766<HR SIZE="6">
1767<A NAME="SEC21"></A>
1768<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1769<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC20"> &lt; </A>]</TD>
1770<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt; </A>]</TD>
1771<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &lt;&lt; </A>]</TD>
1772<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1773<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1774<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1775<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1776<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1777<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1778</TR></TABLE>
1779<H3> 1.4.8 Some Miscellaneous Commands </H3>
1780<!--docid::SEC21::-->
1781<DL COMPACT>
1782
1783<A NAME="IDX143"></A>
1784<DT><CODE>re-read-init-file (C-x C-r)</CODE>
1785<DD><A NAME="IDX144"></A>
1786Read in the contents of the <VAR>inputrc</VAR> file, and incorporate
1787any bindings or variable assignments found there.
1788<P>
1789
1790<A NAME="IDX145"></A>
1791<DT><CODE>abort (C-g)</CODE>
1792<DD><A NAME="IDX146"></A>
1793Abort the current editing command and
1794ring the terminal's bell (subject to the setting of
1795<CODE>bell-style</CODE>).
1796<P>
1797
1798<A NAME="IDX147"></A>
1799<DT><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, <small>...</small>)</CODE>
1800<DD><A NAME="IDX148"></A>
1801If the metafied character <VAR>x</VAR> is lowercase, run the command
1802that is bound to the corresponding uppercase character.
1803<P>
1804
1805<A NAME="IDX149"></A>
1806<DT><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE>
1807<DD><A NAME="IDX150"></A>
1808Metafy the next character typed. This is for keyboards
1809without a meta key. Typing <SAMP>`<KBD>ESC</KBD> f'</SAMP> is equivalent to typing
1810<KBD>M-f</KBD>.
1811<P>
1812
1813<A NAME="IDX151"></A>
1814<DT><CODE>undo (C-_ or C-x C-u)</CODE>
1815<DD><A NAME="IDX152"></A>
1816Incremental undo, separately remembered for each line.
1817<P>
1818
1819<A NAME="IDX153"></A>
1820<DT><CODE>revert-line (M-r)</CODE>
1821<DD><A NAME="IDX154"></A>
1822Undo all changes made to this line. This is like executing the <CODE>undo</CODE>
1823command enough times to get back to the beginning.
1824<P>
1825
1826<A NAME="IDX155"></A>
1827<DT><CODE>tilde-expand (M-~)</CODE>
1828<DD><A NAME="IDX156"></A>
1829Perform tilde expansion on the current word.
1830<P>
1831
1832<A NAME="IDX157"></A>
1833<DT><CODE>set-mark (C-@)</CODE>
1834<DD><A NAME="IDX158"></A>
1835Set the mark to the point. If a
1836numeric argument is supplied, the mark is set to that position.
1837<P>
1838
1839<A NAME="IDX159"></A>
1840<DT><CODE>exchange-point-and-mark (C-x C-x)</CODE>
1841<DD><A NAME="IDX160"></A>
1842Swap the point with the mark. The current cursor position is set to
1843the saved position, and the old cursor position is saved as the mark.
1844<P>
1845
1846<A NAME="IDX161"></A>
1847<DT><CODE>character-search (C-])</CODE>
1848<DD><A NAME="IDX162"></A>
1849A character is read and point is moved to the next occurrence of that
1850character. A negative count searches for previous occurrences.
1851<P>
1852
1853<A NAME="IDX163"></A>
1854<DT><CODE>character-search-backward (M-C-])</CODE>
1855<DD><A NAME="IDX164"></A>
1856A character is read and point is moved to the previous occurrence
1857of that character. A negative count searches for subsequent
1858occurrences.
1859<P>
1860
1861<A NAME="IDX165"></A>
1862<DT><CODE>insert-comment (M-#)</CODE>
1863<DD><A NAME="IDX166"></A>
1864Without a numeric argument, the value of the <CODE>comment-begin</CODE>
1865variable is inserted at the beginning of the current line.
1866If a numeric argument is supplied, this command acts as a toggle: if
1867the characters at the beginning of the line do not match the value
1868of <CODE>comment-begin</CODE>, the value is inserted, otherwise
1869the characters in <CODE>comment-begin</CODE> are deleted from the beginning of
1870the line.
1871In either case, the line is accepted as if a newline had been typed.
1872<P>
1873
1874<A NAME="IDX167"></A>
1875<DT><CODE>dump-functions ()</CODE>
1876<DD><A NAME="IDX168"></A>
1877Print all of the functions and their key bindings to the
1878Readline output stream. If a numeric argument is supplied,
1879the output is formatted in such a way that it can be made part
1880of an <VAR>inputrc</VAR> file. This command is unbound by default.
1881<P>
1882
1883<A NAME="IDX169"></A>
1884<DT><CODE>dump-variables ()</CODE>
1885<DD><A NAME="IDX170"></A>
1886Print all of the settable variables and their values to the
1887Readline output stream. If a numeric argument is supplied,
1888the output is formatted in such a way that it can be made part
1889of an <VAR>inputrc</VAR> file. This command is unbound by default.
1890<P>
1891
1892<A NAME="IDX171"></A>
1893<DT><CODE>dump-macros ()</CODE>
1894<DD><A NAME="IDX172"></A>
1895Print all of the Readline key sequences bound to macros and the
1896strings they output. If a numeric argument is supplied,
1897the output is formatted in such a way that it can be made part
1898of an <VAR>inputrc</VAR> file. This command is unbound by default.
1899<P>
1900
1901<A NAME="IDX173"></A>
1902<DT><CODE>emacs-editing-mode (C-e)</CODE>
1903<DD><A NAME="IDX174"></A>
1904When in <CODE>vi</CODE> command mode, this causes a switch to <CODE>emacs</CODE>
1905editing mode.
1906<P>
1907
1908<A NAME="IDX175"></A>
1909<DT><CODE>vi-editing-mode (M-C-j)</CODE>
1910<DD><A NAME="IDX176"></A>
1911When in <CODE>emacs</CODE> editing mode, this causes a switch to <CODE>vi</CODE>
1912editing mode.
1913<P>
1914
1915</DL>
1916<P>
1917
1918<A NAME="Readline vi Mode"></A>
1919<HR SIZE="6">
1920<A NAME="SEC22"></A>
1921<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1922<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC21"> &lt; </A>]</TD>
1923<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> &gt; </A>]</TD>
1924<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
1925<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC1"> Up </A>]</TD>
1926<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> &gt;&gt; </A>]</TD>
1927<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1928<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1929<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1930<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1931</TR></TABLE>
1932<H2> 1.5 Readline vi Mode </H2>
1933<!--docid::SEC22::-->
1934<P>
1935
1936While the Readline library does not have a full set of <CODE>vi</CODE>
1937editing functions, it does contain enough to allow simple editing
1938of the line. The Readline <CODE>vi</CODE> mode behaves as specified in
1939the POSIX 1003.2 standard.
1940</P><P>
1941
1942In order to switch interactively between <CODE>emacs</CODE> and <CODE>vi</CODE>
1943editing modes, use the command <KBD>M-C-j</KBD> (bound to emacs-editing-mode
1944when in <CODE>vi</CODE> mode and to vi-editing-mode in <CODE>emacs</CODE> mode).
1945The Readline default is <CODE>emacs</CODE> mode.
1946</P><P>
1947
1948When you enter a line in <CODE>vi</CODE> mode, you are already placed in
1949`insertion' mode, as if you had typed an <SAMP>`i'</SAMP>. Pressing <KBD>ESC</KBD>
1950switches you into `command' mode, where you can edit the text of the
1951line with the standard <CODE>vi</CODE> movement keys, move to previous
1952history lines with <SAMP>`k'</SAMP> and subsequent lines with <SAMP>`j'</SAMP>, and
1953so forth.
1954</P><P>
1955
1956This document describes the GNU Readline Library, a utility for aiding
1957in the consitency of user interface across discrete programs that need
1958to provide a command line interface.
1959</P><P>
1960
1961Copyright (C) 1988-2004 Free Software Foundation, Inc.
1962</P><P>
1963
1964Permission is granted to make and distribute verbatim copies of
1965this manual provided the copyright notice and this permission notice
1966pare preserved on all copies.
1967</P><P>
1968
1969Permission is granted to copy and distribute modified versions of this
1970manual under the conditions for verbatim copying, provided that the entire
1971resulting derived work is distributed under the terms of a permission
1972notice identical to this one.
1973</P><P>
1974
1975Permission is granted to copy and distribute translations of this manual
1976into another language, under the above conditions for modified versions,
1977except that this permission notice may be stated in a translation approved
1978by the Foundation.
1979</P><P>
1980
1981<A NAME="Programming with GNU Readline"></A>
1982<HR SIZE="6">
1983<A NAME="SEC23"></A>
1984<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1985<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &lt; </A>]</TD>
1986<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC24"> &gt; </A>]</TD>
1987<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
1988<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> Up </A>]</TD>
1989<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
1990<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1991<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1992<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1993<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1994</TR></TABLE>
1995<H1> 2. Programming with GNU Readline </H1>
1996<!--docid::SEC23::-->
1997<P>
1998
1999This chapter describes the interface between the GNU Readline Library and
2000other programs. If you are a programmer, and you wish to include the
2001features found in GNU Readline
2002such as completion, line editing, and interactive history manipulation
2003in your own programs, this section is for you.
2004</P><P>
2005
2006<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
2007<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC24">2.1 Basic Behavior</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Using the default behavior of Readline.</TD></TR>
2008<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC25">2.2 Custom Functions</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Adding your own functions to Readline.</TD></TR>
2009<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables accessible to custom
2010 functions.</TD></TR>
2011<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC29">2.4 Readline Convenience Functions</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Functions which Readline supplies to
2012 aid in writing your own custom
2013 functions.</TD></TR>
2014<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC43">2.5 Readline Signal Handling</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How Readline behaves when it receives signals.</TD></TR>
2015<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC44">2.6 Custom Completers</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Supplanting or supplementing Readline's
2016 completion functions.</TD></TR>
2017</TABLE></BLOCKQUOTE>
2018<P>
2019
2020<A NAME="Basic Behavior"></A>
2021<HR SIZE="6">
2022<A NAME="SEC24"></A>
2023<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2024<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> &lt; </A>]</TD>
2025<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC25"> &gt; </A>]</TD>
2026<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
2027<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
2028<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
2029<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2030<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2031<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2032<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2033</TR></TABLE>
2034<H2> 2.1 Basic Behavior </H2>
2035<!--docid::SEC24::-->
2036<P>
2037
2038Many programs provide a command line interface, such as <CODE>mail</CODE>,
2039<CODE>ftp</CODE>, and <CODE>sh</CODE>. For such programs, the default behaviour of
2040Readline is sufficient. This section describes how to use Readline in
2041the simplest way possible, perhaps to replace calls in your code to
2042<CODE>gets()</CODE> or <CODE>fgets()</CODE>.
2043</P><P>
2044
2045<A NAME="IDX177"></A>
2046<A NAME="IDX178"></A>
2047</P><P>
2048
2049The function <CODE>readline()</CODE> prints a prompt <VAR>prompt</VAR>
2050and then reads and returns a single line of text from the user.
2051If <VAR>prompt</VAR> is <CODE>NULL</CODE> or the empty string, no prompt is displayed.
2052The line <CODE>readline</CODE> returns is allocated with <CODE>malloc()</CODE>;
2053the caller should <CODE>free()</CODE> the line when it has finished with it.
2054The declaration for <CODE>readline</CODE> in ANSI C is
2055</P><P>
2056
2057<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>char *readline (const char *<VAR>prompt</VAR>);</CODE>
2058</pre></td></tr></table></P><P>
2059
2060So, one might say
2061<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>char *line = readline ("Enter a line: ");</CODE>
2062</pre></td></tr></table>in order to read a line of text from the user.
2063The line returned has the final newline removed, so only the
2064text remains.
2065</P><P>
2066
2067If <CODE>readline</CODE> encounters an <CODE>EOF</CODE> while reading the line, and the
2068line is empty at that point, then <CODE>(char *)NULL</CODE> is returned.
2069Otherwise, the line is ended just as if a newline had been typed.
2070</P><P>
2071
2072If you want the user to be able to get at the line later, (with
2073<KBD>C-p</KBD> for example), you must call <CODE>add_history()</CODE> to save the
2074line away in a <EM>history</EM> list of such lines.
2075</P><P>
2076
2077<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>add_history (line)</CODE>;
2078</pre></td></tr></table></P><P>
2079
2080For full details on the GNU History Library, see the associated manual.
2081</P><P>
2082
2083It is preferable to avoid saving empty lines on the history list, since
2084users rarely have a burning need to reuse a blank line. Here is
2085a function which usefully replaces the standard <CODE>gets()</CODE> library
2086function, and has the advantage of no static buffer to overflow:
2087</P><P>
2088
2089<TABLE><tr><td>&nbsp;</td><td class=example><pre>/* A static variable for holding the line. */
2090static char *line_read = (char *)NULL;
2091
2092/* Read a string, and return a pointer to it.
2093 Returns NULL on EOF. */
2094char *
2095rl_gets ()
2096{
2097 /* If the buffer has already been allocated,
2098 return the memory to the free pool. */
2099 if (line_read)
2100 {
2101 free (line_read);
2102 line_read = (char *)NULL;
2103 }
2104
2105 /* Get a line from the user. */
2106 line_read = readline ("");
2107
2108 /* If the line has any text in it,
2109 save it on the history. */
2110 if (line_read &#38;&#38; *line_read)
2111 add_history (line_read);
2112
2113 return (line_read);
2114}
2115</pre></td></tr></table></P><P>
2116
2117This function gives the user the default behaviour of <KBD>TAB</KBD>
2118completion: completion on file names. If you do not want Readline to
2119complete on filenames, you can change the binding of the <KBD>TAB</KBD> key
2120with <CODE>rl_bind_key()</CODE>.
2121</P><P>
2122
2123<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>int rl_bind_key (int <VAR>key</VAR>, rl_command_func_t *<VAR>function</VAR>);</CODE>
2124</pre></td></tr></table></P><P>
2125
2126<CODE>rl_bind_key()</CODE> takes two arguments: <VAR>key</VAR> is the character that
2127you want to bind, and <VAR>function</VAR> is the address of the function to
2128call when <VAR>key</VAR> is pressed. Binding <KBD>TAB</KBD> to <CODE>rl_insert()</CODE>
2129makes <KBD>TAB</KBD> insert itself.
2130<CODE>rl_bind_key()</CODE> returns non-zero if <VAR>key</VAR> is not a valid
2131ASCII character code (between 0 and 255).
2132</P><P>
2133
2134Thus, to disable the default <KBD>TAB</KBD> behavior, the following suffices:
2135<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>rl_bind_key ('\t', rl_insert);</CODE>
2136</pre></td></tr></table></P><P>
2137
2138This code should be executed once at the start of your program; you
2139might write a function called <CODE>initialize_readline()</CODE> which
2140performs this and other desired initializations, such as installing
2141custom completers (see section <A HREF="readline.html#SEC44">2.6 Custom Completers</A>).
2142</P><P>
2143
2144<A NAME="Custom Functions"></A>
2145<HR SIZE="6">
2146<A NAME="SEC25"></A>
2147<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2148<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC24"> &lt; </A>]</TD>
2149<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC26"> &gt; </A>]</TD>
2150<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &lt;&lt; </A>]</TD>
2151<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
2152<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &gt;&gt; </A>]</TD>
2153<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2154<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2155<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2156<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2157</TR></TABLE>
2158<H2> 2.2 Custom Functions </H2>
2159<!--docid::SEC25::-->
2160<P>
2161
2162Readline provides many functions for manipulating the text of
2163the line, but it isn't possible to anticipate the needs of all
2164programs. This section describes the various functions and variables
2165defined within the Readline library which allow a user program to add
2166customized functionality to Readline.
2167</P><P>
2168
2169Before declaring any functions that customize Readline's behavior, or
2170using any functionality Readline provides in other code, an
2171application writer should include the file <CODE>&#60;readline/readline.h&#62;</CODE>
2172in any file that uses Readline's features. Since some of the definitions
2173in <CODE>readline.h</CODE> use the <CODE>stdio</CODE> library, the file
2174<CODE>&#60;stdio.h&#62;</CODE> should be included before <CODE>readline.h</CODE>.
2175</P><P>
2176
2177<CODE>readline.h</CODE> defines a C preprocessor variable that should
2178be treated as an integer, <CODE>RL_READLINE_VERSION</CODE>, which may
2179be used to conditionally compile application code depending on
2180the installed Readline version. The value is a hexadecimal
2181encoding of the major and minor version numbers of the library,
2182of the form 0x<VAR>MMmm</VAR>. <VAR>MM</VAR> is the two-digit major
2183version number; <VAR>mm</VAR> is the two-digit minor version number.
2184For Readline 4.2, for example, the value of
2185<CODE>RL_READLINE_VERSION</CODE> would be <CODE>0x0402</CODE>.
2186</P><P>
2187
2188<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
2189<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC26">2.2.1 Readline Typedefs</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">C declarations to make code readable.</TD></TR>
2190<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC27">2.2.2 Writing a New Function</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables and calling conventions.</TD></TR>
2191</TABLE></BLOCKQUOTE>
2192<P>
2193
2194<A NAME="Readline Typedefs"></A>
2195<HR SIZE="6">
2196<A NAME="SEC26"></A>
2197<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2198<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC25"> &lt; </A>]</TD>
2199<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC27"> &gt; </A>]</TD>
2200<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &lt;&lt; </A>]</TD>
2201<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC25"> Up </A>]</TD>
2202<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &gt;&gt; </A>]</TD>
2203<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2204<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2205<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2206<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2207</TR></TABLE>
2208<H3> 2.2.1 Readline Typedefs </H3>
2209<!--docid::SEC26::-->
2210<P>
2211
2212For readabilty, we declare a number of new object types, all pointers
2213to functions.
2214</P><P>
2215
2216The reason for declaring these new types is to make it easier to write
2217code describing pointers to C functions with appropriately prototyped
2218arguments and return values.
2219</P><P>
2220
2221For instance, say we want to declare a variable <VAR>func</VAR> as a pointer
2222to a function which takes two <CODE>int</CODE> arguments and returns an
2223<CODE>int</CODE> (this is the type of all of the Readline bindable functions).
2224Instead of the classic C declaration
2225</P><P>
2226
2227<CODE>int (*func)();</CODE>
2228</P><P>
2229
2230or the ANSI-C style declaration
2231</P><P>
2232
2233<CODE>int (*func)(int, int);</CODE>
2234</P><P>
2235
2236we may write
2237</P><P>
2238
2239<CODE>rl_command_func_t *func;</CODE>
2240</P><P>
2241
2242The full list of function pointer types available is
2243</P><P>
2244
2245<DL COMPACT>
2246<DT><CODE>typedef int rl_command_func_t (int, int);</CODE>
2247<DD><P>
2248
2249<DT><CODE>typedef char *rl_compentry_func_t (const char *, int);</CODE>
2250<DD><P>
2251
2252<DT><CODE>typedef char **rl_completion_func_t (const char *, int, int);</CODE>
2253<DD><P>
2254
2255<DT><CODE>typedef char *rl_quote_func_t (char *, int, char *);</CODE>
2256<DD><P>
2257
2258<DT><CODE>typedef char *rl_dequote_func_t (char *, int);</CODE>
2259<DD><P>
2260
2261<DT><CODE>typedef int rl_compignore_func_t (char **);</CODE>
2262<DD><P>
2263
2264<DT><CODE>typedef void rl_compdisp_func_t (char **, int, int);</CODE>
2265<DD><P>
2266
2267<DT><CODE>typedef int rl_hook_func_t (void);</CODE>
2268<DD><P>
2269
2270<DT><CODE>typedef int rl_getc_func_t (FILE *);</CODE>
2271<DD><P>
2272
2273<DT><CODE>typedef int rl_linebuf_func_t (char *, int);</CODE>
2274<DD><P>
2275
2276<DT><CODE>typedef int rl_intfunc_t (int);</CODE>
2277<DD><DT><CODE>#define rl_ivoidfunc_t rl_hook_func_t</CODE>
2278<DD><DT><CODE>typedef int rl_icpfunc_t (char *);</CODE>
2279<DD><DT><CODE>typedef int rl_icppfunc_t (char **);</CODE>
2280<DD><P>
2281
2282<DT><CODE>typedef void rl_voidfunc_t (void);</CODE>
2283<DD><DT><CODE>typedef void rl_vintfunc_t (int);</CODE>
2284<DD><DT><CODE>typedef void rl_vcpfunc_t (char *);</CODE>
2285<DD><DT><CODE>typedef void rl_vcppfunc_t (char **);</CODE>
2286<DD><P>
2287
2288</DL>
2289<P>
2290
2291<A NAME="Function Writing"></A>
2292<HR SIZE="6">
2293<A NAME="SEC27"></A>
2294<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2295<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC26"> &lt; </A>]</TD>
2296<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &gt; </A>]</TD>
2297<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &lt;&lt; </A>]</TD>
2298<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC25"> Up </A>]</TD>
2299<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &gt;&gt; </A>]</TD>
2300<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2301<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2302<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2303<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2304</TR></TABLE>
2305<H3> 2.2.2 Writing a New Function </H3>
2306<!--docid::SEC27::-->
2307<P>
2308
2309In order to write new functions for Readline, you need to know the
2310calling conventions for keyboard-invoked functions, and the names of the
2311variables that describe the current state of the line read so far.
2312</P><P>
2313
2314The calling sequence for a command <CODE>foo</CODE> looks like
2315</P><P>
2316
2317<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>int foo (int count, int key)</CODE>
2318</pre></td></tr></table></P><P>
2319
2320where <VAR>count</VAR> is the numeric argument (or 1 if defaulted) and
2321<VAR>key</VAR> is the key that invoked this function.
2322</P><P>
2323
2324It is completely up to the function as to what should be done with the
2325numeric argument. Some functions use it as a repeat count, some
2326as a flag, and others to choose alternate behavior (refreshing the current
2327line as opposed to refreshing the screen, for example). Some choose to
2328ignore it. In general, if a
2329function uses the numeric argument as a repeat count, it should be able
2330to do something useful with both negative and positive arguments.
2331At the very least, it should be aware that it can be passed a
2332negative argument.
2333</P><P>
2334
2335A command function should return 0 if its action completes successfully,
2336and a non-zero value if some error occurs.
2337</P><P>
2338
2339<A NAME="Readline Variables"></A>
2340<HR SIZE="6">
2341<A NAME="SEC28"></A>
2342<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2343<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC27"> &lt; </A>]</TD>
2344<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> &gt; </A>]</TD>
2345<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> &lt;&lt; </A>]</TD>
2346<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
2347<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
2348<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2349<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2350<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2351<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2352</TR></TABLE>
2353<H2> 2.3 Readline Variables </H2>
2354<!--docid::SEC28::-->
2355<P>
2356
2357These variables are available to function writers.
2358</P><P>
2359
2360<A NAME="IDX179"></A>
2361<DL>
2362<DT><U>Variable:</U> char * <B>rl_line_buffer</B>
2363<DD>This is the line gathered so far. You are welcome to modify the
2364contents of the line, but see <A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A>. The
2365function <CODE>rl_extend_line_buffer</CODE> is available to increase
2366the memory allocated to <CODE>rl_line_buffer</CODE>.
2367</DL>
2368</P><P>
2369
2370<A NAME="IDX180"></A>
2371<DL>
2372<DT><U>Variable:</U> int <B>rl_point</B>
2373<DD>The offset of the current cursor position in <CODE>rl_line_buffer</CODE>
2374(the <EM>point</EM>).
2375</DL>
2376</P><P>
2377
2378<A NAME="IDX181"></A>
2379<DL>
2380<DT><U>Variable:</U> int <B>rl_end</B>
2381<DD>The number of characters present in <CODE>rl_line_buffer</CODE>. When
2382<CODE>rl_point</CODE> is at the end of the line, <CODE>rl_point</CODE> and
2383<CODE>rl_end</CODE> are equal.
2384</DL>
2385</P><P>
2386
2387<A NAME="IDX182"></A>
2388<DL>
2389<DT><U>Variable:</U> int <B>rl_mark</B>
2390<DD>The <VAR>mark</VAR> (saved position) in the current line. If set, the mark
2391and point define a <EM>region</EM>.
2392</DL>
2393</P><P>
2394
2395<A NAME="IDX183"></A>
2396<DL>
2397<DT><U>Variable:</U> int <B>rl_done</B>
2398<DD>Setting this to a non-zero value causes Readline to return the current
2399line immediately.
2400</DL>
2401</P><P>
2402
2403<A NAME="IDX184"></A>
2404<DL>
2405<DT><U>Variable:</U> int <B>rl_num_chars_to_read</B>
2406<DD>Setting this to a positive value before calling <CODE>readline()</CODE> causes
2407Readline to return after accepting that many characters, rather
2408than reading up to a character bound to <CODE>accept-line</CODE>.
2409</DL>
2410</P><P>
2411
2412<A NAME="IDX185"></A>
2413<DL>
2414<DT><U>Variable:</U> int <B>rl_pending_input</B>
2415<DD>Setting this to a value makes it the next keystroke read. This is a
2416way to stuff a single character into the input stream.
2417</DL>
2418</P><P>
2419
2420<A NAME="IDX186"></A>
2421<DL>
2422<DT><U>Variable:</U> int <B>rl_dispatching</B>
2423<DD>Set to a non-zero value if a function is being called from a key binding;
2424zero otherwise. Application functions can test this to discover whether
2425they were called directly or by Readline's dispatching mechanism.
2426</DL>
2427</P><P>
2428
2429<A NAME="IDX187"></A>
2430<DL>
2431<DT><U>Variable:</U> int <B>rl_erase_empty_line</B>
2432<DD>Setting this to a non-zero value causes Readline to completely erase
2433the current line, including any prompt, any time a newline is typed as
2434the only character on an otherwise-empty line. The cursor is moved to
2435the beginning of the newly-blank line.
2436</DL>
2437</P><P>
2438
2439<A NAME="IDX188"></A>
2440<DL>
2441<DT><U>Variable:</U> char * <B>rl_prompt</B>
2442<DD>The prompt Readline uses. This is set from the argument to
2443<CODE>readline()</CODE>, and should not be assigned to directly.
2444The <CODE>rl_set_prompt()</CODE> function (see section <A HREF="readline.html#SEC35">2.4.6 Redisplay</A>) may
2445be used to modify the prompt string after calling <CODE>readline()</CODE>.
2446</DL>
2447</P><P>
2448
2449<A NAME="IDX189"></A>
2450<DL>
2451<DT><U>Variable:</U> int <B>rl_already_prompted</B>
2452<DD>If an application wishes to display the prompt itself, rather than have
2453Readline do it the first time <CODE>readline()</CODE> is called, it should set
2454this variable to a non-zero value after displaying the prompt.
2455The prompt must also be passed as the argument to <CODE>readline()</CODE> so
2456the redisplay functions can update the display properly.
2457The calling application is responsible for managing the value; Readline
2458never sets it.
2459</DL>
2460</P><P>
2461
2462<A NAME="IDX190"></A>
2463<DL>
2464<DT><U>Variable:</U> const char * <B>rl_library_version</B>
2465<DD>The version number of this revision of the library.
2466</DL>
2467</P><P>
2468
2469<A NAME="IDX191"></A>
2470<DL>
2471<DT><U>Variable:</U> int <B>rl_readline_version</B>
2472<DD>An integer encoding the current version of the library. The encoding is
2473of the form 0x<VAR>MMmm</VAR>, where <VAR>MM</VAR> is the two-digit major version
2474number, and <VAR>mm</VAR> is the two-digit minor version number.
2475For example, for Readline-4.2, <CODE>rl_readline_version</CODE> would have the
2476value 0x0402.
2477</DL>
2478</P><P>
2479
2480<A NAME="IDX192"></A>
2481<DL>
2482<DT><U>Variable:</U> int <B>rl_gnu_readline_p</B>
2483<DD>Always set to 1, denoting that this is GNU readline rather than some
2484emulation.
2485</DL>
2486</P><P>
2487
2488<A NAME="IDX193"></A>
2489<DL>
2490<DT><U>Variable:</U> const char * <B>rl_terminal_name</B>
2491<DD>The terminal type, used for initialization. If not set by the application,
2492Readline sets this to the value of the <CODE>TERM</CODE> environment variable
2493the first time it is called.
2494</DL>
2495</P><P>
2496
2497<A NAME="IDX194"></A>
2498<DL>
2499<DT><U>Variable:</U> const char * <B>rl_readline_name</B>
2500<DD>This variable is set to a unique name by each application using Readline.
2501The value allows conditional parsing of the inputrc file
2502(see section <A HREF="readline.html#SEC11">1.3.2 Conditional Init Constructs</A>).
2503</DL>
2504</P><P>
2505
2506<A NAME="IDX195"></A>
2507<DL>
2508<DT><U>Variable:</U> FILE * <B>rl_instream</B>
2509<DD>The stdio stream from which Readline reads input.
2510If <CODE>NULL</CODE>, Readline defaults to <VAR>stdin</VAR>.
2511</DL>
2512</P><P>
2513
2514<A NAME="IDX196"></A>
2515<DL>
2516<DT><U>Variable:</U> FILE * <B>rl_outstream</B>
2517<DD>The stdio stream to which Readline performs output.
2518If <CODE>NULL</CODE>, Readline defaults to <VAR>stdout</VAR>.
2519</DL>
2520</P><P>
2521
2522<A NAME="IDX197"></A>
2523<DL>
2524<DT><U>Variable:</U> rl_command_func_t * <B>rl_last_func</B>
2525<DD>The address of the last command function Readline executed. May be used to
2526test whether or not a function is being executed twice in succession, for
2527example.
2528</DL>
2529</P><P>
2530
2531<A NAME="IDX198"></A>
2532<DL>
2533<DT><U>Variable:</U> rl_hook_func_t * <B>rl_startup_hook</B>
2534<DD>If non-zero, this is the address of a function to call just
2535before <CODE>readline</CODE> prints the first prompt.
2536</DL>
2537</P><P>
2538
2539<A NAME="IDX199"></A>
2540<DL>
2541<DT><U>Variable:</U> rl_hook_func_t * <B>rl_pre_input_hook</B>
2542<DD>If non-zero, this is the address of a function to call after
2543the first prompt has been printed and just before <CODE>readline</CODE>
2544starts reading input characters.
2545</DL>
2546</P><P>
2547
2548<A NAME="IDX200"></A>
2549<DL>
2550<DT><U>Variable:</U> rl_hook_func_t * <B>rl_event_hook</B>
2551<DD>If non-zero, this is the address of a function to call periodically
2552when Readline is waiting for terminal input.
2553By default, this will be called at most ten times a second if there
2554is no keyboard input.
2555</DL>
2556</P><P>
2557
2558<A NAME="IDX201"></A>
2559<DL>
2560<DT><U>Variable:</U> rl_getc_func_t * <B>rl_getc_function</B>
2561<DD>If non-zero, Readline will call indirectly through this pointer
2562to get a character from the input stream. By default, it is set to
2563<CODE>rl_getc</CODE>, the default Readline character input function
2564(see section <A HREF="readline.html#SEC37">2.4.8 Character Input</A>).
2565</DL>
2566</P><P>
2567
2568<A NAME="IDX202"></A>
2569<DL>
2570<DT><U>Variable:</U> rl_voidfunc_t * <B>rl_redisplay_function</B>
2571<DD>If non-zero, Readline will call indirectly through this pointer
2572to update the display with the current contents of the editing buffer.
2573By default, it is set to <CODE>rl_redisplay</CODE>, the default Readline
2574redisplay function (see section <A HREF="readline.html#SEC35">2.4.6 Redisplay</A>).
2575</DL>
2576</P><P>
2577
2578<A NAME="IDX203"></A>
2579<DL>
2580<DT><U>Variable:</U> rl_vintfunc_t * <B>rl_prep_term_function</B>
2581<DD>If non-zero, Readline will call indirectly through this pointer
2582to initialize the terminal. The function takes a single argument, an
2583<CODE>int</CODE> flag that says whether or not to use eight-bit characters.
2584By default, this is set to <CODE>rl_prep_terminal</CODE>
2585(see section <A HREF="readline.html#SEC38">2.4.9 Terminal Management</A>).
2586</DL>
2587</P><P>
2588
2589<A NAME="IDX204"></A>
2590<DL>
2591<DT><U>Variable:</U> rl_voidfunc_t * <B>rl_deprep_term_function</B>
2592<DD>If non-zero, Readline will call indirectly through this pointer
2593to reset the terminal. This function should undo the effects of
2594<CODE>rl_prep_term_function</CODE>.
2595By default, this is set to <CODE>rl_deprep_terminal</CODE>
2596(see section <A HREF="readline.html#SEC38">2.4.9 Terminal Management</A>).
2597</DL>
2598</P><P>
2599
2600<A NAME="IDX205"></A>
2601<DL>
2602<DT><U>Variable:</U> Keymap <B>rl_executing_keymap</B>
2603<DD>This variable is set to the keymap (see section <A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A>) in which the
2604currently executing readline function was found.
2605</DL>
2606</P><P>
2607
2608<A NAME="IDX206"></A>
2609<DL>
2610<DT><U>Variable:</U> Keymap <B>rl_binding_keymap</B>
2611<DD>This variable is set to the keymap (see section <A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A>) in which the
2612last key binding occurred.
2613</DL>
2614</P><P>
2615
2616<A NAME="IDX207"></A>
2617<DL>
2618<DT><U>Variable:</U> char * <B>rl_executing_macro</B>
2619<DD>This variable is set to the text of any currently-executing macro.
2620</DL>
2621</P><P>
2622
2623<A NAME="IDX208"></A>
2624<DL>
2625<DT><U>Variable:</U> int <B>rl_readline_state</B>
2626<DD>A variable with bit values that encapsulate the current Readline state.
2627A bit is set with the <CODE>RL_SETSTATE</CODE> macro, and unset with the
2628<CODE>RL_UNSETSTATE</CODE> macro. Use the <CODE>RL_ISSTATE</CODE> macro to test
2629whether a particular state bit is set. Current state bits include:
2630</P><P>
2631
2632<DL COMPACT>
2633<DT><CODE>RL_STATE_NONE</CODE>
2634<DD>Readline has not yet been called, nor has it begun to intialize.
2635<DT><CODE>RL_STATE_INITIALIZING</CODE>
2636<DD>Readline is initializing its internal data structures.
2637<DT><CODE>RL_STATE_INITIALIZED</CODE>
2638<DD>Readline has completed its initialization.
2639<DT><CODE>RL_STATE_TERMPREPPED</CODE>
2640<DD>Readline has modified the terminal modes to do its own input and redisplay.
2641<DT><CODE>RL_STATE_READCMD</CODE>
2642<DD>Readline is reading a command from the keyboard.
2643<DT><CODE>RL_STATE_METANEXT</CODE>
2644<DD>Readline is reading more input after reading the meta-prefix character.
2645<DT><CODE>RL_STATE_DISPATCHING</CODE>
2646<DD>Readline is dispatching to a command.
2647<DT><CODE>RL_STATE_MOREINPUT</CODE>
2648<DD>Readline is reading more input while executing an editing command.
2649<DT><CODE>RL_STATE_ISEARCH</CODE>
2650<DD>Readline is performing an incremental history search.
2651<DT><CODE>RL_STATE_NSEARCH</CODE>
2652<DD>Readline is performing a non-incremental history search.
2653<DT><CODE>RL_STATE_SEARCH</CODE>
2654<DD>Readline is searching backward or forward through the history for a string.
2655<DT><CODE>RL_STATE_NUMERICARG</CODE>
2656<DD>Readline is reading a numeric argument.
2657<DT><CODE>RL_STATE_MACROINPUT</CODE>
2658<DD>Readline is currently getting its input from a previously-defined keyboard
2659macro.
2660<DT><CODE>RL_STATE_MACRODEF</CODE>
2661<DD>Readline is currently reading characters defining a keyboard macro.
2662<DT><CODE>RL_STATE_OVERWRITE</CODE>
2663<DD>Readline is in overwrite mode.
2664<DT><CODE>RL_STATE_COMPLETING</CODE>
2665<DD>Readline is performing word completion.
2666<DT><CODE>RL_STATE_SIGHANDLER</CODE>
2667<DD>Readline is currently executing the readline signal handler.
2668<DT><CODE>RL_STATE_UNDOING</CODE>
2669<DD>Readline is performing an undo.
2670<DT><CODE>RL_STATE_DONE</CODE>
2671<DD>Readline has read a key sequence bound to <CODE>accept-line</CODE>
2672and is about to return the line to the caller.
2673</DL>
2674<P>
2675
2676</DL>
2677</P><P>
2678
2679<A NAME="IDX209"></A>
2680<DL>
2681<DT><U>Variable:</U> int <B>rl_explicit_arg</B>
2682<DD>Set to a non-zero value if an explicit numeric argument was specified by
2683the user. Only valid in a bindable command function.
2684</DL>
2685</P><P>
2686
2687<A NAME="IDX210"></A>
2688<DL>
2689<DT><U>Variable:</U> int <B>rl_numeric_arg</B>
2690<DD>Set to the value of any numeric argument explicitly specified by the user
2691before executing the current Readline function. Only valid in a bindable
2692command function.
2693</DL>
2694</P><P>
2695
2696<A NAME="IDX211"></A>
2697<DL>
2698<DT><U>Variable:</U> int <B>rl_editing_mode</B>
2699<DD>Set to a value denoting Readline's current editing mode. A value of
2700<VAR>1</VAR> means Readline is currently in emacs mode; <VAR>0</VAR>
2701means that vi mode is active.
2702</DL>
2703</P><P>
2704
2705<A NAME="Readline Convenience Functions"></A>
2706<HR SIZE="6">
2707<A NAME="SEC29"></A>
2708<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2709<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &lt; </A>]</TD>
2710<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC30"> &gt; </A>]</TD>
2711<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &lt;&lt; </A>]</TD>
2712<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
2713<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
2714<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2715<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2716<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2717<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2718</TR></TABLE>
2719<H2> 2.4 Readline Convenience Functions </H2>
2720<!--docid::SEC29::-->
2721<P>
2722
2723<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
2724<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC30">2.4.1 Naming a Function</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to give a function you write a name.</TD></TR>
2725<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Making keymaps.</TD></TR>
2726<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Changing Keymaps.</TD></TR>
2727<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Translate function names to
2728 key sequences.</TD></TR>
2729<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to make your functions undoable.</TD></TR>
2730<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Functions to control line display.</TD></TR>
2731<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC36">2.4.7 Modifying Text</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Functions to modify <CODE>rl_line_buffer</CODE>.</TD></TR>
2732<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC37">2.4.8 Character Input</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Functions to read keyboard input.</TD></TR>
2733<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC38">2.4.9 Terminal Management</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Functions to manage terminal settings.</TD></TR>
2734<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Generally useful functions and hooks.</TD></TR>
2735<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Functions that don't fall into any category.</TD></TR>
2736<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC41">2.4.12 Alternate Interface</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Using Readline in a `callback' fashion.</TD></TR>
2737<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC42">2.4.13 A Readline Example</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">An example Readline function.</TD></TR>
2738</TABLE></BLOCKQUOTE>
2739<P>
2740
2741<A NAME="Function Naming"></A>
2742<HR SIZE="6">
2743<A NAME="SEC30"></A>
2744<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2745<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> &lt; </A>]</TD>
2746<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> &gt; </A>]</TD>
2747<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &lt;&lt; </A>]</TD>
2748<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
2749<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
2750<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2751<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2752<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2753<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2754</TR></TABLE>
2755<H3> 2.4.1 Naming a Function </H3>
2756<!--docid::SEC30::-->
2757<P>
2758
2759The user can dynamically change the bindings of keys while using
2760Readline. This is done by representing the function with a descriptive
2761name. The user is able to type the descriptive name when referring to
2762the function. Thus, in an init file, one might find
2763</P><P>
2764
2765<TABLE><tr><td>&nbsp;</td><td class=example><pre>Meta-Rubout: backward-kill-word
2766</pre></td></tr></table></P><P>
2767
2768This binds the keystroke <KBD>Meta-Rubout</KBD> to the function
2769<EM>descriptively</EM> named <CODE>backward-kill-word</CODE>. You, as the
2770programmer, should bind the functions you write to descriptive names as
2771well. Readline provides a function for doing that:
2772</P><P>
2773
2774<A NAME="IDX212"></A>
2775<DL>
2776<DT><U>Function:</U> int <B>rl_add_defun</B> <I>(const char *name, rl_command_func_t *function, int key)</I>
2777<DD>Add <VAR>name</VAR> to the list of named functions. Make <VAR>function</VAR> be
2778the function that gets called. If <VAR>key</VAR> is not -1, then bind it to
2779<VAR>function</VAR> using <CODE>rl_bind_key()</CODE>.
2780</DL>
2781</P><P>
2782
2783Using this function alone is sufficient for most applications.
2784It is the recommended way to add a few functions to the default
2785functions that Readline has built in.
2786If you need to do something other than adding a function to Readline,
2787you may need to use the underlying functions described below.
2788</P><P>
2789
2790<A NAME="Keymaps"></A>
2791<HR SIZE="6">
2792<A NAME="SEC31"></A>
2793<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2794<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC30"> &lt; </A>]</TD>
2795<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC32"> &gt; </A>]</TD>
2796<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC32"> &lt;&lt; </A>]</TD>
2797<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
2798<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
2799<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2800<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2801<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2802<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2803</TR></TABLE>
2804<H3> 2.4.2 Selecting a Keymap </H3>
2805<!--docid::SEC31::-->
2806<P>
2807
2808Key bindings take place on a <EM>keymap</EM>. The keymap is the
2809association between the keys that the user types and the functions that
2810get run. You can make your own keymaps, copy existing keymaps, and tell
2811Readline which keymap to use.
2812</P><P>
2813
2814<A NAME="IDX213"></A>
2815<DL>
2816<DT><U>Function:</U> Keymap <B>rl_make_bare_keymap</B> <I>(void)</I>
2817<DD>Returns a new, empty keymap. The space for the keymap is allocated with
2818<CODE>malloc()</CODE>; the caller should free it by calling
2819<CODE>rl_discard_keymap()</CODE> when done.
2820</DL>
2821</P><P>
2822
2823<A NAME="IDX214"></A>
2824<DL>
2825<DT><U>Function:</U> Keymap <B>rl_copy_keymap</B> <I>(Keymap map)</I>
2826<DD>Return a new keymap which is a copy of <VAR>map</VAR>.
2827</DL>
2828</P><P>
2829
2830<A NAME="IDX215"></A>
2831<DL>
2832<DT><U>Function:</U> Keymap <B>rl_make_keymap</B> <I>(void)</I>
2833<DD>Return a new keymap with the printing characters bound to rl_insert,
2834the lowercase Meta characters bound to run their equivalents, and
2835the Meta digits bound to produce numeric arguments.
2836</DL>
2837</P><P>
2838
2839<A NAME="IDX216"></A>
2840<DL>
2841<DT><U>Function:</U> void <B>rl_discard_keymap</B> <I>(Keymap keymap)</I>
2842<DD>Free the storage associated with <VAR>keymap</VAR>.
2843</DL>
2844</P><P>
2845
2846Readline has several internal keymaps. These functions allow you to
2847change which keymap is active.
2848</P><P>
2849
2850<A NAME="IDX217"></A>
2851<DL>
2852<DT><U>Function:</U> Keymap <B>rl_get_keymap</B> <I>(void)</I>
2853<DD>Returns the currently active keymap.
2854</DL>
2855</P><P>
2856
2857<A NAME="IDX218"></A>
2858<DL>
2859<DT><U>Function:</U> void <B>rl_set_keymap</B> <I>(Keymap keymap)</I>
2860<DD>Makes <VAR>keymap</VAR> the currently active keymap.
2861</DL>
2862</P><P>
2863
2864<A NAME="IDX219"></A>
2865<DL>
2866<DT><U>Function:</U> Keymap <B>rl_get_keymap_by_name</B> <I>(const char *name)</I>
2867<DD>Return the keymap matching <VAR>name</VAR>. <VAR>name</VAR> is one which would
2868be supplied in a <CODE>set keymap</CODE> inputrc line (see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
2869</DL>
2870</P><P>
2871
2872<A NAME="IDX220"></A>
2873<DL>
2874<DT><U>Function:</U> char * <B>rl_get_keymap_name</B> <I>(Keymap keymap)</I>
2875<DD>Return the name matching <VAR>keymap</VAR>. <VAR>name</VAR> is one which would
2876be supplied in a <CODE>set keymap</CODE> inputrc line (see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
2877</DL>
2878</P><P>
2879
2880<A NAME="Binding Keys"></A>
2881<HR SIZE="6">
2882<A NAME="SEC32"></A>
2883<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2884<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> &lt; </A>]</TD>
2885<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC33"> &gt; </A>]</TD>
2886<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC33"> &lt;&lt; </A>]</TD>
2887<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
2888<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
2889<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2890<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2891<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2892<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2893</TR></TABLE>
2894<H3> 2.4.3 Binding Keys </H3>
2895<!--docid::SEC32::-->
2896<P>
2897
2898Key sequences are associate with functions through the keymap.
2899Readline has several internal keymaps: <CODE>emacs_standard_keymap</CODE>,
2900<CODE>emacs_meta_keymap</CODE>, <CODE>emacs_ctlx_keymap</CODE>,
2901<CODE>vi_movement_keymap</CODE>, and <CODE>vi_insertion_keymap</CODE>.
2902<CODE>emacs_standard_keymap</CODE> is the default, and the examples in
2903this manual assume that.
2904</P><P>
2905
2906Since <CODE>readline()</CODE> installs a set of default key bindings the first
2907time it is called, there is always the danger that a custom binding
2908installed before the first call to <CODE>readline()</CODE> will be overridden.
2909An alternate mechanism is to install custom key bindings in an
2910initialization function assigned to the <CODE>rl_startup_hook</CODE> variable
2911(see section <A HREF="readline.html#SEC28">2.3 Readline Variables</A>).
2912</P><P>
2913
2914These functions manage key bindings.
2915</P><P>
2916
2917<A NAME="IDX221"></A>
2918<DL>
2919<DT><U>Function:</U> int <B>rl_bind_key</B> <I>(int key, rl_command_func_t *function)</I>
2920<DD>Binds <VAR>key</VAR> to <VAR>function</VAR> in the currently active keymap.
2921Returns non-zero in the case of an invalid <VAR>key</VAR>.
2922</DL>
2923</P><P>
2924
2925<A NAME="IDX222"></A>
2926<DL>
2927<DT><U>Function:</U> int <B>rl_bind_key_in_map</B> <I>(int key, rl_command_func_t *function, Keymap map)</I>
2928<DD>Bind <VAR>key</VAR> to <VAR>function</VAR> in <VAR>map</VAR>.
2929Returns non-zero in the case of an invalid <VAR>key</VAR>.
2930</DL>
2931</P><P>
2932
2933<A NAME="IDX223"></A>
2934<DL>
2935<DT><U>Function:</U> int <B>rl_bind_key_if_unbound</B> <I>(int key, rl_command_func_t *function)</I>
2936<DD>Binds <VAR>key</VAR> to <VAR>function</VAR> if it is not already bound in the
2937currently active keymap.
2938Returns non-zero in the case of an invalid <VAR>key</VAR> or if <VAR>key</VAR> is
2939already bound.
2940</DL>
2941</P><P>
2942
2943<A NAME="IDX224"></A>
2944<DL>
2945<DT><U>Function:</U> int <B>rl_bind_key_if_unbound_in_map</B> <I>(int key, rl_command_func_t *function, Keymap map)</I>
2946<DD>Binds <VAR>key</VAR> to <VAR>function</VAR> if it is not already bound in <VAR>map</VAR>.
2947Returns non-zero in the case of an invalid <VAR>key</VAR> or if <VAR>key</VAR> is
2948already bound.
2949</DL>
2950</P><P>
2951
2952<A NAME="IDX225"></A>
2953<DL>
2954<DT><U>Function:</U> int <B>rl_unbind_key</B> <I>(int key)</I>
2955<DD>Bind <VAR>key</VAR> to the null function in the currently active keymap.
2956Returns non-zero in case of error.
2957</DL>
2958</P><P>
2959
2960<A NAME="IDX226"></A>
2961<DL>
2962<DT><U>Function:</U> int <B>rl_unbind_key_in_map</B> <I>(int key, Keymap map)</I>
2963<DD>Bind <VAR>key</VAR> to the null function in <VAR>map</VAR>.
2964Returns non-zero in case of error.
2965</DL>
2966</P><P>
2967
2968<A NAME="IDX227"></A>
2969<DL>
2970<DT><U>Function:</U> int <B>rl_unbind_function_in_map</B> <I>(rl_command_func_t *function, Keymap map)</I>
2971<DD>Unbind all keys that execute <VAR>function</VAR> in <VAR>map</VAR>.
2972</DL>
2973</P><P>
2974
2975<A NAME="IDX228"></A>
2976<DL>
2977<DT><U>Function:</U> int <B>rl_unbind_command_in_map</B> <I>(const char *command, Keymap map)</I>
2978<DD>Unbind all keys that are bound to <VAR>command</VAR> in <VAR>map</VAR>.
2979</DL>
2980</P><P>
2981
2982<A NAME="IDX229"></A>
2983<DL>
2984<DT><U>Function:</U> int <B>rl_bind_keyseq</B> <I>(const char *keyseq, rl_command_func_t *function)</I>
2985<DD>Bind the key sequence represented by the string <VAR>keyseq</VAR> to the function
2986<VAR>function</VAR>, beginning in the current keymap.
2987This makes new keymaps as necessary.
2988The return value is non-zero if <VAR>keyseq</VAR> is invalid.
2989</DL>
2990</P><P>
2991
2992<A NAME="IDX230"></A>
2993<DL>
2994<DT><U>Function:</U> int <B>rl_bind_keyseq_in_map</B> <I>(const char *keyseq, rl_command_func_t *function, Keymap map)</I>
2995<DD>Bind the key sequence represented by the string <VAR>keyseq</VAR> to the function
2996<VAR>function</VAR>. This makes new keymaps as necessary.
2997Initial bindings are performed in <VAR>map</VAR>.
2998The return value is non-zero if <VAR>keyseq</VAR> is invalid.
2999</DL>
3000</P><P>
3001
3002<A NAME="IDX231"></A>
3003<DL>
3004<DT><U>Function:</U> int <B>rl_set_key</B> <I>(const char *keyseq, rl_command_func_t *function, Keymap map)</I>
3005<DD>Equivalent to <CODE>rl_bind_keyseq_in_map</CODE>.
3006</DL>
3007</P><P>
3008
3009<A NAME="IDX232"></A>
3010<DL>
3011<DT><U>Function:</U> int <B>rl_bind_keyseq_if_unbound</B> <I>(const char *keyseq, rl_command_func_t *function)</I>
3012<DD>Binds <VAR>keyseq</VAR> to <VAR>function</VAR> if it is not already bound in the
3013currently active keymap.
3014Returns non-zero in the case of an invalid <VAR>keyseq</VAR> or if <VAR>keyseq</VAR> is
3015already bound.
3016</DL>
3017</P><P>
3018
3019<A NAME="IDX233"></A>
3020<DL>
3021<DT><U>Function:</U> int <B>rl_bind_keyseq_if_unbound_in_map</B> <I>(const char *keyseq, rl_command_func_t *function, Keymap map)</I>
3022<DD>Binds <VAR>keyseq</VAR> to <VAR>function</VAR> if it is not already bound in <VAR>map</VAR>.
3023Returns non-zero in the case of an invalid <VAR>keyseq</VAR> or if <VAR>keyseq</VAR> is
3024already bound.
3025</DL>
3026</P><P>
3027
3028<A NAME="IDX234"></A>
3029<DL>
3030<DT><U>Function:</U> int <B>rl_generic_bind</B> <I>(int type, const char *keyseq, char *data, Keymap map)</I>
3031<DD>Bind the key sequence represented by the string <VAR>keyseq</VAR> to the arbitrary
3032pointer <VAR>data</VAR>. <VAR>type</VAR> says what kind of data is pointed to by
3033<VAR>data</VAR>; this can be a function (<CODE>ISFUNC</CODE>), a macro
3034(<CODE>ISMACR</CODE>), or a keymap (<CODE>ISKMAP</CODE>). This makes new keymaps as
3035necessary. The initial keymap in which to do bindings is <VAR>map</VAR>.
3036</DL>
3037</P><P>
3038
3039<A NAME="IDX235"></A>
3040<DL>
3041<DT><U>Function:</U> int <B>rl_parse_and_bind</B> <I>(char *line)</I>
3042<DD>Parse <VAR>line</VAR> as if it had been read from the <CODE>inputrc</CODE> file and
3043perform any key bindings and variable assignments found
3044(see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
3045</DL>
3046</P><P>
3047
3048<A NAME="IDX236"></A>
3049<DL>
3050<DT><U>Function:</U> int <B>rl_read_init_file</B> <I>(const char *filename)</I>
3051<DD>Read keybindings and variable assignments from <VAR>filename</VAR>
3052(see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
3053</DL>
3054</P><P>
3055
3056<A NAME="Associating Function Names and Bindings"></A>
3057<HR SIZE="6">
3058<A NAME="SEC33"></A>
3059<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3060<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC32"> &lt; </A>]</TD>
3061<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC34"> &gt; </A>]</TD>
3062<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC34"> &lt;&lt; </A>]</TD>
3063<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3064<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3065<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3066<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3067<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3068<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3069</TR></TABLE>
3070<H3> 2.4.4 Associating Function Names and Bindings </H3>
3071<!--docid::SEC33::-->
3072<P>
3073
3074These functions allow you to find out what keys invoke named functions
3075and the functions invoked by a particular key sequence. You may also
3076associate a new function name with an arbitrary function.
3077</P><P>
3078
3079<A NAME="IDX237"></A>
3080<DL>
3081<DT><U>Function:</U> rl_command_func_t * <B>rl_named_function</B> <I>(const char *name)</I>
3082<DD>Return the function with name <VAR>name</VAR>.
3083</DL>
3084</P><P>
3085
3086<A NAME="IDX238"></A>
3087<DL>
3088<DT><U>Function:</U> rl_command_func_t * <B>rl_function_of_keyseq</B> <I>(const char *keyseq, Keymap map, int *type)</I>
3089<DD>Return the function invoked by <VAR>keyseq</VAR> in keymap <VAR>map</VAR>.
3090If <VAR>map</VAR> is <CODE>NULL</CODE>, the current keymap is used. If <VAR>type</VAR> is
3091not <CODE>NULL</CODE>, the type of the object is returned in the <CODE>int</CODE> variable
3092it points to (one of <CODE>ISFUNC</CODE>, <CODE>ISKMAP</CODE>, or <CODE>ISMACR</CODE>).
3093</DL>
3094</P><P>
3095
3096<A NAME="IDX239"></A>
3097<DL>
3098<DT><U>Function:</U> char ** <B>rl_invoking_keyseqs</B> <I>(rl_command_func_t *function)</I>
3099<DD>Return an array of strings representing the key sequences used to
3100invoke <VAR>function</VAR> in the current keymap.
3101</DL>
3102</P><P>
3103
3104<A NAME="IDX240"></A>
3105<DL>
3106<DT><U>Function:</U> char ** <B>rl_invoking_keyseqs_in_map</B> <I>(rl_command_func_t *function, Keymap map)</I>
3107<DD>Return an array of strings representing the key sequences used to
3108invoke <VAR>function</VAR> in the keymap <VAR>map</VAR>.
3109</DL>
3110</P><P>
3111
3112<A NAME="IDX241"></A>
3113<DL>
3114<DT><U>Function:</U> void <B>rl_function_dumper</B> <I>(int readable)</I>
3115<DD>Print the readline function names and the key sequences currently
3116bound to them to <CODE>rl_outstream</CODE>. If <VAR>readable</VAR> is non-zero,
3117the list is formatted in such a way that it can be made part of an
3118<CODE>inputrc</CODE> file and re-read.
3119</DL>
3120</P><P>
3121
3122<A NAME="IDX242"></A>
3123<DL>
3124<DT><U>Function:</U> void <B>rl_list_funmap_names</B> <I>(void)</I>
3125<DD>Print the names of all bindable Readline functions to <CODE>rl_outstream</CODE>.
3126</DL>
3127</P><P>
3128
3129<A NAME="IDX243"></A>
3130<DL>
3131<DT><U>Function:</U> const char ** <B>rl_funmap_names</B> <I>(void)</I>
3132<DD>Return a NULL terminated array of known function names. The array is
3133sorted. The array itself is allocated, but not the strings inside. You
3134should <CODE>free()</CODE> the array when you are done, but not the pointers.
3135</DL>
3136</P><P>
3137
3138<A NAME="IDX244"></A>
3139<DL>
3140<DT><U>Function:</U> int <B>rl_add_funmap_entry</B> <I>(const char *name, rl_command_func_t *function)</I>
3141<DD>Add <VAR>name</VAR> to the list of bindable Readline command names, and make
3142<VAR>function</VAR> the function to be called when <VAR>name</VAR> is invoked.
3143</DL>
3144</P><P>
3145
3146<A NAME="Allowing Undoing"></A>
3147<HR SIZE="6">
3148<A NAME="SEC34"></A>
3149<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3150<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC33"> &lt; </A>]</TD>
3151<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC35"> &gt; </A>]</TD>
3152<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC35"> &lt;&lt; </A>]</TD>
3153<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3154<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3155<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3156<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3157<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3158<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3159</TR></TABLE>
3160<H3> 2.4.5 Allowing Undoing </H3>
3161<!--docid::SEC34::-->
3162<P>
3163
3164Supporting the undo command is a painless thing, and makes your
3165functions much more useful. It is certainly easy to try
3166something if you know you can undo it.
3167</P><P>
3168
3169If your function simply inserts text once, or deletes text once, and
3170uses <CODE>rl_insert_text()</CODE> or <CODE>rl_delete_text()</CODE> to do it, then
3171undoing is already done for you automatically.
3172</P><P>
3173
3174If you do multiple insertions or multiple deletions, or any combination
3175of these operations, you should group them together into one operation.
3176This is done with <CODE>rl_begin_undo_group()</CODE> and
3177<CODE>rl_end_undo_group()</CODE>.
3178</P><P>
3179
3180The types of events that can be undone are:
3181</P><P>
3182
3183<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END };
3184</FONT></pre></td></tr></table></P><P>
3185
3186Notice that <CODE>UNDO_DELETE</CODE> means to insert some text, and
3187<CODE>UNDO_INSERT</CODE> means to delete some text. That is, the undo code
3188tells what to undo, not how to undo it. <CODE>UNDO_BEGIN</CODE> and
3189<CODE>UNDO_END</CODE> are tags added by <CODE>rl_begin_undo_group()</CODE> and
3190<CODE>rl_end_undo_group()</CODE>.
3191</P><P>
3192
3193<A NAME="IDX245"></A>
3194<DL>
3195<DT><U>Function:</U> int <B>rl_begin_undo_group</B> <I>(void)</I>
3196<DD>Begins saving undo information in a group construct. The undo
3197information usually comes from calls to <CODE>rl_insert_text()</CODE> and
3198<CODE>rl_delete_text()</CODE>, but could be the result of calls to
3199<CODE>rl_add_undo()</CODE>.
3200</DL>
3201</P><P>
3202
3203<A NAME="IDX246"></A>
3204<DL>
3205<DT><U>Function:</U> int <B>rl_end_undo_group</B> <I>(void)</I>
3206<DD>Closes the current undo group started with <CODE>rl_begin_undo_group
3207()</CODE>. There should be one call to <CODE>rl_end_undo_group()</CODE>
3208for each call to <CODE>rl_begin_undo_group()</CODE>.
3209</DL>
3210</P><P>
3211
3212<A NAME="IDX247"></A>
3213<DL>
3214<DT><U>Function:</U> void <B>rl_add_undo</B> <I>(enum undo_code what, int start, int end, char *text)</I>
3215<DD>Remember how to undo an event (according to <VAR>what</VAR>). The affected
3216text runs from <VAR>start</VAR> to <VAR>end</VAR>, and encompasses <VAR>text</VAR>.
3217</DL>
3218</P><P>
3219
3220<A NAME="IDX248"></A>
3221<DL>
3222<DT><U>Function:</U> void <B>rl_free_undo_list</B> <I>(void)</I>
3223<DD>Free the existing undo list.
3224</DL>
3225</P><P>
3226
3227<A NAME="IDX249"></A>
3228<DL>
3229<DT><U>Function:</U> int <B>rl_do_undo</B> <I>(void)</I>
3230<DD>Undo the first thing on the undo list. Returns <CODE>0</CODE> if there was
3231nothing to undo, non-zero if something was undone.
3232</DL>
3233</P><P>
3234
3235Finally, if you neither insert nor delete text, but directly modify the
3236existing text (e.g., change its case), call <CODE>rl_modifying()</CODE>
3237once, just before you modify the text. You must supply the indices of
3238the text range that you are going to modify.
3239</P><P>
3240
3241<A NAME="IDX250"></A>
3242<DL>
3243<DT><U>Function:</U> int <B>rl_modifying</B> <I>(int start, int end)</I>
3244<DD>Tell Readline to save the text between <VAR>start</VAR> and <VAR>end</VAR> as a
3245single undo unit. It is assumed that you will subsequently modify
3246that text.
3247</DL>
3248</P><P>
3249
3250<A NAME="Redisplay"></A>
3251<HR SIZE="6">
3252<A NAME="SEC35"></A>
3253<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3254<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC34"> &lt; </A>]</TD>
3255<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC36"> &gt; </A>]</TD>
3256<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC36"> &lt;&lt; </A>]</TD>
3257<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3258<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3259<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3260<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3261<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3262<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3263</TR></TABLE>
3264<H3> 2.4.6 Redisplay </H3>
3265<!--docid::SEC35::-->
3266<P>
3267
3268<A NAME="IDX251"></A>
3269<DL>
3270<DT><U>Function:</U> void <B>rl_redisplay</B> <I>(void)</I>
3271<DD>Change what's displayed on the screen to reflect the current contents
3272of <CODE>rl_line_buffer</CODE>.
3273</DL>
3274</P><P>
3275
3276<A NAME="IDX252"></A>
3277<DL>
3278<DT><U>Function:</U> int <B>rl_forced_update_display</B> <I>(void)</I>
3279<DD>Force the line to be updated and redisplayed, whether or not
3280Readline thinks the screen display is correct.
3281</DL>
3282</P><P>
3283
3284<A NAME="IDX253"></A>
3285<DL>
3286<DT><U>Function:</U> int <B>rl_on_new_line</B> <I>(void)</I>
3287<DD>Tell the update functions that we have moved onto a new (empty) line,
3288usually after ouputting a newline.
3289</DL>
3290</P><P>
3291
3292<A NAME="IDX254"></A>
3293<DL>
3294<DT><U>Function:</U> int <B>rl_on_new_line_with_prompt</B> <I>(void)</I>
3295<DD>Tell the update functions that we have moved onto a new line, with
3296<VAR>rl_prompt</VAR> already displayed.
3297This could be used by applications that want to output the prompt string
3298themselves, but still need Readline to know the prompt string length for
3299redisplay.
3300It should be used after setting <VAR>rl_already_prompted</VAR>.
3301</DL>
3302</P><P>
3303
3304<A NAME="IDX255"></A>
3305<DL>
3306<DT><U>Function:</U> int <B>rl_reset_line_state</B> <I>(void)</I>
3307<DD>Reset the display state to a clean state and redisplay the current line
3308starting on a new line.
3309</DL>
3310</P><P>
3311
3312<A NAME="IDX256"></A>
3313<DL>
3314<DT><U>Function:</U> int <B>rl_crlf</B> <I>(void)</I>
3315<DD>Move the cursor to the start of the next screen line.
3316</DL>
3317</P><P>
3318
3319<A NAME="IDX257"></A>
3320<DL>
3321<DT><U>Function:</U> int <B>rl_show_char</B> <I>(int c)</I>
3322<DD>Display character <VAR>c</VAR> on <CODE>rl_outstream</CODE>.
3323If Readline has not been set to display meta characters directly, this
3324will convert meta characters to a meta-prefixed key sequence.
3325This is intended for use by applications which wish to do their own
3326redisplay.
3327</DL>
3328</P><P>
3329
3330<A NAME="IDX258"></A>
3331<DL>
3332<DT><U>Function:</U> int <B>rl_message</B> <I>(const char *, <small>...</small>)</I>
3333<DD>The arguments are a format string as would be supplied to <CODE>printf</CODE>,
3334possibly containing conversion specifications such as <SAMP>`%d'</SAMP>, and
3335any additional arguments necessary to satisfy the conversion specifications.
3336The resulting string is displayed in the <EM>echo area</EM>. The echo area
3337is also used to display numeric arguments and search strings.
3338</DL>
3339</P><P>
3340
3341<A NAME="IDX259"></A>
3342<DL>
3343<DT><U>Function:</U> int <B>rl_clear_message</B> <I>(void)</I>
3344<DD>Clear the message in the echo area.
3345</DL>
3346</P><P>
3347
3348<A NAME="IDX260"></A>
3349<DL>
3350<DT><U>Function:</U> void <B>rl_save_prompt</B> <I>(void)</I>
3351<DD>Save the local Readline prompt display state in preparation for
3352displaying a new message in the message area with <CODE>rl_message()</CODE>.
3353</DL>
3354</P><P>
3355
3356<A NAME="IDX261"></A>
3357<DL>
3358<DT><U>Function:</U> void <B>rl_restore_prompt</B> <I>(void)</I>
3359<DD>Restore the local Readline prompt display state saved by the most
3360recent call to <CODE>rl_save_prompt</CODE>.
3361</DL>
3362</P><P>
3363
3364<A NAME="IDX262"></A>
3365<DL>
3366<DT><U>Function:</U> int <B>rl_expand_prompt</B> <I>(char *prompt)</I>
3367<DD>Expand any special character sequences in <VAR>prompt</VAR> and set up the
3368local Readline prompt redisplay variables.
3369This function is called by <CODE>readline()</CODE>. It may also be called to
3370expand the primary prompt if the <CODE>rl_on_new_line_with_prompt()</CODE>
3371function or <CODE>rl_already_prompted</CODE> variable is used.
3372It returns the number of visible characters on the last line of the
3373(possibly multi-line) prompt.
3374Applications may indicate that the prompt contains characters that take
3375up no physical screen space when displayed by bracketing a sequence of
3376such characters with the special markers <CODE>RL_PROMPT_START_IGNORE</CODE>
3377and <CODE>RL_PROMPT_END_IGNORE</CODE> (declared in <TT>`readline.h'</TT>. This may
3378be used to embed terminal-specific escape sequences in prompts.
3379</DL>
3380</P><P>
3381
3382<A NAME="IDX263"></A>
3383<DL>
3384<DT><U>Function:</U> int <B>rl_set_prompt</B> <I>(const char *prompt)</I>
3385<DD>Make Readline use <VAR>prompt</VAR> for subsequent redisplay. This calls
3386<CODE>rl_expand_prompt()</CODE> to expand the prompt and sets <CODE>rl_prompt</CODE>
3387to the result.
3388</DL>
3389</P><P>
3390
3391<A NAME="Modifying Text"></A>
3392<HR SIZE="6">
3393<A NAME="SEC36"></A>
3394<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3395<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC35"> &lt; </A>]</TD>
3396<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC37"> &gt; </A>]</TD>
3397<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC37"> &lt;&lt; </A>]</TD>
3398<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3399<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3400<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3401<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3402<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3403<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3404</TR></TABLE>
3405<H3> 2.4.7 Modifying Text </H3>
3406<!--docid::SEC36::-->
3407<P>
3408
3409<A NAME="IDX264"></A>
3410<DL>
3411<DT><U>Function:</U> int <B>rl_insert_text</B> <I>(const char *text)</I>
3412<DD>Insert <VAR>text</VAR> into the line at the current cursor position.
3413Returns the number of characters inserted.
3414</DL>
3415</P><P>
3416
3417<A NAME="IDX265"></A>
3418<DL>
3419<DT><U>Function:</U> int <B>rl_delete_text</B> <I>(int start, int end)</I>
3420<DD>Delete the text between <VAR>start</VAR> and <VAR>end</VAR> in the current line.
3421Returns the number of characters deleted.
3422</DL>
3423</P><P>
3424
3425<A NAME="IDX266"></A>
3426<DL>
3427<DT><U>Function:</U> char * <B>rl_copy_text</B> <I>(int start, int end)</I>
3428<DD>Return a copy of the text between <VAR>start</VAR> and <VAR>end</VAR> in
3429the current line.
3430</DL>
3431</P><P>
3432
3433<A NAME="IDX267"></A>
3434<DL>
3435<DT><U>Function:</U> int <B>rl_kill_text</B> <I>(int start, int end)</I>
3436<DD>Copy the text between <VAR>start</VAR> and <VAR>end</VAR> in the current line
3437to the kill ring, appending or prepending to the last kill if the
3438last command was a kill command. The text is deleted.
3439If <VAR>start</VAR> is less than <VAR>end</VAR>,
3440the text is appended, otherwise prepended. If the last command was
3441not a kill, a new kill ring slot is used.
3442</DL>
3443</P><P>
3444
3445<A NAME="IDX268"></A>
3446<DL>
3447<DT><U>Function:</U> int <B>rl_push_macro_input</B> <I>(char *macro)</I>
3448<DD>Cause <VAR>macro</VAR> to be inserted into the line, as if it had been invoked
3449by a key bound to a macro. Not especially useful; use
3450<CODE>rl_insert_text()</CODE> instead.
3451</DL>
3452</P><P>
3453
3454<A NAME="Character Input"></A>
3455<HR SIZE="6">
3456<A NAME="SEC37"></A>
3457<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3458<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC36"> &lt; </A>]</TD>
3459<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC38"> &gt; </A>]</TD>
3460<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC38"> &lt;&lt; </A>]</TD>
3461<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3462<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3463<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3464<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3465<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3466<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3467</TR></TABLE>
3468<H3> 2.4.8 Character Input </H3>
3469<!--docid::SEC37::-->
3470<P>
3471
3472<A NAME="IDX269"></A>
3473<DL>
3474<DT><U>Function:</U> int <B>rl_read_key</B> <I>(void)</I>
3475<DD>Return the next character available from Readline's current input stream.
3476This handles input inserted into
3477the input stream via <VAR>rl_pending_input</VAR> (see section <A HREF="readline.html#SEC28">2.3 Readline Variables</A>)
3478and <CODE>rl_stuff_char()</CODE>, macros, and characters read from the keyboard.
3479While waiting for input, this function will call any function assigned to
3480the <CODE>rl_event_hook</CODE> variable.
3481</DL>
3482</P><P>
3483
3484<A NAME="IDX270"></A>
3485<DL>
3486<DT><U>Function:</U> int <B>rl_getc</B> <I>(FILE *stream)</I>
3487<DD>Return the next character available from <VAR>stream</VAR>, which is assumed to
3488be the keyboard.
3489</DL>
3490</P><P>
3491
3492<A NAME="IDX271"></A>
3493<DL>
3494<DT><U>Function:</U> int <B>rl_stuff_char</B> <I>(int c)</I>
3495<DD>Insert <VAR>c</VAR> into the Readline input stream. It will be "read"
3496before Readline attempts to read characters from the terminal with
3497<CODE>rl_read_key()</CODE>. Up to 512 characters may be pushed back.
3498<CODE>rl_stuff_char</CODE> returns 1 if the character was successfully inserted;
34990 otherwise.
3500</DL>
3501</P><P>
3502
3503<A NAME="IDX272"></A>
3504<DL>
3505<DT><U>Function:</U> int <B>rl_execute_next</B> <I>(int c)</I>
3506<DD>Make <VAR>c</VAR> be the next command to be executed when <CODE>rl_read_key()</CODE>
3507is called. This sets <VAR>rl_pending_input</VAR>.
3508</DL>
3509</P><P>
3510
3511<A NAME="IDX273"></A>
3512<DL>
3513<DT><U>Function:</U> int <B>rl_clear_pending_input</B> <I>(void)</I>
3514<DD>Unset <VAR>rl_pending_input</VAR>, effectively negating the effect of any
3515previous call to <CODE>rl_execute_next()</CODE>. This works only if the
3516pending input has not already been read with <CODE>rl_read_key()</CODE>.
3517</DL>
3518</P><P>
3519
3520<A NAME="IDX274"></A>
3521<DL>
3522<DT><U>Function:</U> int <B>rl_set_keyboard_input_timeout</B> <I>(int u)</I>
3523<DD>While waiting for keyboard input in <CODE>rl_read_key()</CODE>, Readline will
3524wait for <VAR>u</VAR> microseconds for input before calling any function
3525assigned to <CODE>rl_event_hook</CODE>. The default waiting period is
3526one-tenth of a second. Returns the old timeout value.
3527</DL>
3528</P><P>
3529
3530<A NAME="Terminal Management"></A>
3531<HR SIZE="6">
3532<A NAME="SEC38"></A>
3533<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3534<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC37"> &lt; </A>]</TD>
3535<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC39"> &gt; </A>]</TD>
3536<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &lt;&lt; </A>]</TD>
3537<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3538<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3539<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3540<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3541<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3542<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3543</TR></TABLE>
3544<H3> 2.4.9 Terminal Management </H3>
3545<!--docid::SEC38::-->
3546<P>
3547
3548<A NAME="IDX275"></A>
3549<DL>
3550<DT><U>Function:</U> void <B>rl_prep_terminal</B> <I>(int meta_flag)</I>
3551<DD>Modify the terminal settings for Readline's use, so <CODE>readline()</CODE>
3552can read a single character at a time from the keyboard.
3553The <VAR>meta_flag</VAR> argument should be non-zero if Readline should
3554read eight-bit input.
3555</DL>
3556</P><P>
3557
3558<A NAME="IDX276"></A>
3559<DL>
3560<DT><U>Function:</U> void <B>rl_deprep_terminal</B> <I>(void)</I>
3561<DD>Undo the effects of <CODE>rl_prep_terminal()</CODE>, leaving the terminal in
3562the state in which it was before the most recent call to
3563<CODE>rl_prep_terminal()</CODE>.
3564</DL>
3565</P><P>
3566
3567<A NAME="IDX277"></A>
3568<DL>
3569<DT><U>Function:</U> void <B>rl_tty_set_default_bindings</B> <I>(Keymap kmap)</I>
3570<DD>Read the operating system's terminal editing characters (as would be
3571displayed by <CODE>stty</CODE>) to their Readline equivalents.
3572The bindings are performed in <VAR>kmap</VAR>.
3573</DL>
3574</P><P>
3575
3576<A NAME="IDX278"></A>
3577<DL>
3578<DT><U>Function:</U> void <B>rl_tty_unset_default_bindings</B> <I>(Keymap kmap)</I>
3579<DD>Reset the bindings manipulated by <CODE>rl_tty_set_default_bindings</CODE> so
3580that the terminal editing characters are bound to <CODE>rl_insert</CODE>.
3581The bindings are performed in <VAR>kmap</VAR>.
3582</DL>
3583</P><P>
3584
3585<A NAME="IDX279"></A>
3586<DL>
3587<DT><U>Function:</U> int <B>rl_reset_terminal</B> <I>(const char *terminal_name)</I>
3588<DD>Reinitialize Readline's idea of the terminal settings using
3589<VAR>terminal_name</VAR> as the terminal type (e.g., <CODE>vt100</CODE>).
3590If <VAR>terminal_name</VAR> is <CODE>NULL</CODE>, the value of the <CODE>TERM</CODE>
3591environment variable is used.
3592</DL>
3593</P><P>
3594
3595<A NAME="Utility Functions"></A>
3596<HR SIZE="6">
3597<A NAME="SEC39"></A>
3598<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3599<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC38"> &lt; </A>]</TD>
3600<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC40"> &gt; </A>]</TD>
3601<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> &lt;&lt; </A>]</TD>
3602<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3603<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3604<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3605<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3606<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3607<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3608</TR></TABLE>
3609<H3> 2.4.10 Utility Functions </H3>
3610<!--docid::SEC39::-->
3611<P>
3612
3613<A NAME="IDX280"></A>
3614<DL>
3615<DT><U>Function:</U> void <B>rl_replace_line</B> <I>(const char *text, int clear_undo)</I>
3616<DD>Replace the contents of <CODE>rl_line_buffer</CODE> with <VAR>text</VAR>.
3617The point and mark are preserved, if possible.
3618If <VAR>clear_undo</VAR> is non-zero, the undo list associated with the
3619current line is cleared.
3620</DL>
3621</P><P>
3622
3623<A NAME="IDX281"></A>
3624<DL>
3625<DT><U>Function:</U> int <B>rl_extend_line_buffer</B> <I>(int len)</I>
3626<DD>Ensure that <CODE>rl_line_buffer</CODE> has enough space to hold <VAR>len</VAR>
3627characters, possibly reallocating it if necessary.
3628</DL>
3629</P><P>
3630
3631<A NAME="IDX282"></A>
3632<DL>
3633<DT><U>Function:</U> int <B>rl_initialize</B> <I>(void)</I>
3634<DD>Initialize or re-initialize Readline's internal state.
3635It's not strictly necessary to call this; <CODE>readline()</CODE> calls it before
3636reading any input.
3637</DL>
3638</P><P>
3639
3640<A NAME="IDX283"></A>
3641<DL>
3642<DT><U>Function:</U> int <B>rl_ding</B> <I>(void)</I>
3643<DD>Ring the terminal bell, obeying the setting of <CODE>bell-style</CODE>.
3644</DL>
3645</P><P>
3646
3647<A NAME="IDX284"></A>
3648<DL>
3649<DT><U>Function:</U> int <B>rl_alphabetic</B> <I>(int c)</I>
3650<DD>Return 1 if <VAR>c</VAR> is an alphabetic character.
3651</DL>
3652</P><P>
3653
3654<A NAME="IDX285"></A>
3655<DL>
3656<DT><U>Function:</U> void <B>rl_display_match_list</B> <I>(char **matches, int len, int max)</I>
3657<DD>A convenience function for displaying a list of strings in
3658columnar format on Readline's output stream. <CODE>matches</CODE> is the list
3659of strings, in argv format, such as a list of completion matches.
3660<CODE>len</CODE> is the number of strings in <CODE>matches</CODE>, and <CODE>max</CODE>
3661is the length of the longest string in <CODE>matches</CODE>. This function uses
3662the setting of <CODE>print-completions-horizontally</CODE> to select how the
3663matches are displayed (see section <A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A>).
3664</DL>
3665</P><P>
3666
3667The following are implemented as macros, defined in <CODE>chardefs.h</CODE>.
3668Applications should refrain from using them.
3669</P><P>
3670
3671<A NAME="IDX286"></A>
3672<DL>
3673<DT><U>Function:</U> int <B>_rl_uppercase_p</B> <I>(int c)</I>
3674<DD>Return 1 if <VAR>c</VAR> is an uppercase alphabetic character.
3675</DL>
3676</P><P>
3677
3678<A NAME="IDX287"></A>
3679<DL>
3680<DT><U>Function:</U> int <B>_rl_lowercase_p</B> <I>(int c)</I>
3681<DD>Return 1 if <VAR>c</VAR> is a lowercase alphabetic character.
3682</DL>
3683</P><P>
3684
3685<A NAME="IDX288"></A>
3686<DL>
3687<DT><U>Function:</U> int <B>_rl_digit_p</B> <I>(int c)</I>
3688<DD>Return 1 if <VAR>c</VAR> is a numeric character.
3689</DL>
3690</P><P>
3691
3692<A NAME="IDX289"></A>
3693<DL>
3694<DT><U>Function:</U> int <B>_rl_to_upper</B> <I>(int c)</I>
3695<DD>If <VAR>c</VAR> is a lowercase alphabetic character, return the corresponding
3696uppercase character.
3697</DL>
3698</P><P>
3699
3700<A NAME="IDX290"></A>
3701<DL>
3702<DT><U>Function:</U> int <B>_rl_to_lower</B> <I>(int c)</I>
3703<DD>If <VAR>c</VAR> is an uppercase alphabetic character, return the corresponding
3704lowercase character.
3705</DL>
3706</P><P>
3707
3708<A NAME="IDX291"></A>
3709<DL>
3710<DT><U>Function:</U> int <B>_rl_digit_value</B> <I>(int c)</I>
3711<DD>If <VAR>c</VAR> is a number, return the value it represents.
3712</DL>
3713</P><P>
3714
3715<A NAME="Miscellaneous Functions"></A>
3716<HR SIZE="6">
3717<A NAME="SEC40"></A>
3718<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3719<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC39"> &lt; </A>]</TD>
3720<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC41"> &gt; </A>]</TD>
3721<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> &lt;&lt; </A>]</TD>
3722<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3723<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3724<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3725<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3726<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3727<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3728</TR></TABLE>
3729<H3> 2.4.11 Miscellaneous Functions </H3>
3730<!--docid::SEC40::-->
3731<P>
3732
3733<A NAME="IDX292"></A>
3734<DL>
3735<DT><U>Function:</U> int <B>rl_macro_bind</B> <I>(const char *keyseq, const char *macro, Keymap map)</I>
3736<DD>Bind the key sequence <VAR>keyseq</VAR> to invoke the macro <VAR>macro</VAR>.
3737The binding is performed in <VAR>map</VAR>. When <VAR>keyseq</VAR> is invoked, the
3738<VAR>macro</VAR> will be inserted into the line. This function is deprecated;
3739use <CODE>rl_generic_bind()</CODE> instead.
3740</DL>
3741</P><P>
3742
3743<A NAME="IDX293"></A>
3744<DL>
3745<DT><U>Function:</U> void <B>rl_macro_dumper</B> <I>(int readable)</I>
3746<DD>Print the key sequences bound to macros and their values, using
3747the current keymap, to <CODE>rl_outstream</CODE>.
3748If <VAR>readable</VAR> is non-zero, the list is formatted in such a way
3749that it can be made part of an <CODE>inputrc</CODE> file and re-read.
3750</DL>
3751</P><P>
3752
3753<A NAME="IDX294"></A>
3754<DL>
3755<DT><U>Function:</U> int <B>rl_variable_bind</B> <I>(const char *variable, const char *value)</I>
3756<DD>Make the Readline variable <VAR>variable</VAR> have <VAR>value</VAR>.
3757This behaves as if the readline command
3758<SAMP>`set <VAR>variable</VAR> <VAR>value</VAR>'</SAMP> had been executed in an <CODE>inputrc</CODE>
3759file (see section <A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A>).
3760</DL>
3761</P><P>
3762
3763<A NAME="IDX295"></A>
3764<DL>
3765<DT><U>Function:</U> void <B>rl_variable_dumper</B> <I>(int readable)</I>
3766<DD>Print the readline variable names and their current values
3767to <CODE>rl_outstream</CODE>.
3768If <VAR>readable</VAR> is non-zero, the list is formatted in such a way
3769that it can be made part of an <CODE>inputrc</CODE> file and re-read.
3770</DL>
3771</P><P>
3772
3773<A NAME="IDX296"></A>
3774<DL>
3775<DT><U>Function:</U> int <B>rl_set_paren_blink_timeout</B> <I>(int u)</I>
3776<DD>Set the time interval (in microseconds) that Readline waits when showing
3777a balancing character when <CODE>blink-matching-paren</CODE> has been enabled.
3778</DL>
3779</P><P>
3780
3781<A NAME="IDX297"></A>
3782<DL>
3783<DT><U>Function:</U> char * <B>rl_get_termcap</B> <I>(const char *cap)</I>
3784<DD>Retrieve the string value of the termcap capability <VAR>cap</VAR>.
3785Readline fetches the termcap entry for the current terminal name and
3786uses those capabilities to move around the screen line and perform other
3787terminal-specific operations, like erasing a line. Readline does not
3788use all of a terminal's capabilities, and this function will return
3789values for only those capabilities Readline uses.
3790</DL>
3791</P><P>
3792
3793<A NAME="Alternate Interface"></A>
3794<HR SIZE="6">
3795<A NAME="SEC41"></A>
3796<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3797<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC40"> &lt; </A>]</TD>
3798<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC42"> &gt; </A>]</TD>
3799<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> &lt;&lt; </A>]</TD>
3800<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3801<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3802<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3803<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3804<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3805<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3806</TR></TABLE>
3807<H3> 2.4.12 Alternate Interface </H3>
3808<!--docid::SEC41::-->
3809<P>
3810
3811An alternate interface is available to plain <CODE>readline()</CODE>. Some
3812applications need to interleave keyboard I/O with file, device, or
3813window system I/O, typically by using a main loop to <CODE>select()</CODE>
3814on various file descriptors. To accomodate this need, readline can
3815also be invoked as a `callback' function from an event loop. There
3816are functions available to make this easy.
3817</P><P>
3818
3819<A NAME="IDX298"></A>
3820<DL>
3821<DT><U>Function:</U> void <B>rl_callback_handler_install</B> <I>(const char *prompt, rl_vcpfunc_t *lhandler)</I>
3822<DD>Set up the terminal for readline I/O and display the initial
3823expanded value of <VAR>prompt</VAR>. Save the value of <VAR>lhandler</VAR> to
3824use as a function to call when a complete line of input has been entered.
3825The function takes the text of the line as an argument.
3826</DL>
3827</P><P>
3828
3829<A NAME="IDX299"></A>
3830<DL>
3831<DT><U>Function:</U> void <B>rl_callback_read_char</B> <I>(void)</I>
3832<DD>Whenever an application determines that keyboard input is available, it
3833should call <CODE>rl_callback_read_char()</CODE>, which will read the next
3834character from the current input source.
3835If that character completes the line, <CODE>rl_callback_read_char</CODE> will
3836invoke the <VAR>lhandler</VAR> function saved by <CODE>rl_callback_handler_install</CODE>
3837to process the line.
3838Before calling the <VAR>lhandler</VAR> function, the terminal settings are
3839reset to the values they had before calling
3840<CODE>rl_callback_handler_install</CODE>.
3841If the <VAR>lhandler</VAR> function returns,
3842the terminal settings are modified for Readline's use again.
3843<CODE>EOF</CODE> is indicated by calling <VAR>lhandler</VAR> with a
3844<CODE>NULL</CODE> line.
3845</DL>
3846</P><P>
3847
3848<A NAME="IDX300"></A>
3849<DL>
3850<DT><U>Function:</U> void <B>rl_callback_handler_remove</B> <I>(void)</I>
3851<DD>Restore the terminal to its initial state and remove the line handler.
3852This may be called from within a callback as well as independently.
3853If the <VAR>lhandler</VAR> installed by <CODE>rl_callback_handler_install</CODE>
3854does not exit the program, either this function or the function referred
3855to by the value of <CODE>rl_deprep_term_function</CODE> should be called before
3856the program exits to reset the terminal settings.
3857</DL>
3858</P><P>
3859
3860<A NAME="A Readline Example"></A>
3861<HR SIZE="6">
3862<A NAME="SEC42"></A>
3863<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3864<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC41"> &lt; </A>]</TD>
3865<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt; </A>]</TD>
3866<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> &lt;&lt; </A>]</TD>
3867<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3868<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3869<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3870<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3871<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3872<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3873</TR></TABLE>
3874<H3> 2.4.13 A Readline Example </H3>
3875<!--docid::SEC42::-->
3876<P>
3877
3878Here is a function which changes lowercase characters to their uppercase
3879equivalents, and uppercase characters to lowercase. If
3880this function was bound to <SAMP>`M-c'</SAMP>, then typing <SAMP>`M-c'</SAMP> would
3881change the case of the character under point. Typing <SAMP>`M-1 0 M-c'</SAMP>
3882would change the case of the following 10 characters, leaving the cursor on
3883the last character changed.
3884</P><P>
3885
3886<TABLE><tr><td>&nbsp;</td><td class=example><pre>/* Invert the case of the COUNT following characters. */
3887int
3888invert_case_line (count, key)
3889 int count, key;
3890{
3891 register int start, end, i;
3892
3893 start = rl_point;
3894
3895 if (rl_point &#62;= rl_end)
3896 return (0);
3897
3898 if (count &#60; 0)
3899 {
3900 direction = -1;
3901 count = -count;
3902 }
3903 else
3904 direction = 1;
3905
3906 /* Find the end of the range to modify. */
3907 end = start + (count * direction);
3908
3909 /* Force it to be within range. */
3910 if (end &#62; rl_end)
3911 end = rl_end;
3912 else if (end &#60; 0)
3913 end = 0;
3914
3915 if (start == end)
3916 return (0);
3917
3918 if (start &#62; end)
3919 {
3920 int temp = start;
3921 start = end;
3922 end = temp;
3923 }
3924
3925 /* Tell readline that we are modifying the line,
3926 so it will save the undo information. */
3927 rl_modifying (start, end);
3928
3929 for (i = start; i != end; i++)
3930 {
3931 if (_rl_uppercase_p (rl_line_buffer[i]))
3932 rl_line_buffer[i] = _rl_to_lower (rl_line_buffer[i]);
3933 else if (_rl_lowercase_p (rl_line_buffer[i]))
3934 rl_line_buffer[i] = _rl_to_upper (rl_line_buffer[i]);
3935 }
3936 /* Move point to on top of the last character changed. */
3937 rl_point = (direction == 1) ? end - 1 : start;
3938 return (0);
3939}
3940</pre></td></tr></table></P><P>
3941
3942<A NAME="Readline Signal Handling"></A>
3943<HR SIZE="6">
3944<A NAME="SEC43"></A>
3945<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3946<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC42"> &lt; </A>]</TD>
3947<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> &gt; </A>]</TD>
3948<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> &lt;&lt; </A>]</TD>
3949<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
3950<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
3951<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3952<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3953<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3954<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3955</TR></TABLE>
3956<H2> 2.5 Readline Signal Handling </H2>
3957<!--docid::SEC43::-->
3958<P>
3959
3960Signals are asynchronous events sent to a process by the Unix kernel,
3961sometimes on behalf of another process. They are intended to indicate
3962exceptional events, like a user pressing the interrupt key on his terminal,
3963or a network connection being broken. There is a class of signals that can
3964be sent to the process currently reading input from the keyboard. Since
3965Readline changes the terminal attributes when it is called, it needs to
3966perform special processing when such a signal is received in order to
3967restore the terminal to a sane state, or provide application writers with
3968functions to do so manually.
3969</P><P>
3970
3971Readline contains an internal signal handler that is installed for a
3972number of signals (<CODE>SIGINT</CODE>, <CODE>SIGQUIT</CODE>, <CODE>SIGTERM</CODE>,
3973<CODE>SIGALRM</CODE>, <CODE>SIGTSTP</CODE>, <CODE>SIGTTIN</CODE>, and <CODE>SIGTTOU</CODE>).
3974When one of these signals is received, the signal handler
3975will reset the terminal attributes to those that were in effect before
3976<CODE>readline()</CODE> was called, reset the signal handling to what it was
3977before <CODE>readline()</CODE> was called, and resend the signal to the calling
3978application.
3979If and when the calling application's signal handler returns, Readline
3980will reinitialize the terminal and continue to accept input.
3981When a <CODE>SIGINT</CODE> is received, the Readline signal handler performs
3982some additional work, which will cause any partially-entered line to be
3983aborted (see the description of <CODE>rl_free_line_state()</CODE> below).
3984</P><P>
3985
3986There is an additional Readline signal handler, for <CODE>SIGWINCH</CODE>, which
3987the kernel sends to a process whenever the terminal's size changes (for
3988example, if a user resizes an <CODE>xterm</CODE>). The Readline <CODE>SIGWINCH</CODE>
3989handler updates Readline's internal screen size information, and then calls
3990any <CODE>SIGWINCH</CODE> signal handler the calling application has installed.
3991Readline calls the application's <CODE>SIGWINCH</CODE> signal handler without
3992resetting the terminal to its original state. If the application's signal
3993handler does more than update its idea of the terminal size and return (for
3994example, a <CODE>longjmp</CODE> back to a main processing loop), it <EM>must</EM>
3995call <CODE>rl_cleanup_after_signal()</CODE> (described below), to restore the
3996terminal state.
3997</P><P>
3998
3999Readline provides two variables that allow application writers to
4000control whether or not it will catch certain signals and act on them
4001when they are received. It is important that applications change the
4002values of these variables only when calling <CODE>readline()</CODE>, not in
4003a signal handler, so Readline's internal signal state is not corrupted.
4004</P><P>
4005
4006<A NAME="IDX301"></A>
4007<DL>
4008<DT><U>Variable:</U> int <B>rl_catch_signals</B>
4009<DD>If this variable is non-zero, Readline will install signal handlers for
4010<CODE>SIGINT</CODE>, <CODE>SIGQUIT</CODE>, <CODE>SIGTERM</CODE>, <CODE>SIGALRM</CODE>,
4011<CODE>SIGTSTP</CODE>, <CODE>SIGTTIN</CODE>, and <CODE>SIGTTOU</CODE>.
4012</P><P>
4013
4014The default value of <CODE>rl_catch_signals</CODE> is 1.
4015</DL>
4016</P><P>
4017
4018<A NAME="IDX302"></A>
4019<DL>
4020<DT><U>Variable:</U> int <B>rl_catch_sigwinch</B>
4021<DD>If this variable is non-zero, Readline will install a signal handler for
4022<CODE>SIGWINCH</CODE>.
4023</P><P>
4024
4025The default value of <CODE>rl_catch_sigwinch</CODE> is 1.
4026</DL>
4027</P><P>
4028
4029If an application does not wish to have Readline catch any signals, or
4030to handle signals other than those Readline catches (<CODE>SIGHUP</CODE>,
4031for example),
4032Readline provides convenience functions to do the necessary terminal
4033and internal state cleanup upon receipt of a signal.
4034</P><P>
4035
4036<A NAME="IDX303"></A>
4037<DL>
4038<DT><U>Function:</U> void <B>rl_cleanup_after_signal</B> <I>(void)</I>
4039<DD>This function will reset the state of the terminal to what it was before
4040<CODE>readline()</CODE> was called, and remove the Readline signal handlers for
4041all signals, depending on the values of <CODE>rl_catch_signals</CODE> and
4042<CODE>rl_catch_sigwinch</CODE>.
4043</DL>
4044</P><P>
4045
4046<A NAME="IDX304"></A>
4047<DL>
4048<DT><U>Function:</U> void <B>rl_free_line_state</B> <I>(void)</I>
4049<DD>This will free any partial state associated with the current input line
4050(undo information, any partial history entry, any partially-entered
4051keyboard macro, and any partially-entered numeric argument). This
4052should be called before <CODE>rl_cleanup_after_signal()</CODE>. The
4053Readline signal handler for <CODE>SIGINT</CODE> calls this to abort the
4054current input line.
4055</DL>
4056</P><P>
4057
4058<A NAME="IDX305"></A>
4059<DL>
4060<DT><U>Function:</U> void <B>rl_reset_after_signal</B> <I>(void)</I>
4061<DD>This will reinitialize the terminal and reinstall any Readline signal
4062handlers, depending on the values of <CODE>rl_catch_signals</CODE> and
4063<CODE>rl_catch_sigwinch</CODE>.
4064</DL>
4065</P><P>
4066
4067If an application does not wish Readline to catch <CODE>SIGWINCH</CODE>, it may
4068call <CODE>rl_resize_terminal()</CODE> or <CODE>rl_set_screen_size()</CODE> to force
4069Readline to update its idea of the terminal size when a <CODE>SIGWINCH</CODE>
4070is received.
4071</P><P>
4072
4073<A NAME="IDX306"></A>
4074<DL>
4075<DT><U>Function:</U> void <B>rl_resize_terminal</B> <I>(void)</I>
4076<DD>Update Readline's internal screen size by reading values from the kernel.
4077</DL>
4078</P><P>
4079
4080<A NAME="IDX307"></A>
4081<DL>
4082<DT><U>Function:</U> void <B>rl_set_screen_size</B> <I>(int rows, int cols)</I>
4083<DD>Set Readline's idea of the terminal size to <VAR>rows</VAR> rows and
4084<VAR>cols</VAR> columns.
4085</DL>
4086</P><P>
4087
4088If an application does not want to install a <CODE>SIGWINCH</CODE> handler, but
4089is still interested in the screen dimensions, Readline's idea of the screen
4090size may be queried.
4091</P><P>
4092
4093<A NAME="IDX308"></A>
4094<DL>
4095<DT><U>Function:</U> void <B>rl_get_screen_size</B> <I>(int *rows, int *cols)</I>
4096<DD>Return Readline's idea of the terminal's size in the
4097variables pointed to by the arguments.
4098</DL>
4099</P><P>
4100
4101The following functions install and remove Readline's signal handlers.
4102</P><P>
4103
4104<A NAME="IDX309"></A>
4105<DL>
4106<DT><U>Function:</U> int <B>rl_set_signals</B> <I>(void)</I>
4107<DD>Install Readline's signal handler for <CODE>SIGINT</CODE>, <CODE>SIGQUIT</CODE>,
4108<CODE>SIGTERM</CODE>, <CODE>SIGALRM</CODE>, <CODE>SIGTSTP</CODE>, <CODE>SIGTTIN</CODE>,
4109<CODE>SIGTTOU</CODE>, and <CODE>SIGWINCH</CODE>, depending on the values of
4110<CODE>rl_catch_signals</CODE> and <CODE>rl_catch_sigwinch</CODE>.
4111</DL>
4112</P><P>
4113
4114<A NAME="IDX310"></A>
4115<DL>
4116<DT><U>Function:</U> int <B>rl_clear_signals</B> <I>(void)</I>
4117<DD>Remove all of the Readline signal handlers installed by
4118<CODE>rl_set_signals()</CODE>.
4119</DL>
4120</P><P>
4121
4122<A NAME="Custom Completers"></A>
4123<HR SIZE="6">
4124<A NAME="SEC44"></A>
4125<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4126<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &lt; </A>]</TD>
4127<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC45"> &gt; </A>]</TD>
4128<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
4129<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
4130<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
4131<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
4132<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4133<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4134<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4135</TR></TABLE>
4136<H2> 2.6 Custom Completers </H2>
4137<!--docid::SEC44::-->
4138<P>
4139
4140Typically, a program that reads commands from the user has a way of
4141disambiguating commands and data. If your program is one of these, then
4142it can provide completion for commands, data, or both.
4143The following sections describe how your program and Readline
4144cooperate to provide this service.
4145</P><P>
4146
4147<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
4148<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC45">2.6.1 How Completing Works</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The logic used to do completion.</TD></TR>
4149<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC46">2.6.2 Completion Functions</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Functions provided by Readline.</TD></TR>
4150<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables which control completion.</TD></TR>
4151<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC48">2.6.4 A Short Completion Example</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">An example of writing completer subroutines.</TD></TR>
4152</TABLE></BLOCKQUOTE>
4153<P>
4154
4155<A NAME="How Completing Works"></A>
4156<HR SIZE="6">
4157<A NAME="SEC45"></A>
4158<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4159<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> &lt; </A>]</TD>
4160<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC46"> &gt; </A>]</TD>
4161<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
4162<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> Up </A>]</TD>
4163<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
4164<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
4165<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4166<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4167<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4168</TR></TABLE>
4169<H3> 2.6.1 How Completing Works </H3>
4170<!--docid::SEC45::-->
4171<P>
4172
4173In order to complete some text, the full list of possible completions
4174must be available. That is, it is not possible to accurately
4175expand a partial word without knowing all of the possible words
4176which make sense in that context. The Readline library provides
4177the user interface to completion, and two of the most common
4178completion functions: filename and username. For completing other types
4179of text, you must write your own completion function. This section
4180describes exactly what such functions must do, and provides an example.
4181</P><P>
4182
4183There are three major functions used to perform completion:
4184</P><P>
4185
4186<OL>
4187<LI>
4188The user-interface function <CODE>rl_complete()</CODE>. This function is
4189called with the same arguments as other bindable Readline functions:
4190<VAR>count</VAR> and <VAR>invoking_key</VAR>.
4191It isolates the word to be completed and calls
4192<CODE>rl_completion_matches()</CODE> to generate a list of possible completions.
4193It then either lists the possible completions, inserts the possible
4194completions, or actually performs the
4195completion, depending on which behavior is desired.
4196<P>
4197
4198<LI>
4199The internal function <CODE>rl_completion_matches()</CODE> uses an
4200application-supplied <EM>generator</EM> function to generate the list of
4201possible matches, and then returns the array of these matches.
4202The caller should place the address of its generator function in
4203<CODE>rl_completion_entry_function</CODE>.
4204<P>
4205
4206<LI>
4207The generator function is called repeatedly from
4208<CODE>rl_completion_matches()</CODE>, returning a string each time. The
4209arguments to the generator function are <VAR>text</VAR> and <VAR>state</VAR>.
4210<VAR>text</VAR> is the partial word to be completed. <VAR>state</VAR> is zero the
4211first time the function is called, allowing the generator to perform
4212any necessary initialization, and a positive non-zero integer for
4213each subsequent call. The generator function returns
4214<CODE>(char *)NULL</CODE> to inform <CODE>rl_completion_matches()</CODE> that there are
4215no more possibilities left. Usually the generator function computes the
4216list of possible completions when <VAR>state</VAR> is zero, and returns them
4217one at a time on subsequent calls. Each string the generator function
4218returns as a match must be allocated with <CODE>malloc()</CODE>; Readline
4219frees the strings when it has finished with them.
4220Such a generator function is referred to as an
4221<EM>application-specific completion function</EM>.
4222<P>
4223
4224</OL>
4225<P>
4226
4227<A NAME="IDX311"></A>
4228<DL>
4229<DT><U>Function:</U> int <B>rl_complete</B> <I>(int ignore, int invoking_key)</I>
4230<DD>Complete the word at or before point. You have supplied the function
4231that does the initial simple matching selection algorithm (see
4232<CODE>rl_completion_matches()</CODE>). The default is to do filename completion.
4233</DL>
4234</P><P>
4235
4236<A NAME="IDX312"></A>
4237<DL>
4238<DT><U>Variable:</U> rl_compentry_func_t * <B>rl_completion_entry_function</B>
4239<DD>This is a pointer to the generator function for
4240<CODE>rl_completion_matches()</CODE>.
4241If the value of <CODE>rl_completion_entry_function</CODE> is
4242<CODE>NULL</CODE> then the default filename generator
4243function, <CODE>rl_filename_completion_function()</CODE>, is used.
4244An <EM>application-specific completion function</EM> is a function whose
4245address is assigned to <CODE>rl_completion_entry_function</CODE> and whose
4246return values are used to generate possible completions.
4247</DL>
4248</P><P>
4249
4250<A NAME="Completion Functions"></A>
4251<HR SIZE="6">
4252<A NAME="SEC46"></A>
4253<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4254<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC45"> &lt; </A>]</TD>
4255<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC47"> &gt; </A>]</TD>
4256<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC47"> &lt;&lt; </A>]</TD>
4257<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> Up </A>]</TD>
4258<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
4259<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
4260<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4261<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4262<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4263</TR></TABLE>
4264<H3> 2.6.2 Completion Functions </H3>
4265<!--docid::SEC46::-->
4266<P>
4267
4268Here is the complete list of callable completion functions present in
4269Readline.
4270</P><P>
4271
4272<A NAME="IDX313"></A>
4273<DL>
4274<DT><U>Function:</U> int <B>rl_complete_internal</B> <I>(int what_to_do)</I>
4275<DD>Complete the word at or before point. <VAR>what_to_do</VAR> says what to do
4276with the completion. A value of <SAMP>`?'</SAMP> means list the possible
4277completions. <SAMP>`TAB'</SAMP> means do standard completion. <SAMP>`*'</SAMP> means
4278insert all of the possible completions. <SAMP>`!'</SAMP> means to display
4279all of the possible completions, if there is more than one, as well as
4280performing partial completion. <SAMP>`@'</SAMP> is similar to <SAMP>`!'</SAMP>, but
4281possible completions are not listed if the possible completions share
4282a common prefix.
4283</DL>
4284</P><P>
4285
4286<A NAME="IDX314"></A>
4287<DL>
4288<DT><U>Function:</U> int <B>rl_complete</B> <I>(int ignore, int invoking_key)</I>
4289<DD>Complete the word at or before point. You have supplied the function
4290that does the initial simple matching selection algorithm (see
4291<CODE>rl_completion_matches()</CODE> and <CODE>rl_completion_entry_function</CODE>).
4292The default is to do filename
4293completion. This calls <CODE>rl_complete_internal()</CODE> with an
4294argument depending on <VAR>invoking_key</VAR>.
4295</DL>
4296</P><P>
4297
4298<A NAME="IDX315"></A>
4299<DL>
4300<DT><U>Function:</U> int <B>rl_possible_completions</B> <I>(int count, int invoking_key)</I>
4301<DD>List the possible completions. See description of <CODE>rl_complete
4302()</CODE>. This calls <CODE>rl_complete_internal()</CODE> with an argument of
4303<SAMP>`?'</SAMP>.
4304</DL>
4305</P><P>
4306
4307<A NAME="IDX316"></A>
4308<DL>
4309<DT><U>Function:</U> int <B>rl_insert_completions</B> <I>(int count, int invoking_key)</I>
4310<DD>Insert the list of possible completions into the line, deleting the
4311partially-completed word. See description of <CODE>rl_complete()</CODE>.
4312This calls <CODE>rl_complete_internal()</CODE> with an argument of <SAMP>`*'</SAMP>.
4313</DL>
4314</P><P>
4315
4316<A NAME="IDX317"></A>
4317<DL>
4318<DT><U>Function:</U> int <B>rl_completion_mode</B> <I>(rl_command_func_t *cfunc)</I>
4319<DD>Returns the apppriate value to pass to <CODE>rl_complete_internal()</CODE>
4320depending on whether <VAR>cfunc</VAR> was called twice in succession and
4321the values of the <CODE>show-all-if-ambiguous</CODE> and
4322<CODE>show-all-if-unmodified</CODE> variables.
4323Application-specific completion functions may use this function to present
4324the same interface as <CODE>rl_complete()</CODE>.
4325</DL>
4326</P><P>
4327
4328<A NAME="IDX318"></A>
4329<DL>
4330<DT><U>Function:</U> char ** <B>rl_completion_matches</B> <I>(const char *text, rl_compentry_func_t *entry_func)</I>
4331<DD>Returns an array of strings which is a list of completions for
4332<VAR>text</VAR>. If there are no completions, returns <CODE>NULL</CODE>.
4333The first entry in the returned array is the substitution for <VAR>text</VAR>.
4334The remaining entries are the possible completions. The array is
4335terminated with a <CODE>NULL</CODE> pointer.
4336</P><P>
4337
4338<VAR>entry_func</VAR> is a function of two args, and returns a
4339<CODE>char *</CODE>. The first argument is <VAR>text</VAR>. The second is a
4340state argument; it is zero on the first call, and non-zero on subsequent
4341calls. <VAR>entry_func</VAR> returns a <CODE>NULL</CODE> pointer to the caller
4342when there are no more matches.
4343</DL>
4344</P><P>
4345
4346<A NAME="IDX319"></A>
4347<DL>
4348<DT><U>Function:</U> char * <B>rl_filename_completion_function</B> <I>(const char *text, int state)</I>
4349<DD>A generator function for filename completion in the general case.
4350<VAR>text</VAR> is a partial filename.
4351The Bash source is a useful reference for writing application-specific
4352completion functions (the Bash completion functions call this and other
4353Readline functions).
4354</DL>
4355</P><P>
4356
4357<A NAME="IDX320"></A>
4358<DL>
4359<DT><U>Function:</U> char * <B>rl_username_completion_function</B> <I>(const char *text, int state)</I>
4360<DD>A completion generator for usernames. <VAR>text</VAR> contains a partial
4361username preceded by a random character (usually <SAMP>`~'</SAMP>). As with all
4362completion generators, <VAR>state</VAR> is zero on the first call and non-zero
4363for subsequent calls.
4364</DL>
4365</P><P>
4366
4367<A NAME="Completion Variables"></A>
4368<HR SIZE="6">
4369<A NAME="SEC47"></A>
4370<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4371<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC46"> &lt; </A>]</TD>
4372<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC48"> &gt; </A>]</TD>
4373<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC48"> &lt;&lt; </A>]</TD>
4374<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> Up </A>]</TD>
4375<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
4376<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
4377<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4378<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4379<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4380</TR></TABLE>
4381<H3> 2.6.3 Completion Variables </H3>
4382<!--docid::SEC47::-->
4383<P>
4384
4385<A NAME="IDX321"></A>
4386<DL>
4387<DT><U>Variable:</U> rl_compentry_func_t * <B>rl_completion_entry_function</B>
4388<DD>A pointer to the generator function for <CODE>rl_completion_matches()</CODE>.
4389<CODE>NULL</CODE> means to use <CODE>rl_filename_completion_function()</CODE>,
4390the default filename completer.
4391</DL>
4392</P><P>
4393
4394<A NAME="IDX322"></A>
4395<DL>
4396<DT><U>Variable:</U> rl_completion_func_t * <B>rl_attempted_completion_function</B>
4397<DD>A pointer to an alternative function to create matches.
4398The function is called with <VAR>text</VAR>, <VAR>start</VAR>, and <VAR>end</VAR>.
4399<VAR>start</VAR> and <VAR>end</VAR> are indices in <CODE>rl_line_buffer</CODE> defining
4400the boundaries of <VAR>text</VAR>, which is a character string.
4401If this function exists and returns <CODE>NULL</CODE>, or if this variable is
4402set to <CODE>NULL</CODE>, then <CODE>rl_complete()</CODE> will call the value of
4403<CODE>rl_completion_entry_function</CODE> to generate matches, otherwise the
4404array of strings returned will be used.
4405If this function sets the <CODE>rl_attempted_completion_over</CODE>
4406variable to a non-zero value, Readline will not perform its default
4407completion even if this function returns no matches.
4408</DL>
4409</P><P>
4410
4411<A NAME="IDX323"></A>
4412<DL>
4413<DT><U>Variable:</U> rl_quote_func_t * <B>rl_filename_quoting_function</B>
4414<DD>A pointer to a function that will quote a filename in an
4415application-specific fashion. This is called if filename completion is being
4416attempted and one of the characters in <CODE>rl_filename_quote_characters</CODE>
4417appears in a completed filename. The function is called with
4418<VAR>text</VAR>, <VAR>match_type</VAR>, and <VAR>quote_pointer</VAR>. The <VAR>text</VAR>
4419is the filename to be quoted. The <VAR>match_type</VAR> is either
4420<CODE>SINGLE_MATCH</CODE>, if there is only one completion match, or
4421<CODE>MULT_MATCH</CODE>. Some functions use this to decide whether or not to
4422insert a closing quote character. The <VAR>quote_pointer</VAR> is a pointer
4423to any opening quote character the user typed. Some functions choose
4424to reset this character.
4425</DL>
4426</P><P>
4427
4428<A NAME="IDX324"></A>
4429<DL>
4430<DT><U>Variable:</U> rl_dequote_func_t * <B>rl_filename_dequoting_function</B>
4431<DD>A pointer to a function that will remove application-specific quoting
4432characters from a filename before completion is attempted, so those
4433characters do not interfere with matching the text against names in
4434the filesystem. It is called with <VAR>text</VAR>, the text of the word
4435to be dequoted, and <VAR>quote_char</VAR>, which is the quoting character
4436that delimits the filename (usually <SAMP>`''</SAMP> or <SAMP>`"'</SAMP>). If
4437<VAR>quote_char</VAR> is zero, the filename was not in an embedded string.
4438</DL>
4439</P><P>
4440
4441<A NAME="IDX325"></A>
4442<DL>
4443<DT><U>Variable:</U> rl_linebuf_func_t * <B>rl_char_is_quoted_p</B>
4444<DD>A pointer to a function to call that determines whether or not a specific
4445character in the line buffer is quoted, according to whatever quoting
4446mechanism the program calling Readline uses. The function is called with
4447two arguments: <VAR>text</VAR>, the text of the line, and <VAR>index</VAR>, the
4448index of the character in the line. It is used to decide whether a
4449character found in <CODE>rl_completer_word_break_characters</CODE> should be
4450used to break words for the completer.
4451</DL>
4452</P><P>
4453
4454<A NAME="IDX326"></A>
4455<DL>
4456<DT><U>Variable:</U> rl_compignore_func_t * <B>rl_ignore_some_completions_function</B>
4457<DD>This function, if defined, is called by the completer when real filename
4458completion is done, after all the matching names have been generated.
4459It is passed a <CODE>NULL</CODE> terminated array of matches.
4460The first element (<CODE>matches[0]</CODE>) is the
4461maximal substring common to all matches. This function can
4462re-arrange the list of matches as required, but each element deleted
4463from the array must be freed.
4464</DL>
4465</P><P>
4466
4467<A NAME="IDX327"></A>
4468<DL>
4469<DT><U>Variable:</U> rl_icppfunc_t * <B>rl_directory_completion_hook</B>
4470<DD>This function, if defined, is allowed to modify the directory portion
4471of filenames Readline completes. It is called with the address of a
4472string (the current directory name) as an argument, and may modify that string.
4473If the string is replaced with a new string, the old value should be freed.
4474Any modified directory name should have a trailing slash.
4475The modified value will be displayed as part of the completion, replacing
4476the directory portion of the pathname the user typed.
4477It returns an integer that should be non-zero if the function modifies
4478its directory argument.
4479It could be used to expand symbolic links or shell variables in pathnames.
4480</DL>
4481</P><P>
4482
4483<A NAME="IDX328"></A>
4484<DL>
4485<DT><U>Variable:</U> rl_compdisp_func_t * <B>rl_completion_display_matches_hook</B>
4486<DD>If non-zero, then this is the address of a function to call when
4487completing a word would normally display the list of possible matches.
4488This function is called in lieu of Readline displaying the list.
4489It takes three arguments:
4490(<CODE>char **</CODE><VAR>matches</VAR>, <CODE>int</CODE> <VAR>num_matches</VAR>, <CODE>int</CODE> <VAR>max_length</VAR>)
4491where <VAR>matches</VAR> is the array of matching strings,
4492<VAR>num_matches</VAR> is the number of strings in that array, and
4493<VAR>max_length</VAR> is the length of the longest string in that array.
4494Readline provides a convenience function, <CODE>rl_display_match_list</CODE>,
4495that takes care of doing the display to Readline's output stream. That
4496function may be called from this hook.
4497</DL>
4498</P><P>
4499
4500<A NAME="IDX329"></A>
4501<DL>
4502<DT><U>Variable:</U> const char * <B>rl_basic_word_break_characters</B>
4503<DD>The basic list of characters that signal a break between words for the
4504completer routine. The default value of this variable is the characters
4505which break words for completion in Bash:
4506<CODE>" \t\n\"\\'`@$>&#60;=;|&#38;{("</CODE>.
4507</DL>
4508</P><P>
4509
4510<A NAME="IDX330"></A>
4511<DL>
4512<DT><U>Variable:</U> const char * <B>rl_basic_quote_characters</B>
4513<DD>A list of quote characters which can cause a word break.
4514</DL>
4515</P><P>
4516
4517<A NAME="IDX331"></A>
4518<DL>
4519<DT><U>Variable:</U> const char * <B>rl_completer_word_break_characters</B>
4520<DD>The list of characters that signal a break between words for
4521<CODE>rl_complete_internal()</CODE>. The default list is the value of
4522<CODE>rl_basic_word_break_characters</CODE>.
4523</DL>
4524</P><P>
4525
4526<A NAME="IDX332"></A>
4527<DL>
4528<DT><U>Variable:</U> rl_cpvfunc_t * <B>rl_completion_word_break_hook</B>
4529<DD>If non-zero, this is the address of a function to call when Readline is
4530deciding where to separate words for word completion. It should return
4531a character string like <CODE>rl_completer_word_break_characters</CODE> to be
4532used to perform the current completion. The function may choose to set
4533<CODE>rl_completer_word_break_characters</CODE> itself. If the function
4534returns <CODE>NULL</CODE>, <CODE>rl_completer_word_break_characters</CODE> is used.
4535</DL>
4536</P><P>
4537
4538<A NAME="IDX333"></A>
4539<DL>
4540<DT><U>Variable:</U> const char * <B>rl_completer_quote_characters</B>
4541<DD>A list of characters which can be used to quote a substring of the line.
4542Completion occurs on the entire substring, and within the substring
4543<CODE>rl_completer_word_break_characters</CODE> are treated as any other character,
4544unless they also appear within this list.
4545</DL>
4546</P><P>
4547
4548<A NAME="IDX334"></A>
4549<DL>
4550<DT><U>Variable:</U> const char * <B>rl_filename_quote_characters</B>
4551<DD>A list of characters that cause a filename to be quoted by the completer
4552when they appear in a completed filename. The default is the null string.
4553</DL>
4554</P><P>
4555
4556<A NAME="IDX335"></A>
4557<DL>
4558<DT><U>Variable:</U> const char * <B>rl_special_prefixes</B>
4559<DD>The list of characters that are word break characters, but should be
4560left in <VAR>text</VAR> when it is passed to the completion function.
4561Programs can use this to help determine what kind of completing to do.
4562For instance, Bash sets this variable to "$@" so that it can complete
4563shell variables and hostnames.
4564</DL>
4565</P><P>
4566
4567<A NAME="IDX336"></A>
4568<DL>
4569<DT><U>Variable:</U> int <B>rl_completion_query_items</B>
4570<DD>Up to this many items will be displayed in response to a
4571possible-completions call. After that, we ask the user if she is sure
4572she wants to see them all. The default value is 100.
4573</DL>
4574</P><P>
4575
4576<A NAME="IDX337"></A>
4577<DL>
4578<DT><U>Variable:</U> int <B>rl_completion_append_character</B>
4579<DD>When a single completion alternative matches at the end of the command
4580line, this character is appended to the inserted completion text. The
4581default is a space character (<SAMP>` '</SAMP>). Setting this to the null
4582character (<SAMP>`\0'</SAMP>) prevents anything being appended automatically.
4583This can be changed in application-specific completion functions to
4584provide the "most sensible word separator character" according to
4585an application-specific command line syntax specification.
4586</DL>
4587</P><P>
4588
4589<A NAME="IDX338"></A>
4590<DL>
4591<DT><U>Variable:</U> int <B>rl_completion_suppress_append</B>
4592<DD>If non-zero, <VAR>rl_completion_append_character</VAR> is not appended to
4593matches at the end of the command line, as described above.
4594It is set to 0 before any application-specific completion function
4595is called, and may only be changed within such a function.
4596</DL>
4597</P><P>
4598
4599<A NAME="IDX339"></A>
4600<DL>
4601<DT><U>Variable:</U> int <B>rl_completion_quote_character</B>
4602<DD>When Readline is completing quoted text, as delimited by one of the
4603characters in <VAR>rl_completer_quote_characters</VAR>, it sets this variable
4604to the quoting character found.
4605This is set before any application-specific completion function is called.
4606</DL>
4607</P><P>
4608
4609<A NAME="IDX340"></A>
4610<DL>
4611<DT><U>Variable:</U> int <B>rl_completion_suppress_quote</B>
4612<DD>If non-zero, Readline does not append a matching quote character when
4613performing completion on a quoted string.
4614It is set to 0 before any application-specific completion function
4615is called, and may only be changed within such a function.
4616</DL>
4617</P><P>
4618
4619<A NAME="IDX341"></A>
4620<DL>
4621<DT><U>Variable:</U> int <B>rl_completion_found_quote</B>
4622<DD>When Readline is completing quoted text, it sets this variable
4623to a non-zero value if the word being completed contains or is delimited
4624by any quoting characters, including backslashes.
4625This is set before any application-specific completion function is called.
4626</DL>
4627</P><P>
4628
4629<A NAME="IDX342"></A>
4630<DL>
4631<DT><U>Variable:</U> int <B>rl_completion_mark_symlink_dirs</B>
4632<DD>If non-zero, a slash will be appended to completed filenames that are
4633symbolic links to directory names, subject to the value of the
4634user-settable <VAR>mark-directories</VAR> variable.
4635This variable exists so that application-specific completion functions
4636can override the user's global preference (set via the
4637<VAR>mark-symlinked-directories</VAR> Readline variable) if appropriate.
4638This variable is set to the user's preference before any
4639application-specific completion function is called, so unless that
4640function modifies the value, the user's preferences are honored.
4641</DL>
4642</P><P>
4643
4644<A NAME="IDX343"></A>
4645<DL>
4646<DT><U>Variable:</U> int <B>rl_ignore_completion_duplicates</B>
4647<DD>If non-zero, then duplicates in the matches are removed.
4648The default is 1.
4649</DL>
4650</P><P>
4651
4652<A NAME="IDX344"></A>
4653<DL>
4654<DT><U>Variable:</U> int <B>rl_filename_completion_desired</B>
4655<DD>Non-zero means that the results of the matches are to be treated as
4656filenames. This is <EM>always</EM> zero when completion is attempted,
4657and can only be changed
4658within an application-specific completion function. If it is set to a
4659non-zero value by such a function, directory names have a slash appended
4660and Readline attempts to quote completed filenames if they contain any
4661characters in <CODE>rl_filename_quote_characters</CODE> and
4662<CODE>rl_filename_quoting_desired</CODE> is set to a non-zero value.
4663</DL>
4664</P><P>
4665
4666<A NAME="IDX345"></A>
4667<DL>
4668<DT><U>Variable:</U> int <B>rl_filename_quoting_desired</B>
4669<DD>Non-zero means that the results of the matches are to be quoted using
4670double quotes (or an application-specific quoting mechanism) if the
4671completed filename contains any characters in
4672<CODE>rl_filename_quote_chars</CODE>. This is <EM>always</EM> non-zero
4673when completion is attempted, and can only be changed within an
4674application-specific completion function.
4675The quoting is effected via a call to the function pointed to
4676by <CODE>rl_filename_quoting_function</CODE>.
4677</DL>
4678</P><P>
4679
4680<A NAME="IDX346"></A>
4681<DL>
4682<DT><U>Variable:</U> int <B>rl_attempted_completion_over</B>
4683<DD>If an application-specific completion function assigned to
4684<CODE>rl_attempted_completion_function</CODE> sets this variable to a non-zero
4685value, Readline will not perform its default filename completion even
4686if the application's completion function returns no matches.
4687It should be set only by an application's completion function.
4688</DL>
4689</P><P>
4690
4691<A NAME="IDX347"></A>
4692<DL>
4693<DT><U>Variable:</U> int <B>rl_completion_type</B>
4694<DD>Set to a character describing the type of completion Readline is currently
4695attempting; see the description of <CODE>rl_complete_internal()</CODE>
4696(see section <A HREF="readline.html#SEC46">2.6.2 Completion Functions</A>) for the list of characters.
4697This is set to the appropriate value before any application-specific
4698completion function is called, allowing such functions to present
4699the same interface as <CODE>rl_complete()</CODE>.
4700</DL>
4701</P><P>
4702
4703<A NAME="IDX348"></A>
4704<DL>
4705<DT><U>Variable:</U> int <B>rl_inhibit_completion</B>
4706<DD>If this variable is non-zero, completion is inhibited. The completion
4707character will be inserted as any other bound to <CODE>self-insert</CODE>.
4708</DL>
4709</P><P>
4710
4711<A NAME="A Short Completion Example"></A>
4712<HR SIZE="6">
4713<A NAME="SEC48"></A>
4714<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4715<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC47"> &lt; </A>]</TD>
4716<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt; </A>]</TD>
4717<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
4718<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> Up </A>]</TD>
4719<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
4720<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
4721<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4722<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4723<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4724</TR></TABLE>
4725<H3> 2.6.4 A Short Completion Example </H3>
4726<!--docid::SEC48::-->
4727<P>
4728
4729Here is a small application demonstrating the use of the GNU Readline
4730library. It is called <CODE>fileman</CODE>, and the source code resides in
4731<TT>`examples/fileman.c'</TT>. This sample application provides
4732completion of command names, line editing features, and access to the
4733history list.
4734</P><P>
4735
4736<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>/* fileman.c -- A tiny application which demonstrates how to use the
4737 GNU Readline library. This application interactively allows users
4738 to manipulate files and their modes. */
4739
4740#include &#60;stdio.h&#62;
4741#include &#60;sys/types.h&#62;
4742#include &#60;sys/file.h&#62;
4743#include &#60;sys/stat.h&#62;
4744#include &#60;sys/errno.h&#62;
4745
4746#include &#60;readline/readline.h&#62;
4747#include &#60;readline/history.h&#62;
4748
4749extern char *xmalloc ();
4750
4751/* The names of functions that actually do the manipulation. */
4752int com_list __P((char *));
4753int com_view __P((char *));
4754int com_rename __P((char *));
4755int com_stat __P((char *));
4756int com_pwd __P((char *));
4757int com_delete __P((char *));
4758int com_help __P((char *));
4759int com_cd __P((char *));
4760int com_quit __P((char *));
4761
4762/* A structure which contains information on the commands this program
4763 can understand. */
4764
4765typedef struct {
4766 char *name; /* User printable name of the function. */
4767 rl_icpfunc_t *func; /* Function to call to do the job. */
4768 char *doc; /* Documentation for this function. */
4769} COMMAND;
4770
4771COMMAND commands[] = {
4772 { "cd", com_cd, "Change to directory DIR" },
4773 { "delete", com_delete, "Delete FILE" },
4774 { "help", com_help, "Display this text" },
4775 { "?", com_help, "Synonym for `help'" },
4776 { "list", com_list, "List files in DIR" },
4777 { "ls", com_list, "Synonym for `list'" },
4778 { "pwd", com_pwd, "Print the current working directory" },
4779 { "quit", com_quit, "Quit using Fileman" },
4780 { "rename", com_rename, "Rename FILE to NEWNAME" },
4781 { "stat", com_stat, "Print out statistics on FILE" },
4782 { "view", com_view, "View the contents of FILE" },
4783 { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL }
4784};
4785
4786/* Forward declarations. */
4787char *stripwhite ();
4788COMMAND *find_command ();
4789
4790/* The name of this program, as taken from argv[0]. */
4791char *progname;
4792
4793/* When non-zero, this means the user is done using this program. */
4794int done;
4795
4796char *
4797dupstr (s)
4798 int s;
4799{
4800 char *r;
4801
4802 r = xmalloc (strlen (s) + 1);
4803 strcpy (r, s);
4804 return (r);
4805}
4806
4807main (argc, argv)
4808 int argc;
4809 char **argv;
4810{
4811 char *line, *s;
4812
4813 progname = argv[0];
4814
4815 initialize_readline (); /* Bind our completer. */
4816
4817 /* Loop reading and executing lines until the user quits. */
4818 for ( ; done == 0; )
4819 {
4820 line = readline ("FileMan: ");
4821
4822 if (!line)
4823 break;
4824
4825 /* Remove leading and trailing whitespace from the line.
4826 Then, if there is anything left, add it to the history list
4827 and execute it. */
4828 s = stripwhite (line);
4829
4830 if (*s)
4831 {
4832 add_history (s);
4833 execute_line (s);
4834 }
4835
4836 free (line);
4837 }
4838 exit (0);
4839}
4840
4841/* Execute a command line. */
4842int
4843execute_line (line)
4844 char *line;
4845{
4846 register int i;
4847 COMMAND *command;
4848 char *word;
4849
4850 /* Isolate the command word. */
4851 i = 0;
4852 while (line[i] &#38;&#38; whitespace (line[i]))
4853 i++;
4854 word = line + i;
4855
4856 while (line[i] &#38;&#38; !whitespace (line[i]))
4857 i++;
4858
4859 if (line[i])
4860 line[i++] = '\0';
4861
4862 command = find_command (word);
4863
4864 if (!command)
4865 {
4866 fprintf (stderr, "%s: No such command for FileMan.\n", word);
4867 return (-1);
4868 }
4869
4870 /* Get argument to command, if any. */
4871 while (whitespace (line[i]))
4872 i++;
4873
4874 word = line + i;
4875
4876 /* Call the function. */
4877 return ((*(command-&#62;func)) (word));
4878}
4879
4880/* Look up NAME as the name of a command, and return a pointer to that
4881 command. Return a NULL pointer if NAME isn't a command name. */
4882COMMAND *
4883find_command (name)
4884 char *name;
4885{
4886 register int i;
4887
4888 for (i = 0; commands[i].name; i++)
4889 if (strcmp (name, commands[i].name) == 0)
4890 return (&#38;commands[i]);
4891
4892 return ((COMMAND *)NULL);
4893}
4894
4895/* Strip whitespace from the start and end of STRING. Return a pointer
4896 into STRING. */
4897char *
4898stripwhite (string)
4899 char *string;
4900{
4901 register char *s, *t;
4902
4903 for (s = string; whitespace (*s); s++)
4904 ;
4905
4906 if (*s == 0)
4907 return (s);
4908
4909 t = s + strlen (s) - 1;
4910 while (t &#62; s &#38;&#38; whitespace (*t))
4911 t--;
4912 *++t = '\0';
4913
4914 return s;
4915}
4916
4917/* **************************************************************** */
4918/* */
4919/* Interface to Readline Completion */
4920/* */
4921/* **************************************************************** */
4922
4923char *command_generator __P((const char *, int));
4924char **fileman_completion __P((const char *, int, int));
4925
4926/* Tell the GNU Readline library how to complete. We want to try to
4927 complete on command names if this is the first word in the line, or
4928 on filenames if not. */
4929initialize_readline ()
4930{
4931 /* Allow conditional parsing of the ~/.inputrc file. */
4932 rl_readline_name = "FileMan";
4933
4934 /* Tell the completer that we want a crack first. */
4935 rl_attempted_completion_function = fileman_completion;
4936}
4937
4938/* Attempt to complete on the contents of TEXT. START and END
4939 bound the region of rl_line_buffer that contains the word to
4940 complete. TEXT is the word to complete. We can use the entire
4941 contents of rl_line_buffer in case we want to do some simple
4942 parsing. Returnthe array of matches, or NULL if there aren't any. */
4943char **
4944fileman_completion (text, start, end)
4945 const char *text;
4946 int start, end;
4947{
4948 char **matches;
4949
4950 matches = (char **)NULL;
4951
4952 /* If this word is at the start of the line, then it is a command
4953 to complete. Otherwise it is the name of a file in the current
4954 directory. */
4955 if (start == 0)
4956 matches = rl_completion_matches (text, command_generator);
4957
4958 return (matches);
4959}
4960
4961/* Generator function for command completion. STATE lets us
4962 know whether to start from scratch; without any state
4963 (i.e. STATE == 0), then we start at the top of the list. */
4964char *
4965command_generator (text, state)
4966 const char *text;
4967 int state;
4968{
4969 static int list_index, len;
4970 char *name;
4971
4972 /* If this is a new word to complete, initialize now. This
4973 includes saving the length of TEXT for efficiency, and
4974 initializing the index variable to 0. */
4975 if (!state)
4976 {
4977 list_index = 0;
4978 len = strlen (text);
4979 }
4980
4981 /* Return the next name which partially matches from the
4982 command list. */
4983 while (name = commands[list_index].name)
4984 {
4985 list_index++;
4986
4987 if (strncmp (name, text, len) == 0)
4988 return (dupstr(name));
4989 }
4990
4991 /* If no names matched, then return NULL. */
4992 return ((char *)NULL);
4993}
4994
4995/* **************************************************************** */
4996/* */
4997/* FileMan Commands */
4998/* */
4999/* **************************************************************** */
5000
5001/* String to pass to system (). This is for the LIST, VIEW and RENAME
5002 commands. */
5003static char syscom[1024];
5004
5005/* List the file(s) named in arg. */
5006com_list (arg)
5007 char *arg;
5008{
5009 if (!arg)
5010 arg = "";
5011
5012 sprintf (syscom, "ls -FClg %s", arg);
5013 return (system (syscom));
5014}
5015
5016com_view (arg)
5017 char *arg;
5018{
5019 if (!valid_argument ("view", arg))
5020 return 1;
5021
5022 sprintf (syscom, "more %s", arg);
5023 return (system (syscom));
5024}
5025
5026com_rename (arg)
5027 char *arg;
5028{
5029 too_dangerous ("rename");
5030 return (1);
5031}
5032
5033com_stat (arg)
5034 char *arg;
5035{
5036 struct stat finfo;
5037
5038 if (!valid_argument ("stat", arg))
5039 return (1);
5040
5041 if (stat (arg, &#38;finfo) == -1)
5042 {
5043 perror (arg);
5044 return (1);
5045 }
5046
5047 printf ("Statistics for `%s':\n", arg);
5048
5049 printf ("%s has %d link%s, and is %d byte%s in length.\n", arg,
5050 finfo.st_nlink,
5051 (finfo.st_nlink == 1) ? "" : "s",
5052 finfo.st_size,
5053 (finfo.st_size == 1) ? "" : "s");
5054 printf ("Inode Last Change at: %s", ctime (&#38;finfo.st_ctime));
5055 printf (" Last access at: %s", ctime (&#38;finfo.st_atime));
5056 printf (" Last modified at: %s", ctime (&#38;finfo.st_mtime));
5057 return (0);
5058}
5059
5060com_delete (arg)
5061 char *arg;
5062{
5063 too_dangerous ("delete");
5064 return (1);
5065}
5066
5067/* Print out help for ARG, or for all of the commands if ARG is
5068 not present. */
5069com_help (arg)
5070 char *arg;
5071{
5072 register int i;
5073 int printed = 0;
5074
5075 for (i = 0; commands[i].name; i++)
5076 {
5077 if (!*arg || (strcmp (arg, commands[i].name) == 0))
5078 {
5079 printf ("%s\t\t%s.\n", commands[i].name, commands[i].doc);
5080 printed++;
5081 }
5082 }
5083
5084 if (!printed)
5085 {
5086 printf ("No commands match `%s'. Possibilties are:\n", arg);
5087
5088 for (i = 0; commands[i].name; i++)
5089 {
5090 /* Print in six columns. */
5091 if (printed == 6)
5092 {
5093 printed = 0;
5094 printf ("\n");
5095 }
5096
5097 printf ("%s\t", commands[i].name);
5098 printed++;
5099 }
5100
5101 if (printed)
5102 printf ("\n");
5103 }
5104 return (0);
5105}
5106
5107/* Change to the directory ARG. */
5108com_cd (arg)
5109 char *arg;
5110{
5111 if (chdir (arg) == -1)
5112 {
5113 perror (arg);
5114 return 1;
5115 }
5116
5117 com_pwd ("");
5118 return (0);
5119}
5120
5121/* Print out the current working directory. */
5122com_pwd (ignore)
5123 char *ignore;
5124{
5125 char dir[1024], *s;
5126
5127 s = getcwd (dir, sizeof(dir) - 1);
5128 if (s == 0)
5129 {
5130 printf ("Error getting pwd: %s\n", dir);
5131 return 1;
5132 }
5133
5134 printf ("Current directory is %s\n", dir);
5135 return 0;
5136}
5137
5138/* The user wishes to quit using this program. Just set DONE
5139 non-zero. */
5140com_quit (arg)
5141 char *arg;
5142{
5143 done = 1;
5144 return (0);
5145}
5146
5147/* Function which tells you that you can't do this. */
5148too_dangerous (caller)
5149 char *caller;
5150{
5151 fprintf (stderr,
5152 "%s: Too dangerous for me to distribute.\n"
5153 caller);
5154 fprintf (stderr, "Write it yourself.\n");
5155}
5156
5157/* Return non-zero if ARG is a valid argument for CALLER,
5158 else print an error message and return zero. */
5159int
5160valid_argument (caller, arg)
5161 char *caller, *arg;
5162{
5163 if (!arg || !*arg)
5164 {
5165 fprintf (stderr, "%s: Argument required.\n", caller);
5166 return (0);
5167 }
5168
5169 return (1);
5170}
5171</FONT></pre></td></tr></table></P><P>
5172
5173<A NAME="Copying This Manual"></A>
5174<HR SIZE="6">
5175<A NAME="SEC49"></A>
5176<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5177<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC48"> &lt; </A>]</TD>
5178<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> &gt; </A>]</TD>
5179<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> &lt;&lt; </A>]</TD>
5180<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> Up </A>]</TD>
5181<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
5182<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
5183<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5184<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5185<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5186</TR></TABLE>
5187<H1> A. Copying This Manual </H1>
5188<!--docid::SEC49::-->
5189<P>
5190
5191<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
5192<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC50">A.1 GNU Free Documentation License</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">License for copying this manual.</TD></TR>
5193</TABLE></BLOCKQUOTE>
5194<P>
5195
5196<A NAME="GNU Free Documentation License"></A>
5197<HR SIZE="6">
5198<A NAME="SEC50"></A>
5199<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5200<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &lt; </A>]</TD>
5201<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC51"> &gt; </A>]</TD>
5202<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &lt;&lt; </A>]</TD>
5203<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> Up </A>]</TD>
5204<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
5205<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
5206<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5207<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5208<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5209</TR></TABLE>
5210<H2> A.1 GNU Free Documentation License </H2>
5211<!--docid::SEC50::-->
5212<P>
5213
5214<A NAME="IDX349"></A>
5215<center>
5216 Version 1.2, November 2002
5217</center>
5218</P><P>
5219
5220<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
522159 Temple Place, Suite 330, Boston, MA 02111-1307, USA
5222
5223Everyone is permitted to copy and distribute verbatim copies
5224of this license document, but changing it is not allowed.
5225</pre></td></tr></table></P><P>
5226
5227<OL>
5228<LI>
5229PREAMBLE
5230<P>
5231
5232The purpose of this License is to make a manual, textbook, or other
5233functional and useful document <EM>free</EM> in the sense of freedom: to
5234assure everyone the effective freedom to copy and redistribute it,
5235with or without modifying it, either commercially or noncommercially.
5236Secondarily, this License preserves for the author and publisher a way
5237to get credit for their work, while not being considered responsible
5238for modifications made by others.
5239</P><P>
5240
5241This License is a kind of "copyleft", which means that derivative
5242works of the document must themselves be free in the same sense. It
5243complements the GNU General Public License, which is a copyleft
5244license designed for free software.
5245</P><P>
5246
5247We have designed this License in order to use it for manuals for free
5248software, because free software needs free documentation: a free
5249program should come with manuals providing the same freedoms that the
5250software does. But this License is not limited to software manuals;
5251it can be used for any textual work, regardless of subject matter or
5252whether it is published as a printed book. We recommend this License
5253principally for works whose purpose is instruction or reference.
5254</P><P>
5255
5256<LI>
5257APPLICABILITY AND DEFINITIONS
5258<P>
5259
5260This License applies to any manual or other work, in any medium, that
5261contains a notice placed by the copyright holder saying it can be
5262distributed under the terms of this License. Such a notice grants a
5263world-wide, royalty-free license, unlimited in duration, to use that
5264work under the conditions stated herein. The "Document", below,
5265refers to any such manual or work. Any member of the public is a
5266licensee, and is addressed as "you". You accept the license if you
5267copy, modify or distribute the work in a way requiring permission
5268under copyright law.
5269</P><P>
5270
5271A "Modified Version" of the Document means any work containing the
5272Document or a portion of it, either copied verbatim, or with
5273modifications and/or translated into another language.
5274</P><P>
5275
5276A "Secondary Section" is a named appendix or a front-matter section
5277of the Document that deals exclusively with the relationship of the
5278publishers or authors of the Document to the Document's overall
5279subject (or to related matters) and contains nothing that could fall
5280directly within that overall subject. (Thus, if the Document is in
5281part a textbook of mathematics, a Secondary Section may not explain
5282any mathematics.) The relationship could be a matter of historical
5283connection with the subject or with related matters, or of legal,
5284commercial, philosophical, ethical or political position regarding
5285them.
5286</P><P>
5287
5288The "Invariant Sections" are certain Secondary Sections whose titles
5289are designated, as being those of Invariant Sections, in the notice
5290that says that the Document is released under this License. If a
5291section does not fit the above definition of Secondary then it is not
5292allowed to be designated as Invariant. The Document may contain zero
5293Invariant Sections. If the Document does not identify any Invariant
5294Sections then there are none.
5295</P><P>
5296
5297The "Cover Texts" are certain short passages of text that are listed,
5298as Front-Cover Texts or Back-Cover Texts, in the notice that says that
5299the Document is released under this License. A Front-Cover Text may
5300be at most 5 words, and a Back-Cover Text may be at most 25 words.
5301</P><P>
5302
5303A "Transparent" copy of the Document means a machine-readable copy,
5304represented in a format whose specification is available to the
5305general public, that is suitable for revising the document
5306straightforwardly with generic text editors or (for images composed of
5307pixels) generic paint programs or (for drawings) some widely available
5308drawing editor, and that is suitable for input to text formatters or
5309for automatic translation to a variety of formats suitable for input
5310to text formatters. A copy made in an otherwise Transparent file
5311format whose markup, or absence of markup, has been arranged to thwart
5312or discourage subsequent modification by readers is not Transparent.
5313An image format is not Transparent if used for any substantial amount
5314of text. A copy that is not "Transparent" is called "Opaque".
5315</P><P>
5316
5317Examples of suitable formats for Transparent copies include plain
5318ASCII without markup, Texinfo input format, LaTeX input
5319format, <FONT SIZE="-1">SGML</FONT> or <FONT SIZE="-1">XML</FONT> using a publicly available
5320<FONT SIZE="-1">DTD</FONT>, and standard-conforming simple <FONT SIZE="-1">HTML</FONT>,
5321PostScript or <FONT SIZE="-1">PDF</FONT> designed for human modification. Examples
5322of transparent image formats include <FONT SIZE="-1">PNG</FONT>, <FONT SIZE="-1">XCF</FONT> and
5323<FONT SIZE="-1">JPG</FONT>. Opaque formats include proprietary formats that can be
5324read and edited only by proprietary word processors, <FONT SIZE="-1">SGML</FONT> or
5325<FONT SIZE="-1">XML</FONT> for which the <FONT SIZE="-1">DTD</FONT> and/or processing tools are
5326not generally available, and the machine-generated <FONT SIZE="-1">HTML</FONT>,
5327PostScript or <FONT SIZE="-1">PDF</FONT> produced by some word processors for
5328output purposes only.
5329</P><P>
5330
5331The "Title Page" means, for a printed book, the title page itself,
5332plus such following pages as are needed to hold, legibly, the material
5333this License requires to appear in the title page. For works in
5334formats which do not have any title page as such, "Title Page" means
5335the text near the most prominent appearance of the work's title,
5336preceding the beginning of the body of the text.
5337</P><P>
5338
5339A section "Entitled XYZ" means a named subunit of the Document whose
5340title either is precisely XYZ or contains XYZ in parentheses following
5341text that translates XYZ in another language. (Here XYZ stands for a
5342specific section name mentioned below, such as "Acknowledgements",
5343"Dedications", "Endorsements", or "History".) To "Preserve the Title"
5344of such a section when you modify the Document means that it remains a
5345section "Entitled XYZ" according to this definition.
5346</P><P>
5347
5348The Document may include Warranty Disclaimers next to the notice which
5349states that this License applies to the Document. These Warranty
5350Disclaimers are considered to be included by reference in this
5351License, but only as regards disclaiming warranties: any other
5352implication that these Warranty Disclaimers may have is void and has
5353no effect on the meaning of this License.
5354</P><P>
5355
5356<LI>
5357VERBATIM COPYING
5358<P>
5359
5360You may copy and distribute the Document in any medium, either
5361commercially or noncommercially, provided that this License, the
5362copyright notices, and the license notice saying this License applies
5363to the Document are reproduced in all copies, and that you add no other
5364conditions whatsoever to those of this License. You may not use
5365technical measures to obstruct or control the reading or further
5366copying of the copies you make or distribute. However, you may accept
5367compensation in exchange for copies. If you distribute a large enough
5368number of copies you must also follow the conditions in section 3.
5369</P><P>
5370
5371You may also lend copies, under the same conditions stated above, and
5372you may publicly display copies.
5373</P><P>
5374
5375<LI>
5376COPYING IN QUANTITY
5377<P>
5378
5379If you publish printed copies (or copies in media that commonly have
5380printed covers) of the Document, numbering more than 100, and the
5381Document's license notice requires Cover Texts, you must enclose the
5382copies in covers that carry, clearly and legibly, all these Cover
5383Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
5384the back cover. Both covers must also clearly and legibly identify
5385you as the publisher of these copies. The front cover must present
5386the full title with all words of the title equally prominent and
5387visible. You may add other material on the covers in addition.
5388Copying with changes limited to the covers, as long as they preserve
5389the title of the Document and satisfy these conditions, can be treated
5390as verbatim copying in other respects.
5391</P><P>
5392
5393If the required texts for either cover are too voluminous to fit
5394legibly, you should put the first ones listed (as many as fit
5395reasonably) on the actual cover, and continue the rest onto adjacent
5396pages.
5397</P><P>
5398
5399If you publish or distribute Opaque copies of the Document numbering
5400more than 100, you must either include a machine-readable Transparent
5401copy along with each Opaque copy, or state in or with each Opaque copy
5402a computer-network location from which the general network-using
5403public has access to download using public-standard network protocols
5404a complete Transparent copy of the Document, free of added material.
5405If you use the latter option, you must take reasonably prudent steps,
5406when you begin distribution of Opaque copies in quantity, to ensure
5407that this Transparent copy will remain thus accessible at the stated
5408location until at least one year after the last time you distribute an
5409Opaque copy (directly or through your agents or retailers) of that
5410edition to the public.
5411</P><P>
5412
5413It is requested, but not required, that you contact the authors of the
5414Document well before redistributing any large number of copies, to give
5415them a chance to provide you with an updated version of the Document.
5416</P><P>
5417
5418<LI>
5419MODIFICATIONS
5420<P>
5421
5422You may copy and distribute a Modified Version of the Document under
5423the conditions of sections 2 and 3 above, provided that you release
5424the Modified Version under precisely this License, with the Modified
5425Version filling the role of the Document, thus licensing distribution
5426and modification of the Modified Version to whoever possesses a copy
5427of it. In addition, you must do these things in the Modified Version:
5428</P><P>
5429
5430<OL>
5431<LI>
5432Use in the Title Page (and on the covers, if any) a title distinct
5433from that of the Document, and from those of previous versions
5434(which should, if there were any, be listed in the History section
5435of the Document). You may use the same title as a previous version
5436if the original publisher of that version gives permission.
5437<P>
5438
5439<LI>
5440List on the Title Page, as authors, one or more persons or entities
5441responsible for authorship of the modifications in the Modified
5442Version, together with at least five of the principal authors of the
5443Document (all of its principal authors, if it has fewer than five),
5444unless they release you from this requirement.
5445<P>
5446
5447<LI>
5448State on the Title page the name of the publisher of the
5449Modified Version, as the publisher.
5450<P>
5451
5452<LI>
5453Preserve all the copyright notices of the Document.
5454<P>
5455
5456<LI>
5457Add an appropriate copyright notice for your modifications
5458adjacent to the other copyright notices.
5459<P>
5460
5461<LI>
5462Include, immediately after the copyright notices, a license notice
5463giving the public permission to use the Modified Version under the
5464terms of this License, in the form shown in the Addendum below.
5465<P>
5466
5467<LI>
5468Preserve in that license notice the full lists of Invariant Sections
5469and required Cover Texts given in the Document's license notice.
5470<P>
5471
5472<LI>
5473Include an unaltered copy of this License.
5474<P>
5475
5476<LI>
5477Preserve the section Entitled "History", Preserve its Title, and add
5478to it an item stating at least the title, year, new authors, and
5479publisher of the Modified Version as given on the Title Page. If
5480there is no section Entitled "History" in the Document, create one
5481stating the title, year, authors, and publisher of the Document as
5482given on its Title Page, then add an item describing the Modified
5483Version as stated in the previous sentence.
5484<P>
5485
5486<LI>
5487Preserve the network location, if any, given in the Document for
5488public access to a Transparent copy of the Document, and likewise
5489the network locations given in the Document for previous versions
5490it was based on. These may be placed in the "History" section.
5491You may omit a network location for a work that was published at
5492least four years before the Document itself, or if the original
5493publisher of the version it refers to gives permission.
5494<P>
5495
5496<LI>
5497For any section Entitled "Acknowledgements" or "Dedications", Preserve
5498the Title of the section, and preserve in the section all the
5499substance and tone of each of the contributor acknowledgements and/or
5500dedications given therein.
5501<P>
5502
5503<LI>
5504Preserve all the Invariant Sections of the Document,
5505unaltered in their text and in their titles. Section numbers
5506or the equivalent are not considered part of the section titles.
5507<P>
5508
5509<LI>
5510Delete any section Entitled "Endorsements". Such a section
5511may not be included in the Modified Version.
5512<P>
5513
5514<LI>
5515Do not retitle any existing section to be Entitled "Endorsements" or
5516to conflict in title with any Invariant Section.
5517<P>
5518
5519<LI>
5520Preserve any Warranty Disclaimers.
5521</OL>
5522<P>
5523
5524If the Modified Version includes new front-matter sections or
5525appendices that qualify as Secondary Sections and contain no material
5526copied from the Document, you may at your option designate some or all
5527of these sections as invariant. To do this, add their titles to the
5528list of Invariant Sections in the Modified Version's license notice.
5529These titles must be distinct from any other section titles.
5530</P><P>
5531
5532You may add a section Entitled "Endorsements", provided it contains
5533nothing but endorsements of your Modified Version by various
5534parties--for example, statements of peer review or that the text has
5535been approved by an organization as the authoritative definition of a
5536standard.
5537</P><P>
5538
5539You may add a passage of up to five words as a Front-Cover Text, and a
5540passage of up to 25 words as a Back-Cover Text, to the end of the list
5541of Cover Texts in the Modified Version. Only one passage of
5542Front-Cover Text and one of Back-Cover Text may be added by (or
5543through arrangements made by) any one entity. If the Document already
5544includes a cover text for the same cover, previously added by you or
5545by arrangement made by the same entity you are acting on behalf of,
5546you may not add another; but you may replace the old one, on explicit
5547permission from the previous publisher that added the old one.
5548</P><P>
5549
5550The author(s) and publisher(s) of the Document do not by this License
5551give permission to use their names for publicity for or to assert or
5552imply endorsement of any Modified Version.
5553</P><P>
5554
5555<LI>
5556COMBINING DOCUMENTS
5557<P>
5558
5559You may combine the Document with other documents released under this
5560License, under the terms defined in section 4 above for modified
5561versions, provided that you include in the combination all of the
5562Invariant Sections of all of the original documents, unmodified, and
5563list them all as Invariant Sections of your combined work in its
5564license notice, and that you preserve all their Warranty Disclaimers.
5565</P><P>
5566
5567The combined work need only contain one copy of this License, and
5568multiple identical Invariant Sections may be replaced with a single
5569copy. If there are multiple Invariant Sections with the same name but
5570different contents, make the title of each such section unique by
5571adding at the end of it, in parentheses, the name of the original
5572author or publisher of that section if known, or else a unique number.
5573Make the same adjustment to the section titles in the list of
5574Invariant Sections in the license notice of the combined work.
5575</P><P>
5576
5577In the combination, you must combine any sections Entitled "History"
5578in the various original documents, forming one section Entitled
5579"History"; likewise combine any sections Entitled "Acknowledgements",
5580and any sections Entitled "Dedications". You must delete all
5581sections Entitled "Endorsements."
5582</P><P>
5583
5584<LI>
5585COLLECTIONS OF DOCUMENTS
5586<P>
5587
5588You may make a collection consisting of the Document and other documents
5589released under this License, and replace the individual copies of this
5590License in the various documents with a single copy that is included in
5591the collection, provided that you follow the rules of this License for
5592verbatim copying of each of the documents in all other respects.
5593</P><P>
5594
5595You may extract a single document from such a collection, and distribute
5596it individually under this License, provided you insert a copy of this
5597License into the extracted document, and follow this License in all
5598other respects regarding verbatim copying of that document.
5599</P><P>
5600
5601<LI>
5602AGGREGATION WITH INDEPENDENT WORKS
5603<P>
5604
5605A compilation of the Document or its derivatives with other separate
5606and independent documents or works, in or on a volume of a storage or
5607distribution medium, is called an "aggregate" if the copyright
5608resulting from the compilation is not used to limit the legal rights
5609of the compilation's users beyond what the individual works permit.
5610When the Document is included an aggregate, this License does not
5611apply to the other works in the aggregate which are not themselves
5612derivative works of the Document.
5613</P><P>
5614
5615If the Cover Text requirement of section 3 is applicable to these
5616copies of the Document, then if the Document is less than one half of
5617the entire aggregate, the Document's Cover Texts may be placed on
5618covers that bracket the Document within the aggregate, or the
5619electronic equivalent of covers if the Document is in electronic form.
5620Otherwise they must appear on printed covers that bracket the whole
5621aggregate.
5622</P><P>
5623
5624<LI>
5625TRANSLATION
5626<P>
5627
5628Translation is considered a kind of modification, so you may
5629distribute translations of the Document under the terms of section 4.
5630Replacing Invariant Sections with translations requires special
5631permission from their copyright holders, but you may include
5632translations of some or all Invariant Sections in addition to the
5633original versions of these Invariant Sections. You may include a
5634translation of this License, and all the license notices in the
5635Document, and any Warranty Disclaimers, provided that you also include
5636the original English version of this License and the original versions
5637of those notices and disclaimers. In case of a disagreement between
5638the translation and the original version of this License or a notice
5639or disclaimer, the original version will prevail.
5640</P><P>
5641
5642If a section in the Document is Entitled "Acknowledgements",
5643"Dedications", or "History", the requirement (section 4) to Preserve
5644its Title (section 1) will typically require changing the actual
5645title.
5646</P><P>
5647
5648<LI>
5649TERMINATION
5650<P>
5651
5652You may not copy, modify, sublicense, or distribute the Document except
5653as expressly provided for under this License. Any other attempt to
5654copy, modify, sublicense or distribute the Document is void, and will
5655automatically terminate your rights under this License. However,
5656parties who have received copies, or rights, from you under this
5657License will not have their licenses terminated so long as such
5658parties remain in full compliance.
5659</P><P>
5660
5661<LI>
5662FUTURE REVISIONS OF THIS LICENSE
5663<P>
5664
5665The Free Software Foundation may publish new, revised versions
5666of the GNU Free Documentation License from time to time. Such new
5667versions will be similar in spirit to the present version, but may
5668differ in detail to address new problems or concerns. See
5669<A HREF="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</A>.
5670</P><P>
5671
5672Each version of the License is given a distinguishing version number.
5673If the Document specifies that a particular numbered version of this
5674License "or any later version" applies to it, you have the option of
5675following the terms and conditions either of that specified version or
5676of any later version that has been published (not as a draft) by the
5677Free Software Foundation. If the Document does not specify a version
5678number of this License, you may choose any version ever published (not
5679as a draft) by the Free Software Foundation.
5680</OL>
5681<P>
5682
5683<HR SIZE="6">
5684<A NAME="SEC51"></A>
5685<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5686<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> &lt; </A>]</TD>
5687<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52"> &gt; </A>]</TD>
5688<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &lt;&lt; </A>]</TD>
5689<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> Up </A>]</TD>
5690<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
5691<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
5692<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5693<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5694<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5695</TR></TABLE>
5696<H3> A.1.1 ADDENDUM: How to use this License for your documents </H3>
5697<!--docid::SEC51::-->
5698<P>
5699
5700To use this License in a document you have written, include a copy of
5701the License in the document and put the following copyright and
5702license notices just after the title page:
5703</P><P>
5704
5705<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre> Copyright (C) <VAR>year</VAR> <VAR>your name</VAR>.
5706 Permission is granted to copy, distribute and/or modify this document
5707 under the terms of the GNU Free Documentation License, Version 1.2
5708 or any later version published by the Free Software Foundation;
5709 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
5710 A copy of the license is included in the section entitled ``GNU
5711 Free Documentation License''.
5712</FONT></pre></td></tr></table></P><P>
5713
5714If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
5715replace the "with...Texts." line with this:
5716</P><P>
5717
5718<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre> with the Invariant Sections being <VAR>list their titles</VAR>, with
5719 the Front-Cover Texts being <VAR>list</VAR>, and with the Back-Cover Texts
5720 being <VAR>list</VAR>.
5721</FONT></pre></td></tr></table></P><P>
5722
5723If you have Invariant Sections without Cover Texts, or some other
5724combination of the three, merge those two alternatives to suit the
5725situation.
5726</P><P>
5727
5728If your document contains nontrivial examples of program code, we
5729recommend releasing these examples in parallel under your choice of
5730free software license, such as the GNU General Public License,
5731to permit their use in free software.
5732</P><P>
5733
5734<A NAME="Concept Index"></A>
5735<HR SIZE="6">
5736<A NAME="SEC52"></A>
5737<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5738<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC51"> &lt; </A>]</TD>
5739<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC53"> &gt; </A>]</TD>
5740<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
5741<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> Up </A>]</TD>
5742<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
5743<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
5744<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5745<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5746<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5747</TR></TABLE>
5748<H1> Concept Index </H1>
5749<!--docid::SEC52::-->
5750<table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="readline.html#cp_A" style="text-decoration:none"><b>A</b></A>
5751 &nbsp;
5752<A HREF="readline.html#cp_C" style="text-decoration:none"><b>C</b></A>
5753 &nbsp;
5754<A HREF="readline.html#cp_E" style="text-decoration:none"><b>E</b></A>
5755 &nbsp;
5756<A HREF="readline.html#cp_F" style="text-decoration:none"><b>F</b></A>
5757 &nbsp;
5758<A HREF="readline.html#cp_I" style="text-decoration:none"><b>I</b></A>
5759 &nbsp;
5760<A HREF="readline.html#cp_K" style="text-decoration:none"><b>K</b></A>
5761 &nbsp;
5762<A HREF="readline.html#cp_N" style="text-decoration:none"><b>N</b></A>
5763 &nbsp;
5764<A HREF="readline.html#cp_R" style="text-decoration:none"><b>R</b></A>
5765 &nbsp;
5766<A HREF="readline.html#cp_V" style="text-decoration:none"><b>V</b></A>
5767 &nbsp;
5768<A HREF="readline.html#cp_Y" style="text-decoration:none"><b>Y</b></A>
5769 &nbsp;
5770</td></tr></table><br><P></P>
5771<TABLE border=0>
5772<TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
5773<TR><TD COLSPAN=3> <HR></TD></TR>
5774<TR><TH><A NAME="cp_A"></A>A</TH><TD></TD><TD></TD></TR>
5775<TR><TD></TD><TD valign=top><A HREF="readline.html#SEC44">application-specific completion functions</A></TD><TD valign=top><A HREF="readline.html#SEC44">2.6 Custom Completers</A></TD></TR>
5776<TR><TD COLSPAN=3> <HR></TD></TR>
5777<TR><TH><A NAME="cp_C"></A>C</TH><TD></TD><TD></TD></TR>
5778<TR><TD></TD><TD valign=top><A HREF="readline.html#SEC4">command editing</A></TD><TD valign=top><A HREF="readline.html#SEC4">1.2.1 Readline Bare Essentials</A></TD></TR>
5779<TR><TD COLSPAN=3> <HR></TD></TR>
5780<TR><TH><A NAME="cp_E"></A>E</TH><TD></TD><TD></TD></TR>
5781<TR><TD></TD><TD valign=top><A HREF="readline.html#SEC4">editing command lines</A></TD><TD valign=top><A HREF="readline.html#SEC4">1.2.1 Readline Bare Essentials</A></TD></TR>
5782<TR><TD COLSPAN=3> <HR></TD></TR>
5783<TR><TH><A NAME="cp_F"></A>F</TH><TD></TD><TD></TD></TR>
5784<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX349">FDL, GNU Free Documentation License</A></TD><TD valign=top><A HREF="readline.html#SEC50">A.1 GNU Free Documentation License</A></TD></TR>
5785<TR><TD COLSPAN=3> <HR></TD></TR>
5786<TR><TH><A NAME="cp_I"></A>I</TH><TD></TD><TD></TD></TR>
5787<TR><TD></TD><TD valign=top><A HREF="readline.html#SEC9">initialization file, readline</A></TD><TD valign=top><A HREF="readline.html#SEC9">1.3 Readline Init File</A></TD></TR>
5788<TR><TD></TD><TD valign=top><A HREF="readline.html#SEC3">interaction, readline</A></TD><TD valign=top><A HREF="readline.html#SEC3">1.2 Readline Interaction</A></TD></TR>
5789<TR><TD COLSPAN=3> <HR></TD></TR>
5790<TR><TH><A NAME="cp_K"></A>K</TH><TD></TD><TD></TD></TR>
5791<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX3">kill ring</A></TD><TD valign=top><A HREF="readline.html#SEC6">1.2.3 Readline Killing Commands</A></TD></TR>
5792<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX1">killing text</A></TD><TD valign=top><A HREF="readline.html#SEC6">1.2.3 Readline Killing Commands</A></TD></TR>
5793<TR><TD COLSPAN=3> <HR></TD></TR>
5794<TR><TH><A NAME="cp_N"></A>N</TH><TD></TD><TD></TD></TR>
5795<TR><TD></TD><TD valign=top><A HREF="readline.html#SEC4">notation, readline</A></TD><TD valign=top><A HREF="readline.html#SEC4">1.2.1 Readline Bare Essentials</A></TD></TR>
5796<TR><TD COLSPAN=3> <HR></TD></TR>
5797<TR><TH><A NAME="cp_R"></A>R</TH><TD></TD><TD></TD></TR>
5798<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX178">readline, function</A></TD><TD valign=top><A HREF="readline.html#SEC24">2.1 Basic Behavior</A></TD></TR>
5799<TR><TD COLSPAN=3> <HR></TD></TR>
5800<TR><TH><A NAME="cp_V"></A>V</TH><TD></TD><TD></TD></TR>
5801<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX4">variables, readline</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5802<TR><TD COLSPAN=3> <HR></TD></TR>
5803<TR><TH><A NAME="cp_Y"></A>Y</TH><TD></TD><TD></TD></TR>
5804<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX2">yanking text</A></TD><TD valign=top><A HREF="readline.html#SEC6">1.2.3 Readline Killing Commands</A></TD></TR>
5805<TR><TD COLSPAN=3> <HR></TD></TR>
5806</TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="readline.html#cp_A" style="text-decoration:none"><b>A</b></A>
5807 &nbsp;
5808<A HREF="readline.html#cp_C" style="text-decoration:none"><b>C</b></A>
5809 &nbsp;
5810<A HREF="readline.html#cp_E" style="text-decoration:none"><b>E</b></A>
5811 &nbsp;
5812<A HREF="readline.html#cp_F" style="text-decoration:none"><b>F</b></A>
5813 &nbsp;
5814<A HREF="readline.html#cp_I" style="text-decoration:none"><b>I</b></A>
5815 &nbsp;
5816<A HREF="readline.html#cp_K" style="text-decoration:none"><b>K</b></A>
5817 &nbsp;
5818<A HREF="readline.html#cp_N" style="text-decoration:none"><b>N</b></A>
5819 &nbsp;
5820<A HREF="readline.html#cp_R" style="text-decoration:none"><b>R</b></A>
5821 &nbsp;
5822<A HREF="readline.html#cp_V" style="text-decoration:none"><b>V</b></A>
5823 &nbsp;
5824<A HREF="readline.html#cp_Y" style="text-decoration:none"><b>Y</b></A>
5825 &nbsp;
5826</td></tr></table><br><P>
5827
5828<A NAME="Function and Variable Index"></A>
5829<HR SIZE="6">
5830<A NAME="SEC53"></A>
5831<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5832<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52"> &lt; </A>]</TD>
5833<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt; ]</TD>
5834<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
5835<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> Up </A>]</TD>
5836<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
5837<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
5838<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5839<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5840<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5841</TR></TABLE>
5842<H1> Function and Variable Index </H1>
5843<!--docid::SEC53::-->
5844<table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="readline.html#fn__" style="text-decoration:none"><b>_</b></A>
5845 &nbsp;
5846<BR>
5847<A HREF="readline.html#fn_A" style="text-decoration:none"><b>A</b></A>
5848 &nbsp;
5849<A HREF="readline.html#fn_B" style="text-decoration:none"><b>B</b></A>
5850 &nbsp;
5851<A HREF="readline.html#fn_C" style="text-decoration:none"><b>C</b></A>
5852 &nbsp;
5853<A HREF="readline.html#fn_D" style="text-decoration:none"><b>D</b></A>
5854 &nbsp;
5855<A HREF="readline.html#fn_E" style="text-decoration:none"><b>E</b></A>
5856 &nbsp;
5857<A HREF="readline.html#fn_F" style="text-decoration:none"><b>F</b></A>
5858 &nbsp;
5859<A HREF="readline.html#fn_H" style="text-decoration:none"><b>H</b></A>
5860 &nbsp;
5861<A HREF="readline.html#fn_I" style="text-decoration:none"><b>I</b></A>
5862 &nbsp;
5863<A HREF="readline.html#fn_K" style="text-decoration:none"><b>K</b></A>
5864 &nbsp;
5865<A HREF="readline.html#fn_M" style="text-decoration:none"><b>M</b></A>
5866 &nbsp;
5867<A HREF="readline.html#fn_N" style="text-decoration:none"><b>N</b></A>
5868 &nbsp;
5869<A HREF="readline.html#fn_O" style="text-decoration:none"><b>O</b></A>
5870 &nbsp;
5871<A HREF="readline.html#fn_P" style="text-decoration:none"><b>P</b></A>
5872 &nbsp;
5873<A HREF="readline.html#fn_Q" style="text-decoration:none"><b>Q</b></A>
5874 &nbsp;
5875<A HREF="readline.html#fn_R" style="text-decoration:none"><b>R</b></A>
5876 &nbsp;
5877<A HREF="readline.html#fn_S" style="text-decoration:none"><b>S</b></A>
5878 &nbsp;
5879<A HREF="readline.html#fn_T" style="text-decoration:none"><b>T</b></A>
5880 &nbsp;
5881<A HREF="readline.html#fn_U" style="text-decoration:none"><b>U</b></A>
5882 &nbsp;
5883<A HREF="readline.html#fn_V" style="text-decoration:none"><b>V</b></A>
5884 &nbsp;
5885<A HREF="readline.html#fn_Y" style="text-decoration:none"><b>Y</b></A>
5886 &nbsp;
5887</td></tr></table><br><P></P>
5888<TABLE border=0>
5889<TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
5890<TR><TD COLSPAN=3> <HR></TD></TR>
5891<TR><TH><A NAME="fn__"></A>_</TH><TD></TD><TD></TD></TR>
5892<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX288"><CODE>_rl_digit_p</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
5893<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX291"><CODE>_rl_digit_value</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
5894<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX287"><CODE>_rl_lowercase_p</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
5895<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX290"><CODE>_rl_to_lower</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
5896<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX289"><CODE>_rl_to_upper</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
5897<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX286"><CODE>_rl_uppercase_p</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
5898<TR><TD COLSPAN=3> <HR></TD></TR>
5899<TR><TH><A NAME="fn_A"></A>A</TH><TD></TD><TD></TD></TR>
5900<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX145"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5901<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX146"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5902<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX43"><CODE>accept-line (Newline or Return)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5903<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX44"><CODE>accept-line (Newline or Return)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5904<TR><TD COLSPAN=3> <HR></TD></TR>
5905<TR><TH><A NAME="fn_B"></A>B</TH><TD></TD><TD></TD></TR>
5906<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX33"><CODE>backward-char (C-b)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5907<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX34"><CODE>backward-char (C-b)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5908<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX71"><CODE>backward-delete-char (Rubout)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
5909<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX72"><CODE>backward-delete-char (Rubout)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
5910<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX95"><CODE>backward-kill-line (C-x Rubout)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5911<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX96"><CODE>backward-kill-line (C-x Rubout)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5912<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX103"><CODE>backward-kill-word (M-<KBD>DEL</KBD>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5913<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX104"><CODE>backward-kill-word (M-<KBD>DEL</KBD>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5914<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX37"><CODE>backward-word (M-b)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5915<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX38"><CODE>backward-word (M-b)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5916<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX49"><CODE>beginning-of-history (M-&#38;#60;)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5917<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX50"><CODE>beginning-of-history (M-&#38;#60;)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5918<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX27"><CODE>beginning-of-line (C-a)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5919<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX28"><CODE>beginning-of-line (C-a)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5920<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX5">bell-style</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5921<TR><TD COLSPAN=3> <HR></TD></TR>
5922<TR><TH><A NAME="fn_C"></A>C</TH><TD></TD><TD></TD></TR>
5923<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX141"><CODE>call-last-kbd-macro (C-x e)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
5924<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX142"><CODE>call-last-kbd-macro (C-x e)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
5925<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX89"><CODE>capitalize-word (M-c)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
5926<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX90"><CODE>capitalize-word (M-c)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
5927<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX161"><CODE>character-search (C-])</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5928<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX162"><CODE>character-search (C-])</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5929<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX163"><CODE>character-search-backward (M-C-])</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5930<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX164"><CODE>character-search-backward (M-C-])</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5931<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX39"><CODE>clear-screen (C-l)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5932<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX40"><CODE>clear-screen (C-l)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5933<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX6">comment-begin</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5934<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX127"><CODE>complete (<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
5935<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX128"><CODE>complete (<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
5936<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX7">completion-query-items</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5937<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX8">convert-meta</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5938<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX115"><CODE>copy-backward-word ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5939<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX116"><CODE>copy-backward-word ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5940<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX117"><CODE>copy-forward-word ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5941<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX118"><CODE>copy-forward-word ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5942<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX113"><CODE>copy-region-as-kill ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5943<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX114"><CODE>copy-region-as-kill ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5944<TR><TD COLSPAN=3> <HR></TD></TR>
5945<TR><TH><A NAME="fn_D"></A>D</TH><TD></TD><TD></TD></TR>
5946<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX69"><CODE>delete-char (C-d)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
5947<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX70"><CODE>delete-char (C-d)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
5948<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX135"><CODE>delete-char-or-list ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
5949<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX136"><CODE>delete-char-or-list ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
5950<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX109"><CODE>delete-horizontal-space ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5951<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX110"><CODE>delete-horizontal-space ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5952<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX123"><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, &#60;small&#62;...&#60;/small&#62; <KBD>M--</KBD>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD></TR>
5953<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX124"><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, &#60;small&#62;...&#60;/small&#62; <KBD>M--</KBD>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD></TR>
5954<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX9">disable-completion</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5955<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX147"><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5956<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX148"><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5957<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX87"><CODE>downcase-word (M-l)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
5958<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX88"><CODE>downcase-word (M-l)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
5959<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX167"><CODE>dump-functions ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5960<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX168"><CODE>dump-functions ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5961<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX171"><CODE>dump-macros ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5962<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX172"><CODE>dump-macros ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5963<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX169"><CODE>dump-variables ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5964<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX170"><CODE>dump-variables ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5965<TR><TD COLSPAN=3> <HR></TD></TR>
5966<TR><TH><A NAME="fn_E"></A>E</TH><TD></TD><TD></TD></TR>
5967<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX10">editing-mode</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5968<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX173"><CODE>emacs-editing-mode (C-e)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5969<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX174"><CODE>emacs-editing-mode (C-e)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5970<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX11">enable-keypad</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5971<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX139"><CODE>end-kbd-macro (C-x ))</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
5972<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX140"><CODE>end-kbd-macro (C-x ))</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
5973<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX51"><CODE>end-of-history (M-&#38;#62;)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5974<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX52"><CODE>end-of-history (M-&#38;#62;)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5975<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX29"><CODE>end-of-line (C-e)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5976<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX30"><CODE>end-of-line (C-e)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5977<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX159"><CODE>exchange-point-and-mark (C-x C-x)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5978<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX160"><CODE>exchange-point-and-mark (C-x C-x)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5979<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX12">expand-tilde</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5980<TR><TD COLSPAN=3> <HR></TD></TR>
5981<TR><TH><A NAME="fn_F"></A>F</TH><TD></TD><TD></TD></TR>
5982<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX73"><CODE>forward-backward-delete-char ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
5983<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX74"><CODE>forward-backward-delete-char ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
5984<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX31"><CODE>forward-char (C-f)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5985<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX32"><CODE>forward-char (C-f)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5986<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX55"><CODE>forward-search-history (C-s)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5987<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX56"><CODE>forward-search-history (C-s)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5988<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX35"><CODE>forward-word (M-f)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5989<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX36"><CODE>forward-word (M-f)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5990<TR><TD COLSPAN=3> <HR></TD></TR>
5991<TR><TH><A NAME="fn_H"></A>H</TH><TD></TD><TD></TD></TR>
5992<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX13">history-preserve-point</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5993<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX63"><CODE>history-search-backward ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5994<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX64"><CODE>history-search-backward ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5995<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX61"><CODE>history-search-forward ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5996<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX62"><CODE>history-search-forward ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5997<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX14">horizontal-scroll-mode</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5998<TR><TD COLSPAN=3> <HR></TD></TR>
5999<TR><TH><A NAME="fn_I"></A>I</TH><TD></TD><TD></TD></TR>
6000<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX15">input-meta</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6001<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX165"><CODE>insert-comment (M-#)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6002<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX166"><CODE>insert-comment (M-#)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6003<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX131"><CODE>insert-completions (M-*)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6004<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX132"><CODE>insert-completions (M-*)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6005<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX17">isearch-terminators</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6006<TR><TD COLSPAN=3> <HR></TD></TR>
6007<TR><TH><A NAME="fn_K"></A>K</TH><TD></TD><TD></TD></TR>
6008<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX18">keymap</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6009<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX93"><CODE>kill-line (C-k)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6010<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX94"><CODE>kill-line (C-k)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6011<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX111"><CODE>kill-region ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6012<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX112"><CODE>kill-region ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6013<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX99"><CODE>kill-whole-line ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6014<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX100"><CODE>kill-whole-line ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6015<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX101"><CODE>kill-word (M-d)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6016<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX102"><CODE>kill-word (M-d)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6017<TR><TD COLSPAN=3> <HR></TD></TR>
6018<TR><TH><A NAME="fn_M"></A>M</TH><TD></TD><TD></TD></TR>
6019<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX19">mark-modified-lines</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6020<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX20">mark-symlinked-directories</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6021<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX21">match-hidden-files</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6022<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX133"><CODE>menu-complete ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6023<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX134"><CODE>menu-complete ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6024<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX16">meta-flag</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6025<TR><TD COLSPAN=3> <HR></TD></TR>
6026<TR><TH><A NAME="fn_N"></A>N</TH><TD></TD><TD></TD></TR>
6027<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX47"><CODE>next-history (C-n)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6028<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX48"><CODE>next-history (C-n)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6029<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX59"><CODE>non-incremental-forward-search-history (M-n)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6030<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX60"><CODE>non-incremental-forward-search-history (M-n)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6031<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX57"><CODE>non-incremental-reverse-search-history (M-p)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6032<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX58"><CODE>non-incremental-reverse-search-history (M-p)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6033<TR><TD COLSPAN=3> <HR></TD></TR>
6034<TR><TH><A NAME="fn_O"></A>O</TH><TD></TD><TD></TD></TR>
6035<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX22">output-meta</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6036<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX91"><CODE>overwrite-mode ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6037<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX92"><CODE>overwrite-mode ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6038<TR><TD COLSPAN=3> <HR></TD></TR>
6039<TR><TH><A NAME="fn_P"></A>P</TH><TD></TD><TD></TD></TR>
6040<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX23">page-completions</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6041<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX129"><CODE>possible-completions (M-?)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6042<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX130"><CODE>possible-completions (M-?)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6043<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX149"><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6044<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX150"><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6045<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX45"><CODE>previous-history (C-p)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6046<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX46"><CODE>previous-history (C-p)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6047<TR><TD COLSPAN=3> <HR></TD></TR>
6048<TR><TH><A NAME="fn_Q"></A>Q</TH><TD></TD><TD></TD></TR>
6049<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX75"><CODE>quoted-insert (C-q or C-v)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6050<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX76"><CODE>quoted-insert (C-q or C-v)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6051<TR><TD COLSPAN=3> <HR></TD></TR>
6052<TR><TH><A NAME="fn_R"></A>R</TH><TD></TD><TD></TD></TR>
6053<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX143"><CODE>re-read-init-file (C-x C-r)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6054<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX144"><CODE>re-read-init-file (C-x C-r)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6055<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX177"><CODE>readline</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC24">2.1 Basic Behavior</A></TD></TR>
6056<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX41"><CODE>redraw-current-line ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
6057<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX42"><CODE>redraw-current-line ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
6058<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX53"><CODE>reverse-search-history (C-r)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6059<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX54"><CODE>reverse-search-history (C-r)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6060<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX153"><CODE>revert-line (M-r)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6061<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX154"><CODE>revert-line (M-r)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6062<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX212"><CODE>rl_add_defun</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC30">2.4.1 Naming a Function</A></TD></TR>
6063<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX244"><CODE>rl_add_funmap_entry</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6064<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX247"><CODE>rl_add_undo</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
6065<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX284"><CODE>rl_alphabetic</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
6066<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX189">rl_already_prompted</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6067<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX322">rl_attempted_completion_function</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6068<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX346">rl_attempted_completion_over</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6069<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX330">rl_basic_quote_characters</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6070<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX329">rl_basic_word_break_characters</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6071<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX245"><CODE>rl_begin_undo_group</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
6072<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX221"><CODE>rl_bind_key</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6073<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX223"><CODE>rl_bind_key_if_unbound</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6074<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX224"><CODE>rl_bind_key_if_unbound_in_map</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6075<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX222"><CODE>rl_bind_key_in_map</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6076<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX229"><CODE>rl_bind_keyseq</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6077<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX232"><CODE>rl_bind_keyseq_if_unbound</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6078<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX233"><CODE>rl_bind_keyseq_if_unbound_in_map</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6079<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX230"><CODE>rl_bind_keyseq_in_map</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6080<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX206">rl_binding_keymap</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6081<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX298"><CODE>rl_callback_handler_install</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC41">2.4.12 Alternate Interface</A></TD></TR>
6082<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX300"><CODE>rl_callback_handler_remove</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC41">2.4.12 Alternate Interface</A></TD></TR>
6083<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX299"><CODE>rl_callback_read_char</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC41">2.4.12 Alternate Interface</A></TD></TR>
6084<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX301">rl_catch_signals</A></TD><TD valign=top><A HREF="readline.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6085<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX302">rl_catch_sigwinch</A></TD><TD valign=top><A HREF="readline.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6086<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX325">rl_char_is_quoted_p</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6087<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX303"><CODE>rl_cleanup_after_signal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6088<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX259"><CODE>rl_clear_message</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6089<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX273"><CODE>rl_clear_pending_input</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC37">2.4.8 Character Input</A></TD></TR>
6090<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX310"><CODE>rl_clear_signals</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6091<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX311"><CODE>rl_complete</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC45">2.6.1 How Completing Works</A></TD></TR>
6092<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX314"><CODE>rl_complete</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6093<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX313"><CODE>rl_complete_internal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6094<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX333">rl_completer_quote_characters</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6095<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX331">rl_completer_word_break_characters</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6096<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX337">rl_completion_append_character</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6097<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX328">rl_completion_display_matches_hook</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6098<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX312">rl_completion_entry_function</A></TD><TD valign=top><A HREF="readline.html#SEC45">2.6.1 How Completing Works</A></TD></TR>
6099<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX321">rl_completion_entry_function</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6100<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX341">rl_completion_found_quote</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6101<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX342">rl_completion_mark_symlink_dirs</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6102<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX318"><CODE>rl_completion_matches</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6103<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX317"><CODE>rl_completion_mode</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6104<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX336">rl_completion_query_items</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6105<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX339">rl_completion_quote_character</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6106<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX338">rl_completion_suppress_append</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6107<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX340">rl_completion_suppress_quote</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6108<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX347">rl_completion_type</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6109<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX332">rl_completion_word_break_hook</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6110<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX214"><CODE>rl_copy_keymap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6111<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX266"><CODE>rl_copy_text</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
6112<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX256"><CODE>rl_crlf</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6113<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX265"><CODE>rl_delete_text</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
6114<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX204">rl_deprep_term_function</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6115<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX276"><CODE>rl_deprep_terminal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC38">2.4.9 Terminal Management</A></TD></TR>
6116<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX283"><CODE>rl_ding</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
6117<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX327">rl_directory_completion_hook</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6118<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX216"><CODE>rl_discard_keymap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6119<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX186">rl_dispatching</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6120<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX285"><CODE>rl_display_match_list</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
6121<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX249"><CODE>rl_do_undo</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
6122<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX183">rl_done</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6123<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX211">rl_editing_mode</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6124<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX181">rl_end</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6125<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX246"><CODE>rl_end_undo_group</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
6126<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX187">rl_erase_empty_line</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6127<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX200">rl_event_hook</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6128<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX272"><CODE>rl_execute_next</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC37">2.4.8 Character Input</A></TD></TR>
6129<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX205">rl_executing_keymap</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6130<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX207">rl_executing_macro</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6131<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX262"><CODE>rl_expand_prompt</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6132<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX209">rl_explicit_arg</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6133<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX281"><CODE>rl_extend_line_buffer</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
6134<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX344">rl_filename_completion_desired</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6135<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX319"><CODE>rl_filename_completion_function</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6136<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX324">rl_filename_dequoting_function</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6137<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX334">rl_filename_quote_characters</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6138<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX345">rl_filename_quoting_desired</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6139<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX323">rl_filename_quoting_function</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6140<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX252"><CODE>rl_forced_update_display</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6141<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX304"><CODE>rl_free_line_state</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6142<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX248"><CODE>rl_free_undo_list</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
6143<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX241"><CODE>rl_function_dumper</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6144<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX238"><CODE>rl_function_of_keyseq</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6145<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX243"><CODE>rl_funmap_names</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6146<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX234"><CODE>rl_generic_bind</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6147<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX217"><CODE>rl_get_keymap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6148<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX219"><CODE>rl_get_keymap_by_name</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6149<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX220"><CODE>rl_get_keymap_name</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6150<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX308"><CODE>rl_get_screen_size</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6151<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX297"><CODE>rl_get_termcap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
6152<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX270"><CODE>rl_getc</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC37">2.4.8 Character Input</A></TD></TR>
6153<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX201">rl_getc_function</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6154<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX192">rl_gnu_readline_p</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6155<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX343">rl_ignore_completion_duplicates</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6156<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX326">rl_ignore_some_completions_function</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6157<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX348">rl_inhibit_completion</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6158<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX282"><CODE>rl_initialize</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
6159<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX316"><CODE>rl_insert_completions</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6160<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX264"><CODE>rl_insert_text</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
6161<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX195">rl_instream</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6162<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX239"><CODE>rl_invoking_keyseqs</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6163<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX240"><CODE>rl_invoking_keyseqs_in_map</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6164<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX267"><CODE>rl_kill_text</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
6165<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX197">rl_last_func</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6166<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX190">rl_library_version</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6167<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX179">rl_line_buffer</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6168<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX242"><CODE>rl_list_funmap_names</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6169<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX292"><CODE>rl_macro_bind</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
6170<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX293"><CODE>rl_macro_dumper</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
6171<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX213"><CODE>rl_make_bare_keymap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6172<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX215"><CODE>rl_make_keymap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6173<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX182">rl_mark</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6174<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX258"><CODE>rl_message</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6175<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX250"><CODE>rl_modifying</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
6176<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX237"><CODE>rl_named_function</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6177<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX184">rl_num_chars_to_read</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6178<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX210">rl_numeric_arg</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6179<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX253"><CODE>rl_on_new_line</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6180<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX254"><CODE>rl_on_new_line_with_prompt</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6181<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX196">rl_outstream</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6182<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX235"><CODE>rl_parse_and_bind</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6183<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX185">rl_pending_input</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6184<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX180">rl_point</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6185<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX315"><CODE>rl_possible_completions</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6186<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX199">rl_pre_input_hook</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6187<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX203">rl_prep_term_function</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6188<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX275"><CODE>rl_prep_terminal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC38">2.4.9 Terminal Management</A></TD></TR>
6189<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX188">rl_prompt</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6190<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX268"><CODE>rl_push_macro_input</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
6191<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX236"><CODE>rl_read_init_file</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6192<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX269"><CODE>rl_read_key</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC37">2.4.8 Character Input</A></TD></TR>
6193<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX194">rl_readline_name</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6194<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX208">rl_readline_state</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6195<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX191">rl_readline_version</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6196<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX251"><CODE>rl_redisplay</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6197<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX202">rl_redisplay_function</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6198<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX280"><CODE>rl_replace_line</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
6199<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX305"><CODE>rl_reset_after_signal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6200<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX255"><CODE>rl_reset_line_state</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6201<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX279"><CODE>rl_reset_terminal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC38">2.4.9 Terminal Management</A></TD></TR>
6202<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX306"><CODE>rl_resize_terminal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6203<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX261"><CODE>rl_restore_prompt</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6204<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX260"><CODE>rl_save_prompt</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6205<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX231"><CODE>rl_set_key</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6206<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX274"><CODE>rl_set_keyboard_input_timeout</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC37">2.4.8 Character Input</A></TD></TR>
6207<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX218"><CODE>rl_set_keymap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6208<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX296"><CODE>rl_set_paren_blink_timeout</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
6209<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX263"><CODE>rl_set_prompt</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6210<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX307"><CODE>rl_set_screen_size</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6211<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX309"><CODE>rl_set_signals</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6212<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX257"><CODE>rl_show_char</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6213<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX335">rl_special_prefixes</A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6214<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX198">rl_startup_hook</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6215<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX271"><CODE>rl_stuff_char</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC37">2.4.8 Character Input</A></TD></TR>
6216<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX193">rl_terminal_name</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
6217<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX277"><CODE>rl_tty_set_default_bindings</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC38">2.4.9 Terminal Management</A></TD></TR>
6218<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX278"><CODE>rl_tty_unset_default_bindings</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC38">2.4.9 Terminal Management</A></TD></TR>
6219<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX228"><CODE>rl_unbind_command_in_map</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6220<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX227"><CODE>rl_unbind_function_in_map</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6221<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX225"><CODE>rl_unbind_key</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6222<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX226"><CODE>rl_unbind_key_in_map</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6223<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX320"><CODE>rl_username_completion_function</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6224<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX294"><CODE>rl_variable_bind</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
6225<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX295"><CODE>rl_variable_dumper</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
6226<TR><TD COLSPAN=3> <HR></TD></TR>
6227<TR><TH><A NAME="fn_S"></A>S</TH><TD></TD><TD></TD></TR>
6228<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX79"><CODE>self-insert (a, b, A, 1, !, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6229<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX80"><CODE>self-insert (a, b, A, 1, !, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6230<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX157"><CODE>set-mark (C-@)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6231<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX158"><CODE>set-mark (C-@)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6232<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX24">show-all-if-ambiguous</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6233<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX25">show-all-if-unmodified</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6234<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX137"><CODE>start-kbd-macro (C-x ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
6235<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX138"><CODE>start-kbd-macro (C-x ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
6236<TR><TD COLSPAN=3> <HR></TD></TR>
6237<TR><TH><A NAME="fn_T"></A>T</TH><TD></TD><TD></TD></TR>
6238<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX77"><CODE>tab-insert (M-<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6239<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX78"><CODE>tab-insert (M-<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6240<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX155"><CODE>tilde-expand (M-~)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6241<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX156"><CODE>tilde-expand (M-~)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6242<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX81"><CODE>transpose-chars (C-t)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6243<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX82"><CODE>transpose-chars (C-t)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6244<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX83"><CODE>transpose-words (M-t)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6245<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX84"><CODE>transpose-words (M-t)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6246<TR><TD COLSPAN=3> <HR></TD></TR>
6247<TR><TH><A NAME="fn_U"></A>U</TH><TD></TD><TD></TD></TR>
6248<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX151"><CODE>undo (C-_ or C-x C-u)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6249<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX152"><CODE>undo (C-_ or C-x C-u)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6250<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX125"><CODE>universal-argument ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD></TR>
6251<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX126"><CODE>universal-argument ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD></TR>
6252<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX107"><CODE>unix-filename-rubout ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6253<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX108"><CODE>unix-filename-rubout ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6254<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX97"><CODE>unix-line-discard (C-u)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6255<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX98"><CODE>unix-line-discard (C-u)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6256<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX105"><CODE>unix-word-rubout (C-w)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6257<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX106"><CODE>unix-word-rubout (C-w)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6258<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX85"><CODE>upcase-word (M-u)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6259<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX86"><CODE>upcase-word (M-u)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6260<TR><TD COLSPAN=3> <HR></TD></TR>
6261<TR><TH><A NAME="fn_V"></A>V</TH><TD></TD><TD></TD></TR>
6262<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX175"><CODE>vi-editing-mode (M-C-j)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6263<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX176"><CODE>vi-editing-mode (M-C-j)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6264<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX26">visible-stats</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6265<TR><TD COLSPAN=3> <HR></TD></TR>
6266<TR><TH><A NAME="fn_Y"></A>Y</TH><TD></TD><TD></TD></TR>
6267<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX119"><CODE>yank (C-y)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6268<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX120"><CODE>yank (C-y)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6269<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX67"><CODE>yank-last-arg (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6270<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX68"><CODE>yank-last-arg (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6271<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX65"><CODE>yank-nth-arg (M-C-y)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6272<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX66"><CODE>yank-nth-arg (M-C-y)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6273<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX121"><CODE>yank-pop (M-y)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6274<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX122"><CODE>yank-pop (M-y)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6275<TR><TD COLSPAN=3> <HR></TD></TR>
6276</TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="readline.html#fn__" style="text-decoration:none"><b>_</b></A>
6277 &nbsp;
6278<BR>
6279<A HREF="readline.html#fn_A" style="text-decoration:none"><b>A</b></A>
6280 &nbsp;
6281<A HREF="readline.html#fn_B" style="text-decoration:none"><b>B</b></A>
6282 &nbsp;
6283<A HREF="readline.html#fn_C" style="text-decoration:none"><b>C</b></A>
6284 &nbsp;
6285<A HREF="readline.html#fn_D" style="text-decoration:none"><b>D</b></A>
6286 &nbsp;
6287<A HREF="readline.html#fn_E" style="text-decoration:none"><b>E</b></A>
6288 &nbsp;
6289<A HREF="readline.html#fn_F" style="text-decoration:none"><b>F</b></A>
6290 &nbsp;
6291<A HREF="readline.html#fn_H" style="text-decoration:none"><b>H</b></A>
6292 &nbsp;
6293<A HREF="readline.html#fn_I" style="text-decoration:none"><b>I</b></A>
6294 &nbsp;
6295<A HREF="readline.html#fn_K" style="text-decoration:none"><b>K</b></A>
6296 &nbsp;
6297<A HREF="readline.html#fn_M" style="text-decoration:none"><b>M</b></A>
6298 &nbsp;
6299<A HREF="readline.html#fn_N" style="text-decoration:none"><b>N</b></A>
6300 &nbsp;
6301<A HREF="readline.html#fn_O" style="text-decoration:none"><b>O</b></A>
6302 &nbsp;
6303<A HREF="readline.html#fn_P" style="text-decoration:none"><b>P</b></A>
6304 &nbsp;
6305<A HREF="readline.html#fn_Q" style="text-decoration:none"><b>Q</b></A>
6306 &nbsp;
6307<A HREF="readline.html#fn_R" style="text-decoration:none"><b>R</b></A>
6308 &nbsp;
6309<A HREF="readline.html#fn_S" style="text-decoration:none"><b>S</b></A>
6310 &nbsp;
6311<A HREF="readline.html#fn_T" style="text-decoration:none"><b>T</b></A>
6312 &nbsp;
6313<A HREF="readline.html#fn_U" style="text-decoration:none"><b>U</b></A>
6314 &nbsp;
6315<A HREF="readline.html#fn_V" style="text-decoration:none"><b>V</b></A>
6316 &nbsp;
6317<A HREF="readline.html#fn_Y" style="text-decoration:none"><b>Y</b></A>
6318 &nbsp;
6319</td></tr></table><br><P>
6320
6321<HR SIZE="6">
6322<A NAME="SEC_Contents"></A>
6323<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6324<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
6325<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
6326<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
6327<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
6328</TR></TABLE>
6329<H1>Table of Contents</H1>
6330<UL>
6331<A NAME="TOC1" HREF="readline.html#SEC1">1. Command Line Editing</A>
6332<BR>
6333<UL>
6334<A NAME="TOC2" HREF="readline.html#SEC2">1.1 Introduction to Line Editing</A>
6335<BR>
6336<A NAME="TOC3" HREF="readline.html#SEC3">1.2 Readline Interaction</A>
6337<BR>
6338<UL>
6339<A NAME="TOC4" HREF="readline.html#SEC4">1.2.1 Readline Bare Essentials</A>
6340<BR>
6341<A NAME="TOC5" HREF="readline.html#SEC5">1.2.2 Readline Movement Commands</A>
6342<BR>
6343<A NAME="TOC6" HREF="readline.html#SEC6">1.2.3 Readline Killing Commands</A>
6344<BR>
6345<A NAME="TOC7" HREF="readline.html#SEC7">1.2.4 Readline Arguments</A>
6346<BR>
6347<A NAME="TOC8" HREF="readline.html#SEC8">1.2.5 Searching for Commands in the History</A>
6348<BR>
6349</UL>
6350<A NAME="TOC9" HREF="readline.html#SEC9">1.3 Readline Init File</A>
6351<BR>
6352<UL>
6353<A NAME="TOC10" HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A>
6354<BR>
6355<A NAME="TOC11" HREF="readline.html#SEC11">1.3.2 Conditional Init Constructs</A>
6356<BR>
6357<A NAME="TOC12" HREF="readline.html#SEC12">1.3.3 Sample Init File</A>
6358<BR>
6359</UL>
6360<A NAME="TOC13" HREF="readline.html#SEC13">1.4 Bindable Readline Commands</A>
6361<BR>
6362<UL>
6363<A NAME="TOC14" HREF="readline.html#SEC14">1.4.1 Commands For Moving</A>
6364<BR>
6365<A NAME="TOC15" HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A>
6366<BR>
6367<A NAME="TOC16" HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A>
6368<BR>
6369<A NAME="TOC17" HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A>
6370<BR>
6371<A NAME="TOC18" HREF="readline.html#SEC18">1.4.5 Specifying Numeric Arguments</A>
6372<BR>
6373<A NAME="TOC19" HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A>
6374<BR>
6375<A NAME="TOC20" HREF="readline.html#SEC20">1.4.7 Keyboard Macros</A>
6376<BR>
6377<A NAME="TOC21" HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A>
6378<BR>
6379</UL>
6380<A NAME="TOC22" HREF="readline.html#SEC22">1.5 Readline vi Mode</A>
6381<BR>
6382</UL>
6383<A NAME="TOC23" HREF="readline.html#SEC23">2. Programming with GNU Readline</A>
6384<BR>
6385<UL>
6386<A NAME="TOC24" HREF="readline.html#SEC24">2.1 Basic Behavior</A>
6387<BR>
6388<A NAME="TOC25" HREF="readline.html#SEC25">2.2 Custom Functions</A>
6389<BR>
6390<UL>
6391<A NAME="TOC26" HREF="readline.html#SEC26">2.2.1 Readline Typedefs</A>
6392<BR>
6393<A NAME="TOC27" HREF="readline.html#SEC27">2.2.2 Writing a New Function</A>
6394<BR>
6395</UL>
6396<A NAME="TOC28" HREF="readline.html#SEC28">2.3 Readline Variables</A>
6397<BR>
6398<A NAME="TOC29" HREF="readline.html#SEC29">2.4 Readline Convenience Functions</A>
6399<BR>
6400<UL>
6401<A NAME="TOC30" HREF="readline.html#SEC30">2.4.1 Naming a Function</A>
6402<BR>
6403<A NAME="TOC31" HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A>
6404<BR>
6405<A NAME="TOC32" HREF="readline.html#SEC32">2.4.3 Binding Keys</A>
6406<BR>
6407<A NAME="TOC33" HREF="readline.html#SEC33">2.4.4 Associating Function Names and Bindings</A>
6408<BR>
6409<A NAME="TOC34" HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A>
6410<BR>
6411<A NAME="TOC35" HREF="readline.html#SEC35">2.4.6 Redisplay</A>
6412<BR>
6413<A NAME="TOC36" HREF="readline.html#SEC36">2.4.7 Modifying Text</A>
6414<BR>
6415<A NAME="TOC37" HREF="readline.html#SEC37">2.4.8 Character Input</A>
6416<BR>
6417<A NAME="TOC38" HREF="readline.html#SEC38">2.4.9 Terminal Management</A>
6418<BR>
6419<A NAME="TOC39" HREF="readline.html#SEC39">2.4.10 Utility Functions</A>
6420<BR>
6421<A NAME="TOC40" HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A>
6422<BR>
6423<A NAME="TOC41" HREF="readline.html#SEC41">2.4.12 Alternate Interface</A>
6424<BR>
6425<A NAME="TOC42" HREF="readline.html#SEC42">2.4.13 A Readline Example</A>
6426<BR>
6427</UL>
6428<A NAME="TOC43" HREF="readline.html#SEC43">2.5 Readline Signal Handling</A>
6429<BR>
6430<A NAME="TOC44" HREF="readline.html#SEC44">2.6 Custom Completers</A>
6431<BR>
6432<UL>
6433<A NAME="TOC45" HREF="readline.html#SEC45">2.6.1 How Completing Works</A>
6434<BR>
6435<A NAME="TOC46" HREF="readline.html#SEC46">2.6.2 Completion Functions</A>
6436<BR>
6437<A NAME="TOC47" HREF="readline.html#SEC47">2.6.3 Completion Variables</A>
6438<BR>
6439<A NAME="TOC48" HREF="readline.html#SEC48">2.6.4 A Short Completion Example</A>
6440<BR>
6441</UL>
6442</UL>
6443<A NAME="TOC49" HREF="readline.html#SEC49">A. Copying This Manual</A>
6444<BR>
6445<UL>
6446<A NAME="TOC50" HREF="readline.html#SEC50">A.1 GNU Free Documentation License</A>
6447<BR>
6448<UL>
6449<A NAME="TOC51" HREF="readline.html#SEC51">A.1.1 ADDENDUM: How to use this License for your documents</A>
6450<BR>
6451</UL>
6452</UL>
6453<A NAME="TOC52" HREF="readline.html#SEC52">Concept Index</A>
6454<BR>
6455<A NAME="TOC53" HREF="readline.html#SEC53">Function and Variable Index</A>
6456<BR>
6457</UL>
6458<HR SIZE=1>
6459<A NAME="SEC_OVERVIEW"></A>
6460<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6461<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
6462<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
6463<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
6464<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
6465</TR></TABLE>
6466<H1>Short Table of Contents</H1>
6467<BLOCKQUOTE>
6468<A NAME="TOC1" HREF="readline.html#SEC1">1. Command Line Editing</A>
6469<BR>
6470<A NAME="TOC23" HREF="readline.html#SEC23">2. Programming with GNU Readline</A>
6471<BR>
6472<A NAME="TOC49" HREF="readline.html#SEC49">A. Copying This Manual</A>
6473<BR>
6474<A NAME="TOC52" HREF="readline.html#SEC52">Concept Index</A>
6475<BR>
6476<A NAME="TOC53" HREF="readline.html#SEC53">Function and Variable Index</A>
6477<BR>
6478
6479</BLOCKQUOTE>
6480<HR SIZE=1>
6481<A NAME="SEC_About"></A>
6482<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6483<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
6484<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
6485<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
6486<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
6487</TR></TABLE>
6488<H1>About this document</H1>
6489This document was generated by <I>Chet Ramey</I> on <I>July, 27 2004</I>
6490using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
6491"><I>texi2html</I></A>
6492<P></P>
6493The buttons in the navigation panels have the following meaning:
6494<P></P>
6495<table border = "1">
6496<TR>
6497<TH> Button </TH>
6498<TH> Name </TH>
6499<TH> Go to </TH>
6500<TH> From 1.2.3 go to</TH>
6501</TR>
6502<TR>
6503<TD ALIGN="CENTER">
6504 [ &lt; ] </TD>
6505<TD ALIGN="CENTER">
6506Back
6507</TD>
6508<TD>
6509previous section in reading order
6510</TD>
6511<TD>
65121.2.2
6513</TD>
6514</TR>
6515<TR>
6516<TD ALIGN="CENTER">
6517 [ &gt; ] </TD>
6518<TD ALIGN="CENTER">
6519Forward
6520</TD>
6521<TD>
6522next section in reading order
6523</TD>
6524<TD>
65251.2.4
6526</TD>
6527</TR>
6528<TR>
6529<TD ALIGN="CENTER">
6530 [ &lt;&lt; ] </TD>
6531<TD ALIGN="CENTER">
6532FastBack
6533</TD>
6534<TD>
6535previous or up-and-previous section
6536</TD>
6537<TD>
65381.1
6539</TD>
6540</TR>
6541<TR>
6542<TD ALIGN="CENTER">
6543 [ Up ] </TD>
6544<TD ALIGN="CENTER">
6545Up
6546</TD>
6547<TD>
6548up section
6549</TD>
6550<TD>
65511.2
6552</TD>
6553</TR>
6554<TR>
6555<TD ALIGN="CENTER">
6556 [ &gt;&gt; ] </TD>
6557<TD ALIGN="CENTER">
6558FastForward
6559</TD>
6560<TD>
6561next or up-and-next section
6562</TD>
6563<TD>
65641.3
6565</TD>
6566</TR>
6567<TR>
6568<TD ALIGN="CENTER">
6569 [Top] </TD>
6570<TD ALIGN="CENTER">
6571Top
6572</TD>
6573<TD>
6574cover (top) of document
6575</TD>
6576<TD>
6577 &nbsp;
6578</TD>
6579</TR>
6580<TR>
6581<TD ALIGN="CENTER">
6582 [Contents] </TD>
6583<TD ALIGN="CENTER">
6584Contents
6585</TD>
6586<TD>
6587table of contents
6588</TD>
6589<TD>
6590 &nbsp;
6591</TD>
6592</TR>
6593<TR>
6594<TD ALIGN="CENTER">
6595 [Index] </TD>
6596<TD ALIGN="CENTER">
6597Index
6598</TD>
6599<TD>
6600concept index
6601</TD>
6602<TD>
6603 &nbsp;
6604</TD>
6605</TR>
6606<TR>
6607<TD ALIGN="CENTER">
6608 [ ? ] </TD>
6609<TD ALIGN="CENTER">
6610About
6611</TD>
6612<TD>
6613this page
6614</TD>
6615<TD>
6616 &nbsp;
6617</TD>
6618</TR>
6619</TABLE>
6620<P></P>
6621where the <STRONG> Example </STRONG> assumes that the current position
6622is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of
6623the following structure:
6624<UL>
6625<LI> 1. Section One </LI>
6626<UL>
6627<LI>1.1 Subsection One-One</LI>
6628<UL>
6629<LI> ... </LI>
6630</UL>
6631<LI>1.2 Subsection One-Two</LI>
6632<UL>
6633<LI>1.2.1 Subsubsection One-Two-One
6634</LI><LI>1.2.2 Subsubsection One-Two-Two
6635</LI><LI>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp; <STRONG>
6636&lt;== Current Position </STRONG>
6637</LI><LI>1.2.4 Subsubsection One-Two-Four
6638</LI></UL>
6639<LI>1.3 Subsection One-Three</LI>
6640<UL>
6641<LI> ... </LI>
6642</UL>
6643<LI>1.4 Subsection One-Four</LI>
6644</UL>
6645</UL>
6646
6647<HR SIZE=1>
6648<BR>
6649<FONT SIZE="-1">
6650This document was generated
6651by <I>Chet Ramey</I> on <I>July, 27 2004</I>
6652using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
6653"><I>texi2html</I></A>
6654
6655</BODY>
6656</HTML>