commit bash-20051123 snapshot
[platform/upstream/bash.git] / lib / readline / doc / readline.html
1 <HTML>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3 <!-- Created on November, 17  2005 by texi2html 1.64 -->
4 <!-- 
5 Written 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.
9 Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
10 Send 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
35 This document describes the GNU Readline Library, a utility which aids
36 in the consistency of user interface across discrete programs which
37 provide 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
68 This chapter describes the basic features of the GNU
69 command 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
101 The following paragraphs describe the notation used to represent
102 keystrokes.
103 </P><P>
104
105 The text <KBD>C-k</KBD> is read as `Control-K' and describes the character
106 produced when the <KBD>k</KBD> key is pressed while the Control key
107 is depressed.
108 </P><P>
109
110 The text <KBD>M-k</KBD> is read as `Meta-K' and describes the character
111 produced when the Meta key (if you have one) is depressed, and the <KBD>k</KBD>
112 key is pressed.
113 The Meta key is labeled <KBD>ALT</KBD> on many keyboards.
114 On keyboards with two keys labeled <KBD>ALT</KBD> (usually to either side of
115 the space bar), the <KBD>ALT</KBD> on the left side is generally set to
116 work as a Meta key.
117 The <KBD>ALT</KBD> key on the right may also be configured to work as a
118 Meta key or may be configured as some other modifier, such as a
119 Compose key for typing accented characters.
120 </P><P>
121
122 If you do not have a Meta or <KBD>ALT</KBD> key, or another key working as
123 a Meta key, the identical keystroke can be generated by typing <KBD>ESC</KBD>
124 <EM>first</EM>, and then typing <KBD>k</KBD>.
125 Either process is known as <EM>metafying</EM> the <KBD>k</KBD> key.
126 </P><P>
127
128 The text <KBD>M-C-k</KBD> is read as `Meta-Control-k' and describes the
129 character produced by <EM>metafying</EM> <KBD>C-k</KBD>.
130 </P><P>
131
132 In 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
134 stand 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>).
136 If your keyboard lacks a <KBD>LFD</KBD> key, typing <KBD>C-j</KBD> will
137 produce the desired character.
138 The <KBD>RET</KBD> key may be labeled <KBD>Return</KBD> or <KBD>Enter</KBD> on
139 some 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
160 Often during an interactive session you type in a long line of text,
161 only to notice that the first word on the line is misspelled.  The
162 Readline library gives you a set of commands for manipulating the text
163 as you type it in, allowing you to just fix your typo, and not forcing
164 you to retype the majority of the line.  Using these editing commands,
165 you move the cursor to the place that needs correction, and delete or
166 insert the text of the corrections.  Then, when you are satisfied with
167 the line, you simply press <KBD>RET</KBD>.  You do not have to be at the
168 end of the line to press <KBD>RET</KBD>; the entire line is accepted
169 regardless 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
199 In order to enter characters into the line, simply type them.  The typed
200 character appears where the cursor was, and then the cursor moves one
201 space to the right.  If you mistype a character, you can use your
202 erase character to back up and delete the mistyped character.
203 </P><P>
204
205 Sometimes you may mistype a character, and
206 not notice the error until you have typed several other characters.  In
207 that case, you can type <KBD>C-b</KBD> to move the cursor to the left, and then
208 correct your mistake.  Afterwards, you can move the cursor to the right
209 with <KBD>C-f</KBD>.
210 </P><P>
211
212 When you add text in the middle of a line, you will notice that characters
213 to the right of the cursor are `pushed over' to make room for the text
214 that you have inserted.  Likewise, when you delete text behind the cursor,
215 characters to the right of the cursor are `pulled back' to fill in the
216 blank space created by the removal of the text.  A list of the bare
217 essentials 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
233 empty line.
234 </DL>
235 <P>
236
237 (Depending on your configuration, the <KBD>Backspace</KBD> key be set to
238 delete the character to the left of the cursor and the <KBD>DEL</KBD> key set
239 to delete the character underneath the cursor, like <KBD>C-d</KBD>, rather
240 than 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
261 The above table describes the most basic keystrokes that you need
262 in order to do editing of the input line.  For your convenience, many
263 other 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
265 about 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
282 Notice how <KBD>C-f</KBD> moves forward a character, while <KBD>M-f</KBD> moves
283 forward a word.  It is a loose convention that control keystrokes
284 operate 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
310 it away for later use, usually by <EM>yanking</EM> (re-inserting)
311 it back into the line.
312 (`Cut' and `paste' are more recent jargon for `kill' and `yank'.)
313 </P><P>
314
315 If the description for a command says that it `kills' text, then you can
316 be sure that you can get the text back in a different (or the same)
317 place later.
318 </P><P>
319
320 When you use a kill command, the text is saved in a <EM>kill-ring</EM>.
321 Any number of consecutive kills save all of the killed text together, so
322 that when you yank it back, you get it all.  The kill
323 ring is not line specific; the text that you killed on a previously
324 typed line is available to be yanked back later, when you are typing
325 another line.
326 <A NAME="IDX3"></A>
327 </P><P>
328
329 Here 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
339 words, to the end of the next word.
340 Word 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
345 words, to the start of the previous word.
346 Word 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
357 Here is how to <EM>yank</EM> the text back into the line.  Yanking
358 means 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
368 the 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
390 You can pass numeric arguments to Readline commands.  Sometimes the
391 argument acts as a repeat count, other times it is the <I>sign</I> of the
392 argument that is significant.  If you pass a negative argument to a
393 command which normally acts in a forward direction, that command will
394 act in a backward direction.  For example, to kill text back to the
395 start of the line, you might type <SAMP>`M-- C-k'</SAMP>.
396 </P><P>
397
398 The general way to pass numeric arguments to a command is to type meta
399 digits before the command.  If the first `digit' typed is a minus
400 sign (<SAMP>`-'</SAMP>), then the sign of the argument will be negative.  Once
401 you have typed one meta digit to get the argument started, you can type
402 the remainder of the digits, and then the command.  For example, to give
403 the <KBD>C-d</KBD> command an argument of 10, you could type <SAMP>`M-1 0 C-d'</SAMP>,
404 which 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
425 Readline provides commands for searching through the command history
426 for lines containing a specified string.
427 There are two search modes:  <EM>incremental</EM> and <EM>non-incremental</EM>.
428 </P><P>
429
430 Incremental searches begin before the user has finished typing the
431 search string.
432 As each character of the search string is typed, Readline displays
433 the next entry from the history matching the string typed so far.
434 An incremental search requires only as many characters as needed to
435 find the desired history entry.
436 To 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.
438 The characters present in the value of the <CODE>isearch-terminators</CODE> variable
439 are used to terminate an incremental search.
440 If 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.
443 When the search is terminated, the history entry containing the
444 search string becomes the current line.
445 </P><P>
446
447 To find other matching entries in the history list, type <KBD>C-r</KBD> or
448 <KBD>C-s</KBD> as appropriate.
449 This will search backward or forward in the history for the next
450 entry matching the search string typed so far.
451 Any other key sequence bound to a Readline command will terminate
452 the search and execute that command.
453 For instance, a <KBD>RET</KBD> will terminate the search and accept
454 the line, thereby executing the command from the history list.
455 A movement command will terminate the search, make the last line found
456 the current line, and begin editing.
457 </P><P>
458
459 Readline remembers the last incremental search string.  If two
460 <KBD>C-r</KBD>s are typed without any intervening characters defining a new
461 search string, any remembered search string is used.
462 </P><P>
463
464 Non-incremental searches read the entire search string before starting
465 to search for matching history lines.  The search string may be
466 typed 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
487 Although the Readline library comes with a set of Emacs-like
488 keybindings installed by default, it is possible to use a different set
489 of keybindings.
490 Any user can customize programs that use Readline by putting
491 commands in an <EM>inputrc</EM> file, conventionally in his home directory.
492 The name of this
493 file is taken from the value of the environment variable <CODE>INPUTRC</CODE>.  If
494 that variable is unset, the default is <TT>`~/.inputrc'</TT>.
495 </P><P>
496
497 When a program which uses the Readline library starts up, the
498 init file is read, and the key bindings are set.
499 </P><P>
500
501 In addition, the <CODE>C-x C-r</CODE> command re-reads this init file, thus
502 incorporating 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
538 There are only a few basic constructs allowed in the
539 Readline init file.  Blank lines are ignored.
540 Lines beginning with a <SAMP>`#'</SAMP> are comments.
541 Lines beginning with a <SAMP>`$'</SAMP> indicate conditional
542 constructs (see section <A HREF="readline.html#SEC11">1.3.2 Conditional Init Constructs</A>).  Other lines
543 denote 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
549 altering the values of variables in Readline
550 using the <CODE>set</CODE> command within the init file.
551 The 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
557 Here, for example, is how to
558 change 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
565 Variable names and values, where appropriate, are recognized without regard
566 to case.  Unrecognized variable names are ignored.
567 </P><P>
568
569 Boolean variables (those that can be set to on or off) are set to on if
570 the value is null or empty, <VAR>on</VAR> (case-insensitive), or 1.  Any other
571 value results in the variable being set to off.
572 </P><P>
573
574 A great deal of run-time behavior is changeable with the following
575 variables.
576 </P><P>
577
578 <A NAME="IDX4"></A>
579 <DL COMPACT>
580
581 <DT><CODE>bell-style</CODE>
582 <DD><A NAME="IDX5"></A>
583 Controls what happens when Readline wants to ring the terminal bell.
584 If set to <SAMP>`none'</SAMP>, Readline never rings the bell.  If set to
585 <SAMP>`visible'</SAMP>, Readline uses a visible bell if one is available.
586 If set to <SAMP>`audible'</SAMP> (the default), Readline attempts to ring
587 the terminal's bell.
588 <P>
589
590 <DT><CODE>bind-tty-special-chars</CODE>
591 <DD><A NAME="IDX6"></A>
592 If set to <SAMP>`on'</SAMP>, Readline attempts to bind the control characters  
593 treated specially by the kernel's terminal driver to their Readline
594 equivalents.
595 <P>
596
597 <DT><CODE>comment-begin</CODE>
598 <DD><A NAME="IDX7"></A>
599 The string to insert at the beginning of the line when the
600 <CODE>insert-comment</CODE> command is executed.  The default value
601 is <CODE>"#"</CODE>.
602 <P>
603
604 <DT><CODE>completion-ignore-case</CODE>
605 <DD>If set to <SAMP>`on'</SAMP>, Readline performs filename matching and completion
606 in a case-insensitive fashion.
607 The default value is <SAMP>`off'</SAMP>.
608 <P>
609
610 <DT><CODE>completion-query-items</CODE>
611 <DD><A NAME="IDX8"></A>
612 The number of possible completions that determines when the user is
613 asked whether the list of possibilities should be displayed.
614 If the number of possible completions is greater than this value,
615 Readline will ask the user whether or not he wishes to view
616 them; otherwise, they are simply listed.
617 This variable must be set to an integer value greater than or equal to 0.
618 A negative value means Readline should never ask.
619 The default limit is <CODE>100</CODE>.
620 <P>
621
622 <DT><CODE>convert-meta</CODE>
623 <DD><A NAME="IDX9"></A>
624 If set to <SAMP>`on'</SAMP>, Readline will convert characters with the
625 eighth bit set to an ASCII key sequence by stripping the eighth
626 bit and prefixing an <KBD>ESC</KBD> character, converting them to a
627 meta-prefixed key sequence.  The default value is <SAMP>`on'</SAMP>.
628 <P>
629
630 <DT><CODE>disable-completion</CODE>
631 <DD><A NAME="IDX10"></A>
632 If set to <SAMP>`On'</SAMP>, Readline will inhibit word completion.
633 Completion  characters will be inserted into the line as if they had
634 been mapped to <CODE>self-insert</CODE>.  The default is <SAMP>`off'</SAMP>.
635 <P>
636
637 <DT><CODE>editing-mode</CODE>
638 <DD><A NAME="IDX11"></A>
639 The <CODE>editing-mode</CODE> variable controls which default set of
640 key bindings is used.  By default, Readline starts up in Emacs editing
641 mode, where the keystrokes are most similar to Emacs.  This variable can be
642 set to either <SAMP>`emacs'</SAMP> or <SAMP>`vi'</SAMP>.
643 <P>
644
645 <DT><CODE>enable-keypad</CODE>
646 <DD><A NAME="IDX12"></A>
647 When set to <SAMP>`on'</SAMP>, Readline will try to enable the application
648 keypad when it is called.  Some systems need this to enable the
649 arrow keys.  The default is <SAMP>`off'</SAMP>.
650 <P>
651
652 <DT><CODE>expand-tilde</CODE>
653 <DD><A NAME="IDX13"></A>
654 If set to <SAMP>`on'</SAMP>, tilde expansion is performed when Readline
655 attempts word completion.  The default is <SAMP>`off'</SAMP>.
656 <P>
657
658 <DT><CODE>history-preserve-point</CODE>
659 <DD><A NAME="IDX14"></A>
660 If set to <SAMP>`on'</SAMP>, the history code attempts to place point at the
661 same location on each history line retrieved with <CODE>previous-history</CODE>
662 or <CODE>next-history</CODE>.  The default is <SAMP>`off'</SAMP>.
663 <P>
664
665 <DT><CODE>horizontal-scroll-mode</CODE>
666 <DD><A NAME="IDX15"></A>
667 This variable can be set to either <SAMP>`on'</SAMP> or <SAMP>`off'</SAMP>.  Setting it
668 to <SAMP>`on'</SAMP> means that the text of the lines being edited will scroll
669 horizontally on a single screen line when they are longer than the width
670 of the screen, instead of wrapping onto a new screen line.  By default,
671 this variable is set to <SAMP>`off'</SAMP>.
672 <P>
673
674 <DT><CODE>input-meta</CODE>
675 <DD><A NAME="IDX16"></A>
676 <A NAME="IDX17"></A>
677 If set to <SAMP>`on'</SAMP>, Readline will enable eight-bit input (it
678 will not clear the eighth bit in the characters it reads),
679 regardless of what the terminal claims it can support.  The
680 default value is <SAMP>`off'</SAMP>.  The name <CODE>meta-flag</CODE> is a
681 synonym for this variable.
682 <P>
683
684 <DT><CODE>isearch-terminators</CODE>
685 <DD><A NAME="IDX18"></A>
686 The string of characters that should terminate an incremental search without
687 subsequently executing the character as a command (see section <A HREF="readline.html#SEC8">1.2.5 Searching for Commands in the History</A>).
688 If this variable has not been given a value, the characters <KBD>ESC</KBD> and
689 <KBD>C-J</KBD> will terminate an incremental search.
690 <P>
691
692 <DT><CODE>keymap</CODE>
693 <DD><A NAME="IDX19"></A>
694 Sets Readline's idea of the current keymap for key binding commands.
695 Acceptable <CODE>keymap</CODE> names are
696 <CODE>emacs</CODE>,
697 <CODE>emacs-standard</CODE>,
698 <CODE>emacs-meta</CODE>,
699 <CODE>emacs-ctlx</CODE>,
700 <CODE>vi</CODE>,
701 <CODE>vi-move</CODE>,
702 <CODE>vi-command</CODE>, and
703 <CODE>vi-insert</CODE>.
704 <CODE>vi</CODE> is equivalent to <CODE>vi-command</CODE>; <CODE>emacs</CODE> is
705 equivalent to <CODE>emacs-standard</CODE>.  The default value is <CODE>emacs</CODE>.
706 The value of the <CODE>editing-mode</CODE> variable also affects the
707 default keymap.
708 <P>
709
710 <DT><CODE>mark-directories</CODE>
711 <DD>If set to <SAMP>`on'</SAMP>, completed directory names have a slash
712 appended.  The default is <SAMP>`on'</SAMP>.
713 <P>
714
715 <DT><CODE>mark-modified-lines</CODE>
716 <DD><A NAME="IDX20"></A>
717 This variable, when set to <SAMP>`on'</SAMP>, causes Readline to display an
718 asterisk (<SAMP>`*'</SAMP>) at the start of history lines which have been modified.
719 This variable is <SAMP>`off'</SAMP> by default.
720 <P>
721
722 <DT><CODE>mark-symlinked-directories</CODE>
723 <DD><A NAME="IDX21"></A>
724 If set to <SAMP>`on'</SAMP>, completed names which are symbolic links
725 to directories have a slash appended (subject to the value of
726 <CODE>mark-directories</CODE>).
727 The default is <SAMP>`off'</SAMP>.
728 <P>
729
730 <DT><CODE>match-hidden-files</CODE>
731 <DD><A NAME="IDX22"></A>
732 This variable, when set to <SAMP>`on'</SAMP>, causes Readline to match files whose
733 names begin with a <SAMP>`.'</SAMP> (hidden files) when performing filename
734 completion, unless the leading <SAMP>`.'</SAMP> is
735 supplied by the user in the filename to be completed.
736 This variable is <SAMP>`on'</SAMP> by default.
737 <P>
738
739 <DT><CODE>output-meta</CODE>
740 <DD><A NAME="IDX23"></A>
741 If set to <SAMP>`on'</SAMP>, Readline will display characters with the
742 eighth bit set directly rather than as a meta-prefixed escape
743 sequence.  The default is <SAMP>`off'</SAMP>.
744 <P>
745
746 <DT><CODE>page-completions</CODE>
747 <DD><A NAME="IDX24"></A>
748 If set to <SAMP>`on'</SAMP>, Readline uses an internal <CODE>more</CODE>-like pager
749 to display a screenful of possible completions at a time.
750 This variable is <SAMP>`on'</SAMP> by default.
751 <P>
752
753 <DT><CODE>print-completions-horizontally</CODE>
754 <DD>If set to <SAMP>`on'</SAMP>, Readline will display completions with matches
755 sorted horizontally in alphabetical order, rather than down the screen.
756 The default is <SAMP>`off'</SAMP>.
757 <P>
758
759 <DT><CODE>show-all-if-ambiguous</CODE>
760 <DD><A NAME="IDX25"></A>
761 This alters the default behavior of the completion functions.  If
762 set to <SAMP>`on'</SAMP>, 
763 words which have more than one possible completion cause the
764 matches to be listed immediately instead of ringing the bell.
765 The default value is <SAMP>`off'</SAMP>.
766 <P>
767
768 <DT><CODE>show-all-if-unmodified</CODE>
769 <DD><A NAME="IDX26"></A>
770 This alters the default behavior of the completion functions in
771 a fashion similar to <VAR>show-all-if-ambiguous</VAR>.
772 If set to <SAMP>`on'</SAMP>, 
773 words which have more than one possible completion without any
774 possible partial completion (the possible completions don't share
775 a common prefix) cause the matches to be listed immediately instead
776 of ringing the bell.
777 The default value is <SAMP>`off'</SAMP>.
778 <P>
779
780 <DT><CODE>visible-stats</CODE>
781 <DD><A NAME="IDX27"></A>
782 If set to <SAMP>`on'</SAMP>, a character denoting a file's type
783 is appended to the filename when listing possible
784 completions.  The default is <SAMP>`off'</SAMP>.
785 <P>
786
787 </DL>
788 <P>
789
790 <DT>Key Bindings
791 <DD>The syntax for controlling key bindings in the init file is
792 simple.  First you need to find the name of the command that you
793 want to change.  The following sections contain tables of the command
794 name, the default keybinding, if any, and a short description of what
795 the command does.
796 <P>
797
798 Once you know the name of the command, simply place on a line
799 in the init file the name of the key
800 you wish to bind the command to, a colon, and then the name of the
801 command.  The name of the key
802 can be expressed in different ways, depending on what you find most
803 comfortable.
804 </P><P>
805
806 In addition to command names, readline allows keys to be bound
807 to a string that is inserted when the key is pressed (a <VAR>macro</VAR>).
808 </P><P>
809
810 <DL COMPACT>
811 <DT><VAR>keyname</VAR>: <VAR>function-name</VAR> or <VAR>macro</VAR>
812 <DD><VAR>keyname</VAR> is the name of a key spelled out in English.  For example:
813 <TABLE><tr><td>&nbsp;</td><td class=example><pre>Control-u: universal-argument
814 Meta-Rubout: backward-kill-word
815 Control-o: "&#62; output"
816 </pre></td></tr></table><P>
817
818 In the above example, <KBD>C-u</KBD> is bound to the function
819 <CODE>universal-argument</CODE>,
820 <KBD>M-DEL</KBD> is bound to the function <CODE>backward-kill-word</CODE>, and
821 <KBD>C-o</KBD> is bound to run the macro
822 expressed on the right hand side (that is, to insert the text
823 <SAMP>`&#62; output'</SAMP> into the line).
824 </P><P>
825
826 A number of symbolic character names are recognized while
827 processing this key binding syntax:
828 <VAR>DEL</VAR>,
829 <VAR>ESC</VAR>,
830 <VAR>ESCAPE</VAR>,
831 <VAR>LFD</VAR>,
832 <VAR>NEWLINE</VAR>,
833 <VAR>RET</VAR>,
834 <VAR>RETURN</VAR>,
835 <VAR>RUBOUT</VAR>,
836 <VAR>SPACE</VAR>,
837 <VAR>SPC</VAR>,
838 and
839 <VAR>TAB</VAR>.
840 </P><P>
841
842 <DT>"<VAR>keyseq</VAR>": <VAR>function-name</VAR> or <VAR>macro</VAR>
843 <DD><VAR>keyseq</VAR> differs from <VAR>keyname</VAR> above in that strings
844 denoting an entire key sequence can be specified, by placing
845 the key sequence in double quotes.  Some GNU Emacs style key
846 escapes can be used, as in the following example, but the
847 special character names are not recognized.
848 <P>
849
850 <TABLE><tr><td>&nbsp;</td><td class=example><pre>"\C-u": universal-argument
851 "\C-x\C-r": re-read-init-file
852 "\e[11~": "Function Key 1"
853 </pre></td></tr></table></P><P>
854
855 In the above example, <KBD>C-u</KBD> is again bound to the function
856 <CODE>universal-argument</CODE> (just as it was in the first example),
857 <SAMP>`<KBD>C-x</KBD> <KBD>C-r</KBD>'</SAMP> is bound to the function <CODE>re-read-init-file</CODE>,
858 and <SAMP>`<KBD>ESC</KBD> <KBD>[</KBD> <KBD>1</KBD> <KBD>1</KBD> <KBD>~</KBD>'</SAMP> is bound to insert
859 the text <SAMP>`Function Key 1'</SAMP>.
860 </P><P>
861
862 </DL>
863 <P>
864
865 The following GNU Emacs style escape sequences are available when
866 specifying key sequences:
867 </P><P>
868
869 <DL COMPACT>
870 <DT><CODE><KBD>\C-</KBD></CODE>
871 <DD>control prefix
872 <DT><CODE><KBD>\M-</KBD></CODE>
873 <DD>meta prefix
874 <DT><CODE><KBD>\e</KBD></CODE>
875 <DD>an escape character
876 <DT><CODE><KBD>\\</KBD></CODE>
877 <DD>backslash
878 <DT><CODE><KBD>\"</KBD></CODE>
879 <DD><KBD>"</KBD>, a double quotation mark
880 <DT><CODE><KBD>\'</KBD></CODE>
881 <DD><KBD>'</KBD>, a single quote or apostrophe
882 </DL>
883 <P>
884
885 In addition to the GNU Emacs style escape sequences, a second
886 set of backslash escapes is available:
887 </P><P>
888
889 <DL COMPACT>
890 <DT><CODE>\a</CODE>
891 <DD>alert (bell)
892 <DT><CODE>\b</CODE>
893 <DD>backspace
894 <DT><CODE>\d</CODE>
895 <DD>delete
896 <DT><CODE>\f</CODE>
897 <DD>form feed
898 <DT><CODE>\n</CODE>
899 <DD>newline
900 <DT><CODE>\r</CODE>
901 <DD>carriage return
902 <DT><CODE>\t</CODE>
903 <DD>horizontal tab
904 <DT><CODE>\v</CODE>
905 <DD>vertical tab
906 <DT><CODE>\<VAR>nnn</VAR></CODE>
907 <DD>the eight-bit character whose value is the octal value <VAR>nnn</VAR>
908 (one to three digits)
909 <DT><CODE>\x<VAR>HH</VAR></CODE>
910 <DD>the eight-bit character whose value is the hexadecimal value <VAR>HH</VAR>
911 (one or two hex digits)
912 </DL>
913 <P>
914
915 When entering the text of a macro, single or double quotes must
916 be used to indicate a macro definition.
917 Unquoted text is assumed to be a function name.
918 In the macro body, the backslash escapes described above are expanded.
919 Backslash will quote any other character in the macro text,
920 including <SAMP>`"'</SAMP> and <SAMP>`''</SAMP>.
921 For example, the following binding will make <SAMP>`<KBD>C-x</KBD> \'</SAMP>
922 insert a single <SAMP>`\'</SAMP> into the line:
923 <TABLE><tr><td>&nbsp;</td><td class=example><pre>"\C-x\\": "\\"
924 </pre></td></tr></table></P><P>
925
926 </DL>
927 <P>
928
929 <A NAME="Conditional Init Constructs"></A>
930 <HR SIZE="6">
931 <A NAME="SEC11"></A>
932 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
933 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC10"> &lt; </A>]</TD>
934 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC12"> &gt; </A>]</TD>
935 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC12"> &lt;&lt; </A>]</TD>
936 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> Up </A>]</TD>
937 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> &gt;&gt; </A>]</TD>
938 <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>
939 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
940 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
941 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
942 </TR></TABLE>
943 <H3> 1.3.2 Conditional Init Constructs </H3>
944 <!--docid::SEC11::-->
945 <P>
946
947 Readline implements a facility similar in spirit to the conditional
948 compilation features of the C preprocessor which allows key
949 bindings and variable settings to be performed as the result
950 of tests.  There are four parser directives used.
951 </P><P>
952
953 <DL COMPACT>
954 <DT><CODE>$if</CODE>
955 <DD>The <CODE>$if</CODE> construct allows bindings to be made based on the
956 editing mode, the terminal being used, or the application using
957 Readline.  The text of the test extends to the end of the line;
958 no characters are required to isolate it.
959 <P>
960
961 <DL COMPACT>
962 <DT><CODE>mode</CODE>
963 <DD>The <CODE>mode=</CODE> form of the <CODE>$if</CODE> directive is used to test
964 whether Readline is in <CODE>emacs</CODE> or <CODE>vi</CODE> mode.
965 This may be used in conjunction
966 with the <SAMP>`set keymap'</SAMP> command, for instance, to set bindings in
967 the <CODE>emacs-standard</CODE> and <CODE>emacs-ctlx</CODE> keymaps only if
968 Readline is starting out in <CODE>emacs</CODE> mode.
969 <P>
970
971 <DT><CODE>term</CODE>
972 <DD>The <CODE>term=</CODE> form may be used to include terminal-specific
973 key bindings, perhaps to bind the key sequences output by the
974 terminal's function keys.  The word on the right side of the
975 <SAMP>`='</SAMP> is tested against both the full name of the terminal and
976 the portion of the terminal name before the first <SAMP>`-'</SAMP>.  This
977 allows <CODE>sun</CODE> to match both <CODE>sun</CODE> and <CODE>sun-cmd</CODE>,
978 for instance.
979 <P>
980
981 <DT><CODE>application</CODE>
982 <DD>The <VAR>application</VAR> construct is used to include
983 application-specific settings.  Each program using the Readline
984 library sets the <VAR>application name</VAR>, and you can test for
985 a particular value. 
986 This could be used to bind key sequences to functions useful for
987 a specific program.  For instance, the following command adds a
988 key sequence that quotes the current or previous word in Bash:
989 <TABLE><tr><td>&nbsp;</td><td class=example><pre>$if Bash
990 # Quote the current or previous word
991 "\C-xq": "\eb\"\ef\""
992 $endif
993 </pre></td></tr></table></DL>
994 <P>
995
996 <DT><CODE>$endif</CODE>
997 <DD>This command, as seen in the previous example, terminates an
998 <CODE>$if</CODE> command.
999 <P>
1000
1001 <DT><CODE>$else</CODE>
1002 <DD>Commands in this branch of the <CODE>$if</CODE> directive are executed if
1003 the test fails.
1004 <P>
1005
1006 <DT><CODE>$include</CODE>
1007 <DD>This directive takes a single filename as an argument and reads commands
1008 and bindings from that file.
1009 For example, the following directive reads from <TT>`/etc/inputrc'</TT>:
1010 <TABLE><tr><td>&nbsp;</td><td class=example><pre>$include /etc/inputrc
1011 </pre></td></tr></table></DL>
1012 <P>
1013
1014 <A NAME="Sample Init File"></A>
1015 <HR SIZE="6">
1016 <A NAME="SEC12"></A>
1017 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1018 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC11"> &lt; </A>]</TD>
1019 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> &gt; </A>]</TD>
1020 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> &lt;&lt; </A>]</TD>
1021 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> Up </A>]</TD>
1022 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> &gt;&gt; </A>]</TD>
1023 <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>
1024 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1025 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1026 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1027 </TR></TABLE>
1028 <H3> 1.3.3 Sample Init File </H3>
1029 <!--docid::SEC12::-->
1030 <P>
1031
1032 Here is an example of an <VAR>inputrc</VAR> file.  This illustrates key
1033 binding, variable assignment, and conditional syntax.
1034 </P><P>
1035
1036 <TABLE><tr><td>&nbsp;</td><td class=example><pre># This file controls the behaviour of line input editing for
1037 # programs that use the GNU Readline library.  Existing
1038 # programs include FTP, Bash, and GDB.
1039 #
1040 # You can re-read the inputrc file with C-x C-r.
1041 # Lines beginning with '#' are comments.
1042 #
1043 # First, include any systemwide bindings and variable
1044 # assignments from /etc/Inputrc
1045 $include /etc/Inputrc
1046
1047 #
1048 # Set various bindings for emacs mode.
1049
1050 set editing-mode emacs 
1051
1052 $if mode=emacs
1053
1054 Meta-Control-h: backward-kill-word      Text after the function name is ignored
1055
1056 #
1057 # Arrow keys in keypad mode
1058 #
1059 #"\M-OD":        backward-char
1060 #"\M-OC":        forward-char
1061 #"\M-OA":        previous-history
1062 #"\M-OB":        next-history
1063 #
1064 # Arrow keys in ANSI mode
1065 #
1066 "\M-[D":        backward-char
1067 "\M-[C":        forward-char
1068 "\M-[A":        previous-history
1069 "\M-[B":        next-history
1070 #
1071 # Arrow keys in 8 bit keypad mode
1072 #
1073 #"\M-\C-OD":       backward-char
1074 #"\M-\C-OC":       forward-char
1075 #"\M-\C-OA":       previous-history
1076 #"\M-\C-OB":       next-history
1077 #
1078 # Arrow keys in 8 bit ANSI mode
1079 #
1080 #"\M-\C-[D":       backward-char
1081 #"\M-\C-[C":       forward-char
1082 #"\M-\C-[A":       previous-history
1083 #"\M-\C-[B":       next-history
1084
1085 C-q: quoted-insert
1086
1087 $endif
1088
1089 # An old-style binding.  This happens to be the default.
1090 TAB: complete
1091
1092 # Macros that are convenient for shell interaction
1093 $if Bash
1094 # edit the path
1095 "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
1096 # prepare to type a quoted word --
1097 # insert open and close double quotes
1098 # and move to just after the open quote
1099 "\C-x\"": "\"\"\C-b"
1100 # insert a backslash (testing backslash escapes
1101 # in sequences and macros)
1102 "\C-x\\": "\\"
1103 # Quote the current or previous word
1104 "\C-xq": "\eb\"\ef\""
1105 # Add a binding to refresh the line, which is unbound
1106 "\C-xr": redraw-current-line
1107 # Edit variable on current line.
1108 "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
1109 $endif
1110
1111 # use a visible bell if one is available
1112 set bell-style visible
1113
1114 # don't strip characters to 7 bits when reading
1115 set input-meta on
1116
1117 # allow iso-latin1 characters to be inserted rather
1118 # than converted to prefix-meta sequences
1119 set convert-meta off
1120
1121 # display characters with the eighth bit set directly
1122 # rather than as meta-prefixed characters
1123 set output-meta on
1124
1125 # if there are more than 150 possible completions for
1126 # a word, ask the user if he wants to see all of them
1127 set completion-query-items 150
1128
1129 # For FTP
1130 $if Ftp
1131 "\C-xg": "get \M-?"
1132 "\C-xt": "put \M-?"
1133 "\M-.": yank-last-arg
1134 $endif
1135 </pre></td></tr></table></P><P>
1136
1137 <A NAME="Bindable Readline Commands"></A>
1138 <HR SIZE="6">
1139 <A NAME="SEC13"></A>
1140 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1141 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC12"> &lt; </A>]</TD>
1142 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC14"> &gt; </A>]</TD>
1143 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &lt;&lt; </A>]</TD>
1144 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC1"> Up </A>]</TD>
1145 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1146 <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>
1147 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1148 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1149 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1150 </TR></TABLE>
1151 <H2> 1.4 Bindable Readline Commands </H2>
1152 <!--docid::SEC13::-->
1153 <P>
1154
1155 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> 
1156 <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>
1157 <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>
1158 <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>
1159 <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>
1160 <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>
1161 <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>
1162 <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>
1163 <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>
1164 </TABLE></BLOCKQUOTE>
1165 <P>
1166
1167 This section describes Readline commands that may be bound to key
1168 sequences.
1169 Command names without an accompanying key sequence are unbound by default.
1170 </P><P>
1171
1172 In the following descriptions, <EM>point</EM> refers to the current cursor
1173 position, and <EM>mark</EM> refers to a cursor position saved by the
1174 <CODE>set-mark</CODE> command.
1175 The text between the point and mark is referred to as the <EM>region</EM>.
1176 </P><P>
1177
1178 <A NAME="Commands For Moving"></A>
1179 <HR SIZE="6">
1180 <A NAME="SEC14"></A>
1181 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1182 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> &lt; </A>]</TD>
1183 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC15"> &gt; </A>]</TD>
1184 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &lt;&lt; </A>]</TD>
1185 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1186 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1187 <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>
1188 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1189 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1190 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1191 </TR></TABLE>
1192 <H3> 1.4.1 Commands For Moving </H3>
1193 <!--docid::SEC14::-->
1194 <DL COMPACT>
1195 <A NAME="IDX28"></A>
1196 <DT><CODE>beginning-of-line (C-a)</CODE>
1197 <DD><A NAME="IDX29"></A>
1198 Move to the start of the current line.
1199 <P>
1200
1201 <A NAME="IDX30"></A>
1202 <DT><CODE>end-of-line (C-e)</CODE>
1203 <DD><A NAME="IDX31"></A>
1204 Move to the end of the line.
1205 <P>
1206
1207 <A NAME="IDX32"></A>
1208 <DT><CODE>forward-char (C-f)</CODE>
1209 <DD><A NAME="IDX33"></A>
1210 Move forward a character.
1211 <P>
1212
1213 <A NAME="IDX34"></A>
1214 <DT><CODE>backward-char (C-b)</CODE>
1215 <DD><A NAME="IDX35"></A>
1216 Move back a character.
1217 <P>
1218
1219 <A NAME="IDX36"></A>
1220 <DT><CODE>forward-word (M-f)</CODE>
1221 <DD><A NAME="IDX37"></A>
1222 Move forward to the end of the next word.  Words are composed of
1223 letters and digits.
1224 <P>
1225
1226 <A NAME="IDX38"></A>
1227 <DT><CODE>backward-word (M-b)</CODE>
1228 <DD><A NAME="IDX39"></A>
1229 Move back to the start of the current or previous word.  Words are
1230 composed of letters and digits.
1231 <P>
1232
1233 <A NAME="IDX40"></A>
1234 <DT><CODE>clear-screen (C-l)</CODE>
1235 <DD><A NAME="IDX41"></A>
1236 Clear the screen and redraw the current line,
1237 leaving the current line at the top of the screen.
1238 <P>
1239
1240 <A NAME="IDX42"></A>
1241 <DT><CODE>redraw-current-line ()</CODE>
1242 <DD><A NAME="IDX43"></A>
1243 Refresh the current line.  By default, this is unbound.
1244 <P>
1245
1246 </DL>
1247 <P>
1248
1249 <A NAME="Commands For History"></A>
1250 <HR SIZE="6">
1251 <A NAME="SEC15"></A>
1252 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1253 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC14"> &lt; </A>]</TD>
1254 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC16"> &gt; </A>]</TD>
1255 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC16"> &lt;&lt; </A>]</TD>
1256 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1257 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1258 <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>
1259 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1260 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1261 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1262 </TR></TABLE>
1263 <H3> 1.4.2 Commands For Manipulating The History </H3>
1264 <!--docid::SEC15::-->
1265 <P>
1266
1267 <DL COMPACT>
1268 <A NAME="IDX44"></A>
1269 <DT><CODE>accept-line (Newline or Return)</CODE>
1270 <DD><A NAME="IDX45"></A>
1271 Accept the line regardless of where the cursor is.
1272 If this line is
1273 non-empty, it may be added to the history list for future recall with
1274 <CODE>add_history()</CODE>.
1275 If this line is a modified history line, the history line is restored
1276 to its original state.
1277 <P>
1278
1279 <A NAME="IDX46"></A>
1280 <DT><CODE>previous-history (C-p)</CODE>
1281 <DD><A NAME="IDX47"></A>
1282 Move `back' through the history list, fetching the previous command.
1283 <P>
1284
1285 <A NAME="IDX48"></A>
1286 <DT><CODE>next-history (C-n)</CODE>
1287 <DD><A NAME="IDX49"></A>
1288 Move `forward' through the history list, fetching the next command.
1289 <P>
1290
1291 <A NAME="IDX50"></A>
1292 <DT><CODE>beginning-of-history (M-&#60;)</CODE>
1293 <DD><A NAME="IDX51"></A>
1294 Move to the first line in the history.
1295 <P>
1296
1297 <A NAME="IDX52"></A>
1298 <DT><CODE>end-of-history (M-&#62;)</CODE>
1299 <DD><A NAME="IDX53"></A>
1300 Move to the end of the input history, i.e., the line currently
1301 being entered.
1302 <P>
1303
1304 <A NAME="IDX54"></A>
1305 <DT><CODE>reverse-search-history (C-r)</CODE>
1306 <DD><A NAME="IDX55"></A>
1307 Search backward starting at the current line and moving `up' through
1308 the history as necessary.  This is an incremental search.
1309 <P>
1310
1311 <A NAME="IDX56"></A>
1312 <DT><CODE>forward-search-history (C-s)</CODE>
1313 <DD><A NAME="IDX57"></A>
1314 Search forward starting at the current line and moving `down' through
1315 the the history as necessary.  This is an incremental search.
1316 <P>
1317
1318 <A NAME="IDX58"></A>
1319 <DT><CODE>non-incremental-reverse-search-history (M-p)</CODE>
1320 <DD><A NAME="IDX59"></A>
1321 Search backward starting at the current line and moving `up'
1322 through the history as necessary using a non-incremental search
1323 for a string supplied by the user.
1324 <P>
1325
1326 <A NAME="IDX60"></A>
1327 <DT><CODE>non-incremental-forward-search-history (M-n)</CODE>
1328 <DD><A NAME="IDX61"></A>
1329 Search forward starting at the current line and moving `down'
1330 through the the history as necessary using a non-incremental search
1331 for a string supplied by the user.
1332 <P>
1333
1334 <A NAME="IDX62"></A>
1335 <DT><CODE>history-search-forward ()</CODE>
1336 <DD><A NAME="IDX63"></A>
1337 Search forward through the history for the string of characters
1338 between the start of the current line and the point.
1339 This is a non-incremental search.
1340 By default, this command is unbound.
1341 <P>
1342
1343 <A NAME="IDX64"></A>
1344 <DT><CODE>history-search-backward ()</CODE>
1345 <DD><A NAME="IDX65"></A>
1346 Search backward through the history for the string of characters
1347 between the start of the current line and the point.  This
1348 is a non-incremental search.  By default, this command is unbound.
1349 <P>
1350
1351 <A NAME="IDX66"></A>
1352 <DT><CODE>yank-nth-arg (M-C-y)</CODE>
1353 <DD><A NAME="IDX67"></A>
1354 Insert the first argument to the previous command (usually
1355 the second word on the previous line) at point.
1356 With an argument <VAR>n</VAR>,
1357 insert the <VAR>n</VAR>th word from the previous command (the words
1358 in the previous command begin with word 0).  A negative argument
1359 inserts the <VAR>n</VAR>th word from the end of the previous command.
1360 Once the argument <VAR>n</VAR> is computed, the argument is extracted
1361 as if the <SAMP>`!<VAR>n</VAR>'</SAMP> history expansion had been specified.
1362 <P>
1363
1364 <A NAME="IDX68"></A>
1365 <DT><CODE>yank-last-arg (M-. or M-_)</CODE>
1366 <DD><A NAME="IDX69"></A>
1367 Insert last argument to the previous command (the last word of the
1368 previous history entry).  With an
1369 argument, behave exactly like <CODE>yank-nth-arg</CODE>.
1370 Successive calls to <CODE>yank-last-arg</CODE> move back through the history
1371 list, inserting the last argument of each line in turn.
1372 The history expansion facilities are used to extract the last argument,
1373 as if the <SAMP>`!$'</SAMP> history expansion had been specified.
1374 <P>
1375
1376 </DL>
1377 <P>
1378
1379 <A NAME="Commands For Text"></A>
1380 <HR SIZE="6">
1381 <A NAME="SEC16"></A>
1382 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1383 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC15"> &lt; </A>]</TD>
1384 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC17"> &gt; </A>]</TD>
1385 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC17"> &lt;&lt; </A>]</TD>
1386 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1387 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1388 <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>
1389 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1390 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1391 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1392 </TR></TABLE>
1393 <H3> 1.4.3 Commands For Changing Text </H3>
1394 <!--docid::SEC16::-->
1395 <P>
1396
1397 <DL COMPACT>
1398 <A NAME="IDX70"></A>
1399 <DT><CODE>delete-char (C-d)</CODE>
1400 <DD><A NAME="IDX71"></A>
1401 Delete the character at point.  If point is at the
1402 beginning of the line, there are no characters in the line, and
1403 the last character typed was not bound to <CODE>delete-char</CODE>, then
1404 return EOF.
1405 <P>
1406
1407 <A NAME="IDX72"></A>
1408 <DT><CODE>backward-delete-char (Rubout)</CODE>
1409 <DD><A NAME="IDX73"></A>
1410 Delete the character behind the cursor.  A numeric argument means
1411 to kill the characters instead of deleting them.
1412 <P>
1413
1414 <A NAME="IDX74"></A>
1415 <DT><CODE>forward-backward-delete-char ()</CODE>
1416 <DD><A NAME="IDX75"></A>
1417 Delete the character under the cursor, unless the cursor is at the
1418 end of the line, in which case the character behind the cursor is
1419 deleted.  By default, this is not bound to a key.
1420 <P>
1421
1422 <A NAME="IDX76"></A>
1423 <DT><CODE>quoted-insert (C-q or C-v)</CODE>
1424 <DD><A NAME="IDX77"></A>
1425 Add the next character typed to the line verbatim.  This is
1426 how to insert key sequences like <KBD>C-q</KBD>, for example.
1427 <P>
1428
1429 <A NAME="IDX78"></A>
1430 <DT><CODE>tab-insert (M-<KBD>TAB</KBD>)</CODE>
1431 <DD><A NAME="IDX79"></A>
1432 Insert a tab character.
1433 <P>
1434
1435 <A NAME="IDX80"></A>
1436 <DT><CODE>self-insert (a, b, A, 1, !, <small>...</small>)</CODE>
1437 <DD><A NAME="IDX81"></A>
1438 Insert yourself.
1439 <P>
1440
1441 <A NAME="IDX82"></A>
1442 <DT><CODE>transpose-chars (C-t)</CODE>
1443 <DD><A NAME="IDX83"></A>
1444 Drag the character before the cursor forward over
1445 the character at the cursor, moving the
1446 cursor forward as well.  If the insertion point
1447 is at the end of the line, then this
1448 transposes the last two characters of the line.
1449 Negative arguments have no effect.
1450 <P>
1451
1452 <A NAME="IDX84"></A>
1453 <DT><CODE>transpose-words (M-t)</CODE>
1454 <DD><A NAME="IDX85"></A>
1455 Drag the word before point past the word after point,
1456 moving point past that word as well.
1457 If the insertion point is at the end of the line, this transposes
1458 the last two words on the line.
1459 <P>
1460
1461 <A NAME="IDX86"></A>
1462 <DT><CODE>upcase-word (M-u)</CODE>
1463 <DD><A NAME="IDX87"></A>
1464 Uppercase the current (or following) word.  With a negative argument,
1465 uppercase the previous word, but do not move the cursor.
1466 <P>
1467
1468 <A NAME="IDX88"></A>
1469 <DT><CODE>downcase-word (M-l)</CODE>
1470 <DD><A NAME="IDX89"></A>
1471 Lowercase the current (or following) word.  With a negative argument,
1472 lowercase the previous word, but do not move the cursor.
1473 <P>
1474
1475 <A NAME="IDX90"></A>
1476 <DT><CODE>capitalize-word (M-c)</CODE>
1477 <DD><A NAME="IDX91"></A>
1478 Capitalize the current (or following) word.  With a negative argument,
1479 capitalize the previous word, but do not move the cursor.
1480 <P>
1481
1482 <A NAME="IDX92"></A>
1483 <DT><CODE>overwrite-mode ()</CODE>
1484 <DD><A NAME="IDX93"></A>
1485 Toggle overwrite mode.  With an explicit positive numeric argument,
1486 switches to overwrite mode.  With an explicit non-positive numeric
1487 argument, switches to insert mode.  This command affects only
1488 <CODE>emacs</CODE> mode; <CODE>vi</CODE> mode does overwrite differently.
1489 Each call to <CODE>readline()</CODE> starts in insert mode.
1490 <P>
1491
1492 In overwrite mode, characters bound to <CODE>self-insert</CODE> replace
1493 the text at point rather than pushing the text to the right.
1494 Characters bound to <CODE>backward-delete-char</CODE> replace the character
1495 before point with a space.
1496 </P><P>
1497
1498 By default, this command is unbound.
1499 </P><P>
1500
1501 </DL>
1502 <P>
1503
1504 <A NAME="Commands For Killing"></A>
1505 <HR SIZE="6">
1506 <A NAME="SEC17"></A>
1507 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1508 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC16"> &lt; </A>]</TD>
1509 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC18"> &gt; </A>]</TD>
1510 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC18"> &lt;&lt; </A>]</TD>
1511 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1512 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1513 <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>
1514 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1515 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1516 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1517 </TR></TABLE>
1518 <H3> 1.4.4 Killing And Yanking </H3>
1519 <!--docid::SEC17::-->
1520 <P>
1521
1522 <DL COMPACT>
1523
1524 <A NAME="IDX94"></A>
1525 <DT><CODE>kill-line (C-k)</CODE>
1526 <DD><A NAME="IDX95"></A>
1527 Kill the text from point to the end of the line.
1528 <P>
1529
1530 <A NAME="IDX96"></A>
1531 <DT><CODE>backward-kill-line (C-x Rubout)</CODE>
1532 <DD><A NAME="IDX97"></A>
1533 Kill backward to the beginning of the line.
1534 <P>
1535
1536 <A NAME="IDX98"></A>
1537 <DT><CODE>unix-line-discard (C-u)</CODE>
1538 <DD><A NAME="IDX99"></A>
1539 Kill backward from the cursor to the beginning of the current line.
1540 <P>
1541
1542 <A NAME="IDX100"></A>
1543 <DT><CODE>kill-whole-line ()</CODE>
1544 <DD><A NAME="IDX101"></A>
1545 Kill all characters on the current line, no matter where point is.
1546 By default, this is unbound.
1547 <P>
1548
1549 <A NAME="IDX102"></A>
1550 <DT><CODE>kill-word (M-d)</CODE>
1551 <DD><A NAME="IDX103"></A>
1552 Kill from point to the end of the current word, or if between
1553 words, to the end of the next word.
1554 Word boundaries are the same as <CODE>forward-word</CODE>.
1555 <P>
1556
1557 <A NAME="IDX104"></A>
1558 <DT><CODE>backward-kill-word (M-<KBD>DEL</KBD>)</CODE>
1559 <DD><A NAME="IDX105"></A>
1560 Kill the word behind point.
1561 Word boundaries are the same as <CODE>backward-word</CODE>.
1562 <P>
1563
1564 <A NAME="IDX106"></A>
1565 <DT><CODE>unix-word-rubout (C-w)</CODE>
1566 <DD><A NAME="IDX107"></A>
1567 Kill the word behind point, using white space as a word boundary.
1568 The killed text is saved on the kill-ring.
1569 <P>
1570
1571 <A NAME="IDX108"></A>
1572 <DT><CODE>unix-filename-rubout ()</CODE>
1573 <DD><A NAME="IDX109"></A>
1574 Kill the word behind point, using white space and the slash character
1575 as the word boundaries.
1576 The killed text is saved on the kill-ring.
1577 <P>
1578
1579 <A NAME="IDX110"></A>
1580 <DT><CODE>delete-horizontal-space ()</CODE>
1581 <DD><A NAME="IDX111"></A>
1582 Delete all spaces and tabs around point.  By default, this is unbound.
1583 <P>
1584
1585 <A NAME="IDX112"></A>
1586 <DT><CODE>kill-region ()</CODE>
1587 <DD><A NAME="IDX113"></A>
1588 Kill the text in the current region.
1589 By default, this command is unbound.
1590 <P>
1591
1592 <A NAME="IDX114"></A>
1593 <DT><CODE>copy-region-as-kill ()</CODE>
1594 <DD><A NAME="IDX115"></A>
1595 Copy the text in the region to the kill buffer, so it can be yanked
1596 right away.  By default, this command is unbound.
1597 <P>
1598
1599 <A NAME="IDX116"></A>
1600 <DT><CODE>copy-backward-word ()</CODE>
1601 <DD><A NAME="IDX117"></A>
1602 Copy the word before point to the kill buffer.
1603 The word boundaries are the same as <CODE>backward-word</CODE>.
1604 By default, this command is unbound.
1605 <P>
1606
1607 <A NAME="IDX118"></A>
1608 <DT><CODE>copy-forward-word ()</CODE>
1609 <DD><A NAME="IDX119"></A>
1610 Copy the word following point to the kill buffer.
1611 The word boundaries are the same as <CODE>forward-word</CODE>.
1612 By default, this command is unbound.
1613 <P>
1614
1615 <A NAME="IDX120"></A>
1616 <DT><CODE>yank (C-y)</CODE>
1617 <DD><A NAME="IDX121"></A>
1618 Yank the top of the kill ring into the buffer at point.
1619 <P>
1620
1621 <A NAME="IDX122"></A>
1622 <DT><CODE>yank-pop (M-y)</CODE>
1623 <DD><A NAME="IDX123"></A>
1624 Rotate the kill-ring, and yank the new top.  You can only do this if
1625 the prior command is <CODE>yank</CODE> or <CODE>yank-pop</CODE>.
1626 </DL>
1627 <P>
1628
1629 <A NAME="Numeric Arguments"></A>
1630 <HR SIZE="6">
1631 <A NAME="SEC18"></A>
1632 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1633 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC17"> &lt; </A>]</TD>
1634 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC19"> &gt; </A>]</TD>
1635 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC19"> &lt;&lt; </A>]</TD>
1636 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1637 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1638 <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>
1639 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1640 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1641 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1642 </TR></TABLE>
1643 <H3> 1.4.5 Specifying Numeric Arguments </H3>
1644 <!--docid::SEC18::-->
1645 <DL COMPACT>
1646
1647 <A NAME="IDX124"></A>
1648 <DT><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, <small>...</small> <KBD>M--</KBD>)</CODE>
1649 <DD><A NAME="IDX125"></A>
1650 Add this digit to the argument already accumulating, or start a new
1651 argument.  <KBD>M--</KBD> starts a negative argument.
1652 <P>
1653
1654 <A NAME="IDX126"></A>
1655 <DT><CODE>universal-argument ()</CODE>
1656 <DD><A NAME="IDX127"></A>
1657 This is another way to specify an argument.
1658 If this command is followed by one or more digits, optionally with a
1659 leading minus sign, those digits define the argument.
1660 If the command is followed by digits, executing <CODE>universal-argument</CODE>
1661 again ends the numeric argument, but is otherwise ignored.
1662 As a special case, if this command is immediately followed by a
1663 character that is neither a digit or minus sign, the argument count
1664 for the next command is multiplied by four.
1665 The argument count is initially one, so executing this function the
1666 first time makes the argument count four, a second time makes the
1667 argument count sixteen, and so on.
1668 By default, this is not bound to a key.
1669 </DL>
1670 <P>
1671
1672 <A NAME="Commands For Completion"></A>
1673 <HR SIZE="6">
1674 <A NAME="SEC19"></A>
1675 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1676 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC18"> &lt; </A>]</TD>
1677 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC20"> &gt; </A>]</TD>
1678 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC20"> &lt;&lt; </A>]</TD>
1679 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1680 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1681 <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>
1682 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1683 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1684 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1685 </TR></TABLE>
1686 <H3> 1.4.6 Letting Readline Type For You </H3>
1687 <!--docid::SEC19::-->
1688 <P>
1689
1690 <DL COMPACT>
1691 <A NAME="IDX128"></A>
1692 <DT><CODE>complete (<KBD>TAB</KBD>)</CODE>
1693 <DD><A NAME="IDX129"></A>
1694 Attempt to perform completion on the text before point.
1695 The actual completion performed is application-specific.
1696 The default is filename completion.
1697 <P>
1698
1699 <A NAME="IDX130"></A>
1700 <DT><CODE>possible-completions (M-?)</CODE>
1701 <DD><A NAME="IDX131"></A>
1702 List the possible completions of the text before point.
1703 <P>
1704
1705 <A NAME="IDX132"></A>
1706 <DT><CODE>insert-completions (M-*)</CODE>
1707 <DD><A NAME="IDX133"></A>
1708 Insert all completions of the text before point that would have
1709 been generated by <CODE>possible-completions</CODE>.
1710 <P>
1711
1712 <A NAME="IDX134"></A>
1713 <DT><CODE>menu-complete ()</CODE>
1714 <DD><A NAME="IDX135"></A>
1715 Similar to <CODE>complete</CODE>, but replaces the word to be completed
1716 with a single match from the list of possible completions.
1717 Repeated execution of <CODE>menu-complete</CODE> steps through the list
1718 of possible completions, inserting each match in turn.
1719 At the end of the list of completions, the bell is rung
1720 (subject to the setting of <CODE>bell-style</CODE>)
1721 and the original text is restored.
1722 An argument of <VAR>n</VAR> moves <VAR>n</VAR> positions forward in the list
1723 of matches; a negative argument may be used to move backward
1724 through the list.
1725 This command is intended to be bound to <KBD>TAB</KBD>, but is unbound
1726 by default.
1727 <P>
1728
1729 <A NAME="IDX136"></A>
1730 <DT><CODE>delete-char-or-list ()</CODE>
1731 <DD><A NAME="IDX137"></A>
1732 Deletes the character under the cursor if not at the beginning or
1733 end of the line (like <CODE>delete-char</CODE>).
1734 If at the end of the line, behaves identically to
1735 <CODE>possible-completions</CODE>.
1736 This command is unbound by default.
1737 <P>
1738
1739 </DL>
1740 <P>
1741
1742 <A NAME="Keyboard Macros"></A>
1743 <HR SIZE="6">
1744 <A NAME="SEC20"></A>
1745 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1746 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC19"> &lt; </A>]</TD>
1747 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC21"> &gt; </A>]</TD>
1748 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC21"> &lt;&lt; </A>]</TD>
1749 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1750 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1751 <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>
1752 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1753 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1754 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1755 </TR></TABLE>
1756 <H3> 1.4.7 Keyboard Macros </H3>
1757 <!--docid::SEC20::-->
1758 <DL COMPACT>
1759
1760 <A NAME="IDX138"></A>
1761 <DT><CODE>start-kbd-macro (C-x ()</CODE>
1762 <DD><A NAME="IDX139"></A>
1763 Begin saving the characters typed into the current keyboard macro.
1764 <P>
1765
1766 <A NAME="IDX140"></A>
1767 <DT><CODE>end-kbd-macro (C-x ))</CODE>
1768 <DD><A NAME="IDX141"></A>
1769 Stop saving the characters typed into the current keyboard macro
1770 and save the definition.
1771 <P>
1772
1773 <A NAME="IDX142"></A>
1774 <DT><CODE>call-last-kbd-macro (C-x e)</CODE>
1775 <DD><A NAME="IDX143"></A>
1776 Re-execute the last keyboard macro defined, by making the characters
1777 in the macro appear as if typed at the keyboard.
1778 <P>
1779
1780 </DL>
1781 <P>
1782
1783 <A NAME="Miscellaneous Commands"></A>
1784 <HR SIZE="6">
1785 <A NAME="SEC21"></A>
1786 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1787 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC20"> &lt; </A>]</TD>
1788 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt; </A>]</TD>
1789 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &lt;&lt; </A>]</TD>
1790 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1791 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD>
1792 <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>
1793 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1794 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1795 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1796 </TR></TABLE>
1797 <H3> 1.4.8 Some Miscellaneous Commands </H3>
1798 <!--docid::SEC21::-->
1799 <DL COMPACT>
1800
1801 <A NAME="IDX144"></A>
1802 <DT><CODE>re-read-init-file (C-x C-r)</CODE>
1803 <DD><A NAME="IDX145"></A>
1804 Read in the contents of the <VAR>inputrc</VAR> file, and incorporate
1805 any bindings or variable assignments found there.
1806 <P>
1807
1808 <A NAME="IDX146"></A>
1809 <DT><CODE>abort (C-g)</CODE>
1810 <DD><A NAME="IDX147"></A>
1811 Abort the current editing command and
1812 ring the terminal's bell (subject to the setting of
1813 <CODE>bell-style</CODE>).
1814 <P>
1815
1816 <A NAME="IDX148"></A>
1817 <DT><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, <small>...</small>)</CODE>
1818 <DD><A NAME="IDX149"></A>
1819 If the metafied character <VAR>x</VAR> is lowercase, run the command
1820 that is bound to the corresponding uppercase character.
1821 <P>
1822
1823 <A NAME="IDX150"></A>
1824 <DT><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE>
1825 <DD><A NAME="IDX151"></A>
1826 Metafy the next character typed.  This is for keyboards
1827 without a meta key.  Typing <SAMP>`<KBD>ESC</KBD> f'</SAMP> is equivalent to typing
1828 <KBD>M-f</KBD>.
1829 <P>
1830
1831 <A NAME="IDX152"></A>
1832 <DT><CODE>undo (C-_ or C-x C-u)</CODE>
1833 <DD><A NAME="IDX153"></A>
1834 Incremental undo, separately remembered for each line.
1835 <P>
1836
1837 <A NAME="IDX154"></A>
1838 <DT><CODE>revert-line (M-r)</CODE>
1839 <DD><A NAME="IDX155"></A>
1840 Undo all changes made to this line.  This is like executing the <CODE>undo</CODE>
1841 command enough times to get back to the beginning.
1842 <P>
1843
1844 <A NAME="IDX156"></A>
1845 <DT><CODE>tilde-expand (M-~)</CODE>
1846 <DD><A NAME="IDX157"></A>
1847 Perform tilde expansion on the current word.
1848 <P>
1849
1850 <A NAME="IDX158"></A>
1851 <DT><CODE>set-mark (C-@)</CODE>
1852 <DD><A NAME="IDX159"></A>
1853 Set the mark to the point.  If a
1854 numeric argument is supplied, the mark is set to that position.
1855 <P>
1856
1857 <A NAME="IDX160"></A>
1858 <DT><CODE>exchange-point-and-mark (C-x C-x)</CODE>
1859 <DD><A NAME="IDX161"></A>
1860 Swap the point with the mark.  The current cursor position is set to
1861 the saved position, and the old cursor position is saved as the mark.
1862 <P>
1863
1864 <A NAME="IDX162"></A>
1865 <DT><CODE>character-search (C-])</CODE>
1866 <DD><A NAME="IDX163"></A>
1867 A character is read and point is moved to the next occurrence of that
1868 character.  A negative count searches for previous occurrences.
1869 <P>
1870
1871 <A NAME="IDX164"></A>
1872 <DT><CODE>character-search-backward (M-C-])</CODE>
1873 <DD><A NAME="IDX165"></A>
1874 A character is read and point is moved to the previous occurrence
1875 of that character.  A negative count searches for subsequent
1876 occurrences.
1877 <P>
1878
1879 <A NAME="IDX166"></A>
1880 <DT><CODE>insert-comment (M-#)</CODE>
1881 <DD><A NAME="IDX167"></A>
1882 Without a numeric argument, the value of the <CODE>comment-begin</CODE>
1883 variable is inserted at the beginning of the current line.
1884 If a numeric argument is supplied, this command acts as a toggle:  if
1885 the characters at the beginning of the line do not match the value
1886 of <CODE>comment-begin</CODE>, the value is inserted, otherwise
1887 the characters in <CODE>comment-begin</CODE> are deleted from the beginning of
1888 the line.
1889 In either case, the line is accepted as if a newline had been typed.
1890 <P>
1891
1892 <A NAME="IDX168"></A>
1893 <DT><CODE>dump-functions ()</CODE>
1894 <DD><A NAME="IDX169"></A>
1895 Print all of the functions and their key bindings to the
1896 Readline output stream.  If a numeric argument is supplied,
1897 the output is formatted in such a way that it can be made part
1898 of an <VAR>inputrc</VAR> file.  This command is unbound by default.
1899 <P>
1900
1901 <A NAME="IDX170"></A>
1902 <DT><CODE>dump-variables ()</CODE>
1903 <DD><A NAME="IDX171"></A>
1904 Print all of the settable variables and their values to the
1905 Readline output stream.  If a numeric argument is supplied,
1906 the output is formatted in such a way that it can be made part
1907 of an <VAR>inputrc</VAR> file.  This command is unbound by default.
1908 <P>
1909
1910 <A NAME="IDX172"></A>
1911 <DT><CODE>dump-macros ()</CODE>
1912 <DD><A NAME="IDX173"></A>
1913 Print all of the Readline key sequences bound to macros and the
1914 strings they output.  If a numeric argument is supplied,
1915 the output is formatted in such a way that it can be made part
1916 of an <VAR>inputrc</VAR> file.  This command is unbound by default.
1917 <P>
1918
1919 <A NAME="IDX174"></A>
1920 <DT><CODE>emacs-editing-mode (C-e)</CODE>
1921 <DD><A NAME="IDX175"></A>
1922 When in <CODE>vi</CODE> command mode, this causes a switch to <CODE>emacs</CODE>
1923 editing mode.
1924 <P>
1925
1926 <A NAME="IDX176"></A>
1927 <DT><CODE>vi-editing-mode (M-C-j)</CODE>
1928 <DD><A NAME="IDX177"></A>
1929 When in <CODE>emacs</CODE> editing mode, this causes a switch to <CODE>vi</CODE>
1930 editing mode.
1931 <P>
1932
1933 </DL>
1934 <P>
1935
1936 <A NAME="Readline vi Mode"></A>
1937 <HR SIZE="6">
1938 <A NAME="SEC22"></A>
1939 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1940 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC21"> &lt; </A>]</TD>
1941 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> &gt; </A>]</TD>
1942 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
1943 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC1"> Up </A>]</TD>
1944 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> &gt;&gt; </A>]</TD>
1945 <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>
1946 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1947 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1948 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1949 </TR></TABLE>
1950 <H2> 1.5 Readline vi Mode </H2>
1951 <!--docid::SEC22::-->
1952 <P>
1953
1954 While the Readline library does not have a full set of <CODE>vi</CODE>
1955 editing functions, it does contain enough to allow simple editing
1956 of the line.  The Readline <CODE>vi</CODE> mode behaves as specified in
1957 the POSIX 1003.2 standard.
1958 </P><P>
1959
1960 In order to switch interactively between <CODE>emacs</CODE> and <CODE>vi</CODE>
1961 editing modes, use the command <KBD>M-C-j</KBD> (bound to emacs-editing-mode
1962 when in <CODE>vi</CODE> mode and to vi-editing-mode in <CODE>emacs</CODE> mode).
1963 The Readline default is <CODE>emacs</CODE> mode.
1964 </P><P>
1965
1966 When you enter a line in <CODE>vi</CODE> mode, you are already placed in
1967 `insertion' mode, as if you had typed an <SAMP>`i'</SAMP>.  Pressing <KBD>ESC</KBD>
1968 switches you into `command' mode, where you can edit the text of the
1969 line with the standard <CODE>vi</CODE> movement keys, move to previous
1970 history lines with <SAMP>`k'</SAMP> and subsequent lines with <SAMP>`j'</SAMP>, and
1971 so forth.
1972 </P><P>
1973
1974 This document describes the GNU Readline Library, a utility for aiding
1975 in the consistency of user interface across discrete programs that need
1976 to provide a command line interface.
1977 </P><P>
1978
1979 Copyright (C) 1988-2005 Free Software Foundation, Inc.
1980 </P><P>
1981
1982 Permission is granted to make and distribute verbatim copies of
1983 this manual provided the copyright notice and this permission notice
1984 pare preserved on all copies.
1985 </P><P>
1986
1987 Permission is granted to copy and distribute modified versions of this
1988 manual under the conditions for verbatim copying, provided that the entire
1989 resulting derived work is distributed under the terms of a permission
1990 notice identical to this one.
1991 </P><P>
1992
1993 Permission is granted to copy and distribute translations of this manual
1994 into another language, under the above conditions for modified versions,
1995 except that this permission notice may be stated in a translation approved
1996 by the Foundation.
1997 </P><P>
1998
1999 <A NAME="Programming with GNU Readline"></A>
2000 <HR SIZE="6">
2001 <A NAME="SEC23"></A>
2002 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2003 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &lt; </A>]</TD>
2004 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC24"> &gt; </A>]</TD>
2005 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
2006 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> Up </A>]</TD>
2007 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
2008 <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>
2009 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2010 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2011 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2012 </TR></TABLE>
2013 <H1> 2. Programming with GNU Readline </H1>
2014 <!--docid::SEC23::-->
2015 <P>
2016
2017 This chapter describes the interface between the GNU Readline Library and
2018 other programs.  If you are a programmer, and you wish to include the
2019 features found in GNU Readline
2020 such as completion, line editing, and interactive history manipulation
2021 in your own programs, this section is for you.
2022 </P><P>
2023
2024 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> 
2025 <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>
2026 <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>
2027 <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
2028                                         functions.</TD></TR>
2029 <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
2030                                         aid in writing your own custom
2031                                         functions.</TD></TR>
2032 <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>
2033 <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
2034                         completion functions.</TD></TR>
2035 </TABLE></BLOCKQUOTE>
2036 <P>
2037
2038 <A NAME="Basic Behavior"></A>
2039 <HR SIZE="6">
2040 <A NAME="SEC24"></A>
2041 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2042 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> &lt; </A>]</TD>
2043 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC25"> &gt; </A>]</TD>
2044 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
2045 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
2046 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
2047 <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>
2048 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2049 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2050 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2051 </TR></TABLE>
2052 <H2> 2.1 Basic Behavior </H2>
2053 <!--docid::SEC24::-->
2054 <P>
2055
2056 Many programs provide a command line interface, such as <CODE>mail</CODE>,
2057 <CODE>ftp</CODE>, and <CODE>sh</CODE>.  For such programs, the default behaviour of
2058 Readline is sufficient.  This section describes how to use Readline in
2059 the simplest way possible, perhaps to replace calls in your code to
2060 <CODE>gets()</CODE> or <CODE>fgets()</CODE>.
2061 </P><P>
2062
2063 <A NAME="IDX178"></A>
2064 <A NAME="IDX179"></A>
2065 </P><P>
2066
2067 The function <CODE>readline()</CODE> prints a prompt <VAR>prompt</VAR>
2068 and then reads and returns a single line of text from the user.
2069 If <VAR>prompt</VAR> is <CODE>NULL</CODE> or the empty string, no prompt is displayed.
2070 The line <CODE>readline</CODE> returns is allocated with <CODE>malloc()</CODE>;
2071 the caller should <CODE>free()</CODE> the line when it has finished with it.
2072 The declaration for <CODE>readline</CODE> in ANSI C is
2073 </P><P>
2074
2075 <TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>char *readline (const char *<VAR>prompt</VAR>);</CODE>
2076 </pre></td></tr></table></P><P>
2077
2078 So, one might say
2079 <TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>char *line = readline ("Enter a line: ");</CODE>
2080 </pre></td></tr></table>in order to read a line of text from the user.
2081 The line returned has the final newline removed, so only the
2082 text remains.
2083 </P><P>
2084
2085 If <CODE>readline</CODE> encounters an <CODE>EOF</CODE> while reading the line, and the
2086 line is empty at that point, then <CODE>(char *)NULL</CODE> is returned.
2087 Otherwise, the line is ended just as if a newline had been typed.
2088 </P><P>
2089
2090 If you want the user to be able to get at the line later, (with
2091 <KBD>C-p</KBD> for example), you must call <CODE>add_history()</CODE> to save the
2092 line away in a <EM>history</EM> list of such lines.
2093 </P><P>
2094
2095 <TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>add_history (line)</CODE>;
2096 </pre></td></tr></table></P><P>
2097
2098 For full details on the GNU History Library, see the associated manual.
2099 </P><P>
2100
2101 It is preferable to avoid saving empty lines on the history list, since
2102 users rarely have a burning need to reuse a blank line.  Here is
2103 a function which usefully replaces the standard <CODE>gets()</CODE> library
2104 function, and has the advantage of no static buffer to overflow:
2105 </P><P>
2106
2107 <TABLE><tr><td>&nbsp;</td><td class=example><pre>/* A static variable for holding the line. */
2108 static char *line_read = (char *)NULL;
2109
2110 /* Read a string, and return a pointer to it.
2111    Returns NULL on EOF. */
2112 char *
2113 rl_gets ()
2114 {
2115   /* If the buffer has already been allocated,
2116      return the memory to the free pool. */
2117   if (line_read)
2118     {
2119       free (line_read);
2120       line_read = (char *)NULL;
2121     }
2122
2123   /* Get a line from the user. */
2124   line_read = readline ("");
2125
2126   /* If the line has any text in it,
2127      save it on the history. */
2128   if (line_read &#38;&#38; *line_read)
2129     add_history (line_read);
2130
2131   return (line_read);
2132 }
2133 </pre></td></tr></table></P><P>
2134
2135 This function gives the user the default behaviour of <KBD>TAB</KBD>
2136 completion: completion on file names.  If you do not want Readline to
2137 complete on filenames, you can change the binding of the <KBD>TAB</KBD> key
2138 with <CODE>rl_bind_key()</CODE>.
2139 </P><P>
2140
2141 <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>
2142 </pre></td></tr></table></P><P>
2143
2144 <CODE>rl_bind_key()</CODE> takes two arguments: <VAR>key</VAR> is the character that
2145 you want to bind, and <VAR>function</VAR> is the address of the function to
2146 call when <VAR>key</VAR> is pressed.  Binding <KBD>TAB</KBD> to <CODE>rl_insert()</CODE>
2147 makes <KBD>TAB</KBD> insert itself.
2148 <CODE>rl_bind_key()</CODE> returns non-zero if <VAR>key</VAR> is not a valid
2149 ASCII character code (between 0 and 255).
2150 </P><P>
2151
2152 Thus, to disable the default <KBD>TAB</KBD> behavior, the following suffices:
2153 <TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>rl_bind_key ('\t', rl_insert);</CODE>
2154 </pre></td></tr></table></P><P>
2155
2156 This code should be executed once at the start of your program; you
2157 might write a function called <CODE>initialize_readline()</CODE> which
2158 performs this and other desired initializations, such as installing
2159 custom completers (see section <A HREF="readline.html#SEC44">2.6 Custom Completers</A>).
2160 </P><P>
2161
2162 <A NAME="Custom Functions"></A>
2163 <HR SIZE="6">
2164 <A NAME="SEC25"></A>
2165 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2166 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC24"> &lt; </A>]</TD>
2167 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC26"> &gt; </A>]</TD>
2168 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &lt;&lt; </A>]</TD>
2169 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
2170 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &gt;&gt; </A>]</TD>
2171 <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>
2172 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2173 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2174 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2175 </TR></TABLE>
2176 <H2> 2.2 Custom Functions </H2>
2177 <!--docid::SEC25::-->
2178 <P>
2179
2180 Readline provides many functions for manipulating the text of
2181 the line, but it isn't possible to anticipate the needs of all
2182 programs.  This section describes the various functions and variables
2183 defined within the Readline library which allow a user program to add
2184 customized functionality to Readline.
2185 </P><P>
2186
2187 Before declaring any functions that customize Readline's behavior, or
2188 using any functionality Readline provides in other code, an
2189 application writer should include the file <CODE>&#60;readline/readline.h&#62;</CODE>
2190 in any file that uses Readline's features.  Since some of the definitions
2191 in <CODE>readline.h</CODE> use the <CODE>stdio</CODE> library, the file
2192 <CODE>&#60;stdio.h&#62;</CODE> should be included before <CODE>readline.h</CODE>.
2193 </P><P>
2194
2195 <CODE>readline.h</CODE> defines a C preprocessor variable that should
2196 be treated as an integer, <CODE>RL_READLINE_VERSION</CODE>, which may
2197 be used to conditionally compile application code depending on
2198 the installed Readline version.  The value is a hexadecimal
2199 encoding of the major and minor version numbers of the library,
2200 of the form 0x<VAR>MMmm</VAR>.  <VAR>MM</VAR> is the two-digit major
2201 version number; <VAR>mm</VAR> is the two-digit minor version number. 
2202 For Readline 4.2, for example, the value of
2203 <CODE>RL_READLINE_VERSION</CODE> would be <CODE>0x0402</CODE>. 
2204 </P><P>
2205
2206 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> 
2207 <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>
2208 <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>
2209 </TABLE></BLOCKQUOTE>
2210 <P>
2211
2212 <A NAME="Readline Typedefs"></A>
2213 <HR SIZE="6">
2214 <A NAME="SEC26"></A>
2215 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2216 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC25"> &lt; </A>]</TD>
2217 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC27"> &gt; </A>]</TD>
2218 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &lt;&lt; </A>]</TD>
2219 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC25"> Up </A>]</TD>
2220 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &gt;&gt; </A>]</TD>
2221 <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>
2222 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2223 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2224 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2225 </TR></TABLE>
2226 <H3> 2.2.1 Readline Typedefs </H3>
2227 <!--docid::SEC26::-->
2228 <P>
2229
2230 For readabilty, we declare a number of new object types, all pointers
2231 to functions.
2232 </P><P>
2233
2234 The reason for declaring these new types is to make it easier to write
2235 code describing pointers to C functions with appropriately prototyped
2236 arguments and return values.
2237 </P><P>
2238
2239 For instance, say we want to declare a variable <VAR>func</VAR> as a pointer
2240 to a function which takes two <CODE>int</CODE> arguments and returns an
2241 <CODE>int</CODE> (this is the type of all of the Readline bindable functions).
2242 Instead of the classic C declaration
2243 </P><P>
2244
2245 <CODE>int (*func)();</CODE>
2246 </P><P>
2247
2248 or the ANSI-C style declaration
2249 </P><P>
2250
2251 <CODE>int (*func)(int, int);</CODE>
2252 </P><P>
2253
2254 we may write
2255 </P><P>
2256
2257 <CODE>rl_command_func_t *func;</CODE>
2258 </P><P>
2259
2260 The full list of function pointer types available is
2261 </P><P>
2262
2263 <DL COMPACT>
2264 <DT><CODE>typedef int rl_command_func_t (int, int);</CODE>
2265 <DD><P>
2266
2267 <DT><CODE>typedef char *rl_compentry_func_t (const char *, int);</CODE>
2268 <DD><P>
2269
2270 <DT><CODE>typedef char **rl_completion_func_t (const char *, int, int);</CODE>
2271 <DD><P>
2272
2273 <DT><CODE>typedef char *rl_quote_func_t (char *, int, char *);</CODE>
2274 <DD><P>
2275
2276 <DT><CODE>typedef char *rl_dequote_func_t (char *, int);</CODE>
2277 <DD><P>
2278
2279 <DT><CODE>typedef int rl_compignore_func_t (char **);</CODE>
2280 <DD><P>
2281
2282 <DT><CODE>typedef void rl_compdisp_func_t (char **, int, int);</CODE>
2283 <DD><P>
2284
2285 <DT><CODE>typedef int rl_hook_func_t (void);</CODE>
2286 <DD><P>
2287
2288 <DT><CODE>typedef int rl_getc_func_t (FILE *);</CODE>
2289 <DD><P>
2290
2291 <DT><CODE>typedef int rl_linebuf_func_t (char *, int);</CODE>
2292 <DD><P>
2293
2294 <DT><CODE>typedef int rl_intfunc_t (int);</CODE>
2295 <DD><DT><CODE>#define rl_ivoidfunc_t rl_hook_func_t</CODE>
2296 <DD><DT><CODE>typedef int rl_icpfunc_t (char *);</CODE>
2297 <DD><DT><CODE>typedef int rl_icppfunc_t (char **);</CODE>
2298 <DD><P>
2299
2300 <DT><CODE>typedef void rl_voidfunc_t (void);</CODE>
2301 <DD><DT><CODE>typedef void rl_vintfunc_t (int);</CODE>
2302 <DD><DT><CODE>typedef void rl_vcpfunc_t (char *);</CODE>
2303 <DD><DT><CODE>typedef void rl_vcppfunc_t (char **);</CODE>
2304 <DD><P>
2305
2306 </DL>
2307 <P>
2308
2309 <A NAME="Function Writing"></A>
2310 <HR SIZE="6">
2311 <A NAME="SEC27"></A>
2312 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2313 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC26"> &lt; </A>]</TD>
2314 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &gt; </A>]</TD>
2315 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &lt;&lt; </A>]</TD>
2316 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC25"> Up </A>]</TD>
2317 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &gt;&gt; </A>]</TD>
2318 <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>
2319 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2320 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2321 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2322 </TR></TABLE>
2323 <H3> 2.2.2 Writing a New Function </H3>
2324 <!--docid::SEC27::-->
2325 <P>
2326
2327 In order to write new functions for Readline, you need to know the
2328 calling conventions for keyboard-invoked functions, and the names of the
2329 variables that describe the current state of the line read so far.
2330 </P><P>
2331
2332 The calling sequence for a command <CODE>foo</CODE> looks like
2333 </P><P>
2334
2335 <TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>int foo (int count, int key)</CODE>
2336 </pre></td></tr></table></P><P>
2337
2338 where <VAR>count</VAR> is the numeric argument (or 1 if defaulted) and
2339 <VAR>key</VAR> is the key that invoked this function.
2340 </P><P>
2341
2342 It is completely up to the function as to what should be done with the
2343 numeric argument.  Some functions use it as a repeat count, some
2344 as a flag, and others to choose alternate behavior (refreshing the current
2345 line as opposed to refreshing the screen, for example).  Some choose to
2346 ignore it.  In general, if a
2347 function uses the numeric argument as a repeat count, it should be able
2348 to do something useful with both negative and positive arguments.
2349 At the very least, it should be aware that it can be passed a
2350 negative argument.
2351 </P><P>
2352
2353 A command function should return 0 if its action completes successfully,
2354 and a non-zero value if some error occurs.
2355 This is the convention obeyed by all of the builtin Readline bindable
2356 command functions.
2357 </P><P>
2358
2359 <A NAME="Readline Variables"></A>
2360 <HR SIZE="6">
2361 <A NAME="SEC28"></A>
2362 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2363 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC27"> &lt; </A>]</TD>
2364 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> &gt; </A>]</TD>
2365 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> &lt;&lt; </A>]</TD>
2366 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
2367 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
2368 <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>
2369 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2370 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2371 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2372 </TR></TABLE>
2373 <H2> 2.3 Readline Variables </H2>
2374 <!--docid::SEC28::-->
2375 <P>
2376
2377 These variables are available to function writers.
2378 </P><P>
2379
2380 <A NAME="IDX180"></A>
2381 <DL>
2382 <DT><U>Variable:</U> char * <B>rl_line_buffer</B>
2383 <DD>This is the line gathered so far.  You are welcome to modify the
2384 contents of the line, but see <A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A>.  The
2385 function <CODE>rl_extend_line_buffer</CODE> is available to increase
2386 the memory allocated to <CODE>rl_line_buffer</CODE>.
2387 </DL>
2388 </P><P>
2389
2390 <A NAME="IDX181"></A>
2391 <DL>
2392 <DT><U>Variable:</U> int <B>rl_point</B>
2393 <DD>The offset of the current cursor position in <CODE>rl_line_buffer</CODE>
2394 (the <EM>point</EM>).
2395 </DL>
2396 </P><P>
2397
2398 <A NAME="IDX182"></A>
2399 <DL>
2400 <DT><U>Variable:</U> int <B>rl_end</B>
2401 <DD>The number of characters present in <CODE>rl_line_buffer</CODE>.  When
2402 <CODE>rl_point</CODE> is at the end of the line, <CODE>rl_point</CODE> and
2403 <CODE>rl_end</CODE> are equal.
2404 </DL>
2405 </P><P>
2406
2407 <A NAME="IDX183"></A>
2408 <DL>
2409 <DT><U>Variable:</U> int <B>rl_mark</B>
2410 <DD>The <VAR>mark</VAR> (saved position) in the current line.  If set, the mark
2411 and point define a <EM>region</EM>.
2412 </DL>
2413 </P><P>
2414
2415 <A NAME="IDX184"></A>
2416 <DL>
2417 <DT><U>Variable:</U> int <B>rl_done</B>
2418 <DD>Setting this to a non-zero value causes Readline to return the current
2419 line immediately.
2420 </DL>
2421 </P><P>
2422
2423 <A NAME="IDX185"></A>
2424 <DL>
2425 <DT><U>Variable:</U> int <B>rl_num_chars_to_read</B>
2426 <DD>Setting this to a positive value before calling <CODE>readline()</CODE> causes
2427 Readline to return after accepting that many characters, rather
2428 than reading up to a character bound to <CODE>accept-line</CODE>.
2429 </DL>
2430 </P><P>
2431
2432 <A NAME="IDX186"></A>
2433 <DL>
2434 <DT><U>Variable:</U> int <B>rl_pending_input</B>
2435 <DD>Setting this to a value makes it the next keystroke read.  This is a
2436 way to stuff a single character into the input stream.
2437 </DL>
2438 </P><P>
2439
2440 <A NAME="IDX187"></A>
2441 <DL>
2442 <DT><U>Variable:</U> int <B>rl_dispatching</B>
2443 <DD>Set to a non-zero value if a function is being called from a key binding;
2444 zero otherwise.  Application functions can test this to discover whether
2445 they were called directly or by Readline's dispatching mechanism.
2446 </DL>
2447 </P><P>
2448
2449 <A NAME="IDX188"></A>
2450 <DL>
2451 <DT><U>Variable:</U> int <B>rl_erase_empty_line</B>
2452 <DD>Setting this to a non-zero value causes Readline to completely erase
2453 the current line, including any prompt, any time a newline is typed as
2454 the only character on an otherwise-empty line.  The cursor is moved to
2455 the beginning of the newly-blank line.
2456 </DL>
2457 </P><P>
2458
2459 <A NAME="IDX189"></A>
2460 <DL>
2461 <DT><U>Variable:</U> char * <B>rl_prompt</B>
2462 <DD>The prompt Readline uses.  This is set from the argument to
2463 <CODE>readline()</CODE>, and should not be assigned to directly.
2464 The <CODE>rl_set_prompt()</CODE> function (see section <A HREF="readline.html#SEC35">2.4.6 Redisplay</A>) may
2465 be used to modify the prompt string after calling <CODE>readline()</CODE>.
2466 </DL>
2467 </P><P>
2468
2469 <A NAME="IDX190"></A>
2470 <DL>
2471 <DT><U>Variable:</U> int <B>rl_already_prompted</B>
2472 <DD>If an application wishes to display the prompt itself, rather than have
2473 Readline do it the first time <CODE>readline()</CODE> is called, it should set
2474 this variable to a non-zero value after displaying the prompt.
2475 The prompt must also be passed as the argument to <CODE>readline()</CODE> so
2476 the redisplay functions can update the display properly.
2477 The calling application is responsible for managing the value; Readline
2478 never sets it.
2479 </DL>
2480 </P><P>
2481
2482 <A NAME="IDX191"></A>
2483 <DL>
2484 <DT><U>Variable:</U> const char * <B>rl_library_version</B>
2485 <DD>The version number of this revision of the library.
2486 </DL>
2487 </P><P>
2488
2489 <A NAME="IDX192"></A>
2490 <DL>
2491 <DT><U>Variable:</U> int <B>rl_readline_version</B>
2492 <DD>An integer encoding the current version of the library.  The encoding is
2493 of the form 0x<VAR>MMmm</VAR>, where <VAR>MM</VAR> is the two-digit major version
2494 number, and <VAR>mm</VAR> is the two-digit minor version number.
2495 For example, for Readline-4.2, <CODE>rl_readline_version</CODE> would have the
2496 value 0x0402.
2497 </DL>
2498 </P><P>
2499
2500 <A NAME="IDX193"></A>
2501 <DL>
2502 <DT><U>Variable:</U> int <B>rl_gnu_readline_p</B>
2503 <DD>Always set to 1, denoting that this is GNU readline rather than some
2504 emulation.
2505 </DL>
2506 </P><P>
2507
2508 <A NAME="IDX194"></A>
2509 <DL>
2510 <DT><U>Variable:</U> const char * <B>rl_terminal_name</B>
2511 <DD>The terminal type, used for initialization.  If not set by the application,
2512 Readline sets this to the value of the <CODE>TERM</CODE> environment variable
2513 the first time it is called.
2514 </DL>
2515 </P><P>
2516
2517 <A NAME="IDX195"></A>
2518 <DL>
2519 <DT><U>Variable:</U> const char * <B>rl_readline_name</B>
2520 <DD>This variable is set to a unique name by each application using Readline.
2521 The value allows conditional parsing of the inputrc file
2522 (see section <A HREF="readline.html#SEC11">1.3.2 Conditional Init Constructs</A>).
2523 </DL>
2524 </P><P>
2525
2526 <A NAME="IDX196"></A>
2527 <DL>
2528 <DT><U>Variable:</U> FILE * <B>rl_instream</B>
2529 <DD>The stdio stream from which Readline reads input.
2530 If <CODE>NULL</CODE>, Readline defaults to <VAR>stdin</VAR>.
2531 </DL>
2532 </P><P>
2533
2534 <A NAME="IDX197"></A>
2535 <DL>
2536 <DT><U>Variable:</U> FILE * <B>rl_outstream</B>
2537 <DD>The stdio stream to which Readline performs output.
2538 If <CODE>NULL</CODE>, Readline defaults to <VAR>stdout</VAR>.
2539 </DL>
2540 </P><P>
2541
2542 <A NAME="IDX198"></A>
2543 <DL>
2544 <DT><U>Variable:</U> int <B>rl_prefer_env_winsize</B>
2545 <DD>If non-zero, Readline gives values found in the <CODE>LINES</CODE> and
2546 <CODE>COLUMNS</CODE> environment variables greater precedence than values fetched
2547 from the kernel when computing the screen dimensions.
2548 </DL>
2549 </P><P>
2550
2551 <A NAME="IDX199"></A>
2552 <DL>
2553 <DT><U>Variable:</U> rl_command_func_t * <B>rl_last_func</B>
2554 <DD>The address of the last command function Readline executed.  May be used to
2555 test whether or not a function is being executed twice in succession, for
2556 example.
2557 </DL>
2558 </P><P>
2559
2560 <A NAME="IDX200"></A>
2561 <DL>
2562 <DT><U>Variable:</U> rl_hook_func_t * <B>rl_startup_hook</B>
2563 <DD>If non-zero, this is the address of a function to call just
2564 before <CODE>readline</CODE> prints the first prompt.
2565 </DL>
2566 </P><P>
2567
2568 <A NAME="IDX201"></A>
2569 <DL>
2570 <DT><U>Variable:</U> rl_hook_func_t * <B>rl_pre_input_hook</B>
2571 <DD>If non-zero, this is the address of a function to call after
2572 the first prompt has been printed and just before <CODE>readline</CODE>
2573 starts reading input characters.
2574 </DL>
2575 </P><P>
2576
2577 <A NAME="IDX202"></A>
2578 <DL>
2579 <DT><U>Variable:</U> rl_hook_func_t * <B>rl_event_hook</B>
2580 <DD>If non-zero, this is the address of a function to call periodically
2581 when Readline is waiting for terminal input.
2582 By default, this will be called at most ten times a second if there
2583 is no keyboard input.
2584 </DL>
2585 </P><P>
2586
2587 <A NAME="IDX203"></A>
2588 <DL>
2589 <DT><U>Variable:</U> rl_getc_func_t * <B>rl_getc_function</B>
2590 <DD>If non-zero, Readline will call indirectly through this pointer
2591 to get a character from the input stream.  By default, it is set to
2592 <CODE>rl_getc</CODE>, the default Readline character input function
2593 (see section <A HREF="readline.html#SEC37">2.4.8 Character Input</A>).
2594 </DL>
2595 </P><P>
2596
2597 <A NAME="IDX204"></A>
2598 <DL>
2599 <DT><U>Variable:</U> rl_voidfunc_t * <B>rl_redisplay_function</B>
2600 <DD>If non-zero, Readline will call indirectly through this pointer
2601 to update the display with the current contents of the editing buffer.
2602 By default, it is set to <CODE>rl_redisplay</CODE>, the default Readline
2603 redisplay function (see section <A HREF="readline.html#SEC35">2.4.6 Redisplay</A>).
2604 </DL>
2605 </P><P>
2606
2607 <A NAME="IDX205"></A>
2608 <DL>
2609 <DT><U>Variable:</U> rl_vintfunc_t * <B>rl_prep_term_function</B>
2610 <DD>If non-zero, Readline will call indirectly through this pointer
2611 to initialize the terminal.  The function takes a single argument, an
2612 <CODE>int</CODE> flag that says whether or not to use eight-bit characters.
2613 By default, this is set to <CODE>rl_prep_terminal</CODE>
2614 (see section <A HREF="readline.html#SEC38">2.4.9 Terminal Management</A>).
2615 </DL>
2616 </P><P>
2617
2618 <A NAME="IDX206"></A>
2619 <DL>
2620 <DT><U>Variable:</U> rl_voidfunc_t * <B>rl_deprep_term_function</B>
2621 <DD>If non-zero, Readline will call indirectly through this pointer
2622 to reset the terminal.  This function should undo the effects of
2623 <CODE>rl_prep_term_function</CODE>.
2624 By default, this is set to <CODE>rl_deprep_terminal</CODE>
2625 (see section <A HREF="readline.html#SEC38">2.4.9 Terminal Management</A>).
2626 </DL>
2627 </P><P>
2628
2629 <A NAME="IDX207"></A>
2630 <DL>
2631 <DT><U>Variable:</U> Keymap <B>rl_executing_keymap</B>
2632 <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
2633 currently executing readline function was found.
2634 </DL>
2635 </P><P>
2636
2637 <A NAME="IDX208"></A>
2638 <DL>
2639 <DT><U>Variable:</U> Keymap <B>rl_binding_keymap</B>
2640 <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
2641 last key binding occurred.
2642 </DL>
2643 </P><P>
2644
2645 <A NAME="IDX209"></A>
2646 <DL>
2647 <DT><U>Variable:</U> char * <B>rl_executing_macro</B>
2648 <DD>This variable is set to the text of any currently-executing macro.
2649 </DL>
2650 </P><P>
2651
2652 <A NAME="IDX210"></A>
2653 <DL>
2654 <DT><U>Variable:</U> int <B>rl_readline_state</B>
2655 <DD>A variable with bit values that encapsulate the current Readline state.
2656 A bit is set with the <CODE>RL_SETSTATE</CODE> macro, and unset with the
2657 <CODE>RL_UNSETSTATE</CODE> macro.  Use the <CODE>RL_ISSTATE</CODE> macro to test
2658 whether a particular state bit is set.  Current state bits include:
2659 </P><P>
2660
2661 <DL COMPACT>
2662 <DT><CODE>RL_STATE_NONE</CODE>
2663 <DD>Readline has not yet been called, nor has it begun to intialize.
2664 <DT><CODE>RL_STATE_INITIALIZING</CODE>
2665 <DD>Readline is initializing its internal data structures.
2666 <DT><CODE>RL_STATE_INITIALIZED</CODE>
2667 <DD>Readline has completed its initialization.
2668 <DT><CODE>RL_STATE_TERMPREPPED</CODE>
2669 <DD>Readline has modified the terminal modes to do its own input and redisplay.
2670 <DT><CODE>RL_STATE_READCMD</CODE>
2671 <DD>Readline is reading a command from the keyboard.
2672 <DT><CODE>RL_STATE_METANEXT</CODE>
2673 <DD>Readline is reading more input after reading the meta-prefix character.
2674 <DT><CODE>RL_STATE_DISPATCHING</CODE>
2675 <DD>Readline is dispatching to a command.
2676 <DT><CODE>RL_STATE_MOREINPUT</CODE>
2677 <DD>Readline is reading more input while executing an editing command.
2678 <DT><CODE>RL_STATE_ISEARCH</CODE>
2679 <DD>Readline is performing an incremental history search.
2680 <DT><CODE>RL_STATE_NSEARCH</CODE>
2681 <DD>Readline is performing a non-incremental history search.
2682 <DT><CODE>RL_STATE_SEARCH</CODE>
2683 <DD>Readline is searching backward or forward through the history for a string.
2684 <DT><CODE>RL_STATE_NUMERICARG</CODE>
2685 <DD>Readline is reading a numeric argument.
2686 <DT><CODE>RL_STATE_MACROINPUT</CODE>
2687 <DD>Readline is currently getting its input from a previously-defined keyboard
2688 macro.
2689 <DT><CODE>RL_STATE_MACRODEF</CODE>
2690 <DD>Readline is currently reading characters defining a keyboard macro.
2691 <DT><CODE>RL_STATE_OVERWRITE</CODE>
2692 <DD>Readline is in overwrite mode.
2693 <DT><CODE>RL_STATE_COMPLETING</CODE>
2694 <DD>Readline is performing word completion.
2695 <DT><CODE>RL_STATE_SIGHANDLER</CODE>
2696 <DD>Readline is currently executing the readline signal handler.
2697 <DT><CODE>RL_STATE_UNDOING</CODE>
2698 <DD>Readline is performing an undo.
2699 <DT><CODE>RL_STATE_DONE</CODE>
2700 <DD>Readline has read a key sequence bound to <CODE>accept-line</CODE>
2701 and is about to return the line to the caller.
2702 </DL>
2703 <P>
2704
2705 </DL>
2706 </P><P>
2707
2708 <A NAME="IDX211"></A>
2709 <DL>
2710 <DT><U>Variable:</U> int <B>rl_explicit_arg</B>
2711 <DD>Set to a non-zero value if an explicit numeric argument was specified by
2712 the user.  Only valid in a bindable command function.
2713 </DL>
2714 </P><P>
2715
2716 <A NAME="IDX212"></A>
2717 <DL>
2718 <DT><U>Variable:</U> int <B>rl_numeric_arg</B>
2719 <DD>Set to the value of any numeric argument explicitly specified by the user
2720 before executing the current Readline function.  Only valid in a bindable
2721 command function.
2722 </DL>
2723 </P><P>
2724
2725 <A NAME="IDX213"></A>
2726 <DL>
2727 <DT><U>Variable:</U> int <B>rl_editing_mode</B>
2728 <DD>Set to a value denoting Readline's current editing mode.  A value of
2729 <VAR>1</VAR> means Readline is currently in emacs mode; <VAR>0</VAR>
2730 means that vi mode is active.
2731 </DL>
2732 </P><P>
2733
2734 <A NAME="Readline Convenience Functions"></A>
2735 <HR SIZE="6">
2736 <A NAME="SEC29"></A>
2737 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2738 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> &lt; </A>]</TD>
2739 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC30"> &gt; </A>]</TD>
2740 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &lt;&lt; </A>]</TD>
2741 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
2742 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
2743 <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>
2744 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2745 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2746 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2747 </TR></TABLE>
2748 <H2> 2.4 Readline Convenience Functions </H2>
2749 <!--docid::SEC29::-->
2750 <P>
2751
2752 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> 
2753 <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>
2754 <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>
2755 <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>
2756 <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
2757                                                 key sequences.</TD></TR>
2758 <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>
2759 <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>
2760 <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>
2761 <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>
2762 <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>
2763 <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>
2764 <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>
2765 <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>
2766 <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>
2767 </TABLE></BLOCKQUOTE>
2768 <P>
2769
2770 <A NAME="Function Naming"></A>
2771 <HR SIZE="6">
2772 <A NAME="SEC30"></A>
2773 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2774 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> &lt; </A>]</TD>
2775 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> &gt; </A>]</TD>
2776 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &lt;&lt; </A>]</TD>
2777 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
2778 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
2779 <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>
2780 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2781 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2782 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2783 </TR></TABLE>
2784 <H3> 2.4.1 Naming a Function </H3>
2785 <!--docid::SEC30::-->
2786 <P>
2787
2788 The user can dynamically change the bindings of keys while using
2789 Readline.  This is done by representing the function with a descriptive
2790 name.  The user is able to type the descriptive name when referring to
2791 the function.  Thus, in an init file, one might find
2792 </P><P>
2793
2794 <TABLE><tr><td>&nbsp;</td><td class=example><pre>Meta-Rubout:   backward-kill-word
2795 </pre></td></tr></table></P><P>
2796
2797 This binds the keystroke <KBD>Meta-Rubout</KBD> to the function
2798 <EM>descriptively</EM> named <CODE>backward-kill-word</CODE>.  You, as the
2799 programmer, should bind the functions you write to descriptive names as
2800 well.  Readline provides a function for doing that:
2801 </P><P>
2802
2803 <A NAME="IDX214"></A>
2804 <DL>
2805 <DT><U>Function:</U> int <B>rl_add_defun</B> <I>(const char *name, rl_command_func_t *function, int key)</I>
2806 <DD>Add <VAR>name</VAR> to the list of named functions.  Make <VAR>function</VAR> be
2807 the function that gets called.  If <VAR>key</VAR> is not -1, then bind it to
2808 <VAR>function</VAR> using <CODE>rl_bind_key()</CODE>.
2809 </DL>
2810 </P><P>
2811
2812 Using this function alone is sufficient for most applications.
2813 It is the recommended way to add a few functions to the default
2814 functions that Readline has built in.
2815 If you need to do something other than adding a function to Readline,
2816 you may need to use the underlying functions described below.
2817 </P><P>
2818
2819 <A NAME="Keymaps"></A>
2820 <HR SIZE="6">
2821 <A NAME="SEC31"></A>
2822 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2823 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC30"> &lt; </A>]</TD>
2824 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC32"> &gt; </A>]</TD>
2825 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC32"> &lt;&lt; </A>]</TD>
2826 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
2827 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
2828 <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>
2829 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2830 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2831 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2832 </TR></TABLE>
2833 <H3> 2.4.2 Selecting a Keymap </H3>
2834 <!--docid::SEC31::-->
2835 <P>
2836
2837 Key bindings take place on a <EM>keymap</EM>.  The keymap is the
2838 association between the keys that the user types and the functions that
2839 get run.  You can make your own keymaps, copy existing keymaps, and tell
2840 Readline which keymap to use.
2841 </P><P>
2842
2843 <A NAME="IDX215"></A>
2844 <DL>
2845 <DT><U>Function:</U> Keymap <B>rl_make_bare_keymap</B> <I>(void)</I>
2846 <DD>Returns a new, empty keymap.  The space for the keymap is allocated with
2847 <CODE>malloc()</CODE>; the caller should free it by calling
2848 <CODE>rl_discard_keymap()</CODE> when done.
2849 </DL>
2850 </P><P>
2851
2852 <A NAME="IDX216"></A>
2853 <DL>
2854 <DT><U>Function:</U> Keymap <B>rl_copy_keymap</B> <I>(Keymap map)</I>
2855 <DD>Return a new keymap which is a copy of <VAR>map</VAR>.
2856 </DL>
2857 </P><P>
2858
2859 <A NAME="IDX217"></A>
2860 <DL>
2861 <DT><U>Function:</U> Keymap <B>rl_make_keymap</B> <I>(void)</I>
2862 <DD>Return a new keymap with the printing characters bound to rl_insert,
2863 the lowercase Meta characters bound to run their equivalents, and
2864 the Meta digits bound to produce numeric arguments.
2865 </DL>
2866 </P><P>
2867
2868 <A NAME="IDX218"></A>
2869 <DL>
2870 <DT><U>Function:</U> void <B>rl_discard_keymap</B> <I>(Keymap keymap)</I>
2871 <DD>Free the storage associated with <VAR>keymap</VAR>.
2872 </DL>
2873 </P><P>
2874
2875 Readline has several internal keymaps.  These functions allow you to
2876 change which keymap is active.
2877 </P><P>
2878
2879 <A NAME="IDX219"></A>
2880 <DL>
2881 <DT><U>Function:</U> Keymap <B>rl_get_keymap</B> <I>(void)</I>
2882 <DD>Returns the currently active keymap.
2883 </DL>
2884 </P><P>
2885
2886 <A NAME="IDX220"></A>
2887 <DL>
2888 <DT><U>Function:</U> void <B>rl_set_keymap</B> <I>(Keymap keymap)</I>
2889 <DD>Makes <VAR>keymap</VAR> the currently active keymap.
2890 </DL>
2891 </P><P>
2892
2893 <A NAME="IDX221"></A>
2894 <DL>
2895 <DT><U>Function:</U> Keymap <B>rl_get_keymap_by_name</B> <I>(const char *name)</I>
2896 <DD>Return the keymap matching <VAR>name</VAR>.  <VAR>name</VAR> is one which would
2897 be supplied in a <CODE>set keymap</CODE> inputrc line (see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
2898 </DL>
2899 </P><P>
2900
2901 <A NAME="IDX222"></A>
2902 <DL>
2903 <DT><U>Function:</U> char * <B>rl_get_keymap_name</B> <I>(Keymap keymap)</I>
2904 <DD>Return the name matching <VAR>keymap</VAR>.  <VAR>name</VAR> is one which would
2905 be supplied in a <CODE>set keymap</CODE> inputrc line (see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
2906 </DL>
2907 </P><P>
2908
2909 <A NAME="Binding Keys"></A>
2910 <HR SIZE="6">
2911 <A NAME="SEC32"></A>
2912 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2913 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> &lt; </A>]</TD>
2914 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC33"> &gt; </A>]</TD>
2915 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC33"> &lt;&lt; </A>]</TD>
2916 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
2917 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
2918 <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>
2919 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2920 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2921 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2922 </TR></TABLE>
2923 <H3> 2.4.3 Binding Keys </H3>
2924 <!--docid::SEC32::-->
2925 <P>
2926
2927 Key sequences are associate with functions through the keymap.
2928 Readline has several internal keymaps: <CODE>emacs_standard_keymap</CODE>,
2929 <CODE>emacs_meta_keymap</CODE>, <CODE>emacs_ctlx_keymap</CODE>,
2930 <CODE>vi_movement_keymap</CODE>, and <CODE>vi_insertion_keymap</CODE>.
2931 <CODE>emacs_standard_keymap</CODE> is the default, and the examples in
2932 this manual assume that.
2933 </P><P>
2934
2935 Since <CODE>readline()</CODE> installs a set of default key bindings the first
2936 time it is called, there is always the danger that a custom binding
2937 installed before the first call to <CODE>readline()</CODE> will be overridden.
2938 An alternate mechanism is to install custom key bindings in an
2939 initialization function assigned to the <CODE>rl_startup_hook</CODE> variable
2940 (see section <A HREF="readline.html#SEC28">2.3 Readline Variables</A>).
2941 </P><P>
2942
2943 These functions manage key bindings.
2944 </P><P>
2945
2946 <A NAME="IDX223"></A>
2947 <DL>
2948 <DT><U>Function:</U> int <B>rl_bind_key</B> <I>(int key, rl_command_func_t *function)</I>
2949 <DD>Binds <VAR>key</VAR> to <VAR>function</VAR> in the currently active keymap.
2950 Returns non-zero in the case of an invalid <VAR>key</VAR>.
2951 </DL>
2952 </P><P>
2953
2954 <A NAME="IDX224"></A>
2955 <DL>
2956 <DT><U>Function:</U> int <B>rl_bind_key_in_map</B> <I>(int key, rl_command_func_t *function, Keymap map)</I>
2957 <DD>Bind <VAR>key</VAR> to <VAR>function</VAR> in <VAR>map</VAR>.
2958 Returns non-zero in the case of an invalid <VAR>key</VAR>.
2959 </DL>
2960 </P><P>
2961
2962 <A NAME="IDX225"></A>
2963 <DL>
2964 <DT><U>Function:</U> int <B>rl_bind_key_if_unbound</B> <I>(int key, rl_command_func_t *function)</I>
2965 <DD>Binds <VAR>key</VAR> to <VAR>function</VAR> if it is not already bound in the
2966 currently active keymap.
2967 Returns non-zero in the case of an invalid <VAR>key</VAR> or if <VAR>key</VAR> is
2968 already bound.
2969 </DL>
2970 </P><P>
2971
2972 <A NAME="IDX226"></A>
2973 <DL>
2974 <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>
2975 <DD>Binds <VAR>key</VAR> to <VAR>function</VAR> if it is not already bound in <VAR>map</VAR>.
2976 Returns non-zero in the case of an invalid <VAR>key</VAR> or if <VAR>key</VAR> is
2977 already bound.
2978 </DL>
2979 </P><P>
2980
2981 <A NAME="IDX227"></A>
2982 <DL>
2983 <DT><U>Function:</U> int <B>rl_unbind_key</B> <I>(int key)</I>
2984 <DD>Bind <VAR>key</VAR> to the null function in the currently active keymap.
2985 Returns non-zero in case of error.
2986 </DL>
2987 </P><P>
2988
2989 <A NAME="IDX228"></A>
2990 <DL>
2991 <DT><U>Function:</U> int <B>rl_unbind_key_in_map</B> <I>(int key, Keymap map)</I>
2992 <DD>Bind <VAR>key</VAR> to the null function in <VAR>map</VAR>.
2993 Returns non-zero in case of error.
2994 </DL>
2995 </P><P>
2996
2997 <A NAME="IDX229"></A>
2998 <DL>
2999 <DT><U>Function:</U> int <B>rl_unbind_function_in_map</B> <I>(rl_command_func_t *function, Keymap map)</I>
3000 <DD>Unbind all keys that execute <VAR>function</VAR> in <VAR>map</VAR>.
3001 </DL>
3002 </P><P>
3003
3004 <A NAME="IDX230"></A>
3005 <DL>
3006 <DT><U>Function:</U> int <B>rl_unbind_command_in_map</B> <I>(const char *command, Keymap map)</I>
3007 <DD>Unbind all keys that are bound to <VAR>command</VAR> in <VAR>map</VAR>.
3008 </DL>
3009 </P><P>
3010
3011 <A NAME="IDX231"></A>
3012 <DL>
3013 <DT><U>Function:</U> int <B>rl_bind_keyseq</B> <I>(const char *keyseq, rl_command_func_t *function)</I>
3014 <DD>Bind the key sequence represented by the string <VAR>keyseq</VAR> to the function
3015 <VAR>function</VAR>, beginning in the current keymap.
3016 This makes new keymaps as necessary.
3017 The return value is non-zero if <VAR>keyseq</VAR> is invalid.
3018 </DL>
3019 </P><P>
3020
3021 <A NAME="IDX232"></A>
3022 <DL>
3023 <DT><U>Function:</U> int <B>rl_bind_keyseq_in_map</B> <I>(const char *keyseq, rl_command_func_t *function, Keymap map)</I>
3024 <DD>Bind the key sequence represented by the string <VAR>keyseq</VAR> to the function
3025 <VAR>function</VAR>.  This makes new keymaps as necessary.
3026 Initial bindings are performed in <VAR>map</VAR>.
3027 The return value is non-zero if <VAR>keyseq</VAR> is invalid.
3028 </DL>
3029 </P><P>
3030
3031 <A NAME="IDX233"></A>
3032 <DL>
3033 <DT><U>Function:</U> int <B>rl_set_key</B> <I>(const char *keyseq, rl_command_func_t *function, Keymap map)</I>
3034 <DD>Equivalent to <CODE>rl_bind_keyseq_in_map</CODE>.
3035 </DL>
3036 </P><P>
3037
3038 <A NAME="IDX234"></A>
3039 <DL>
3040 <DT><U>Function:</U> int <B>rl_bind_keyseq_if_unbound</B> <I>(const char *keyseq, rl_command_func_t *function)</I>
3041 <DD>Binds <VAR>keyseq</VAR> to <VAR>function</VAR> if it is not already bound in the
3042 currently active keymap.
3043 Returns non-zero in the case of an invalid <VAR>keyseq</VAR> or if <VAR>keyseq</VAR> is
3044 already bound.
3045 </DL>
3046 </P><P>
3047
3048 <A NAME="IDX235"></A>
3049 <DL>
3050 <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>
3051 <DD>Binds <VAR>keyseq</VAR> to <VAR>function</VAR> if it is not already bound in <VAR>map</VAR>.
3052 Returns non-zero in the case of an invalid <VAR>keyseq</VAR> or if <VAR>keyseq</VAR> is
3053 already bound.
3054 </DL>
3055 </P><P>
3056
3057 <A NAME="IDX236"></A>
3058 <DL>
3059 <DT><U>Function:</U> int <B>rl_generic_bind</B> <I>(int type, const char *keyseq, char *data, Keymap map)</I>
3060 <DD>Bind the key sequence represented by the string <VAR>keyseq</VAR> to the arbitrary
3061 pointer <VAR>data</VAR>.  <VAR>type</VAR> says what kind of data is pointed to by
3062 <VAR>data</VAR>; this can be a function (<CODE>ISFUNC</CODE>), a macro
3063 (<CODE>ISMACR</CODE>), or a keymap (<CODE>ISKMAP</CODE>).  This makes new keymaps as
3064 necessary.  The initial keymap in which to do bindings is <VAR>map</VAR>.
3065 </DL>
3066 </P><P>
3067
3068 <A NAME="IDX237"></A>
3069 <DL>
3070 <DT><U>Function:</U> int <B>rl_parse_and_bind</B> <I>(char *line)</I>
3071 <DD>Parse <VAR>line</VAR> as if it had been read from the <CODE>inputrc</CODE> file and
3072 perform any key bindings and variable assignments found
3073 (see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
3074 </DL>
3075 </P><P>
3076
3077 <A NAME="IDX238"></A>
3078 <DL>
3079 <DT><U>Function:</U> int <B>rl_read_init_file</B> <I>(const char *filename)</I>
3080 <DD>Read keybindings and variable assignments from <VAR>filename</VAR>
3081 (see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
3082 </DL>
3083 </P><P>
3084
3085 <A NAME="Associating Function Names and Bindings"></A>
3086 <HR SIZE="6">
3087 <A NAME="SEC33"></A>
3088 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3089 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC32"> &lt; </A>]</TD>
3090 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC34"> &gt; </A>]</TD>
3091 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC34"> &lt;&lt; </A>]</TD>
3092 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3093 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3094 <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>
3095 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3096 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3097 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3098 </TR></TABLE>
3099 <H3> 2.4.4 Associating Function Names and Bindings </H3>
3100 <!--docid::SEC33::-->
3101 <P>
3102
3103 These functions allow you to find out what keys invoke named functions
3104 and the functions invoked by a particular key sequence.  You may also
3105 associate a new function name with an arbitrary function.
3106 </P><P>
3107
3108 <A NAME="IDX239"></A>
3109 <DL>
3110 <DT><U>Function:</U> rl_command_func_t * <B>rl_named_function</B> <I>(const char *name)</I>
3111 <DD>Return the function with name <VAR>name</VAR>.
3112 </DL>
3113 </P><P>
3114
3115 <A NAME="IDX240"></A>
3116 <DL>
3117 <DT><U>Function:</U> rl_command_func_t * <B>rl_function_of_keyseq</B> <I>(const char *keyseq, Keymap map, int *type)</I>
3118 <DD>Return the function invoked by <VAR>keyseq</VAR> in keymap <VAR>map</VAR>.
3119 If <VAR>map</VAR> is <CODE>NULL</CODE>, the current keymap is used.  If <VAR>type</VAR> is
3120 not <CODE>NULL</CODE>, the type of the object is returned in the <CODE>int</CODE> variable
3121 it points to (one of <CODE>ISFUNC</CODE>, <CODE>ISKMAP</CODE>, or <CODE>ISMACR</CODE>).
3122 </DL>
3123 </P><P>
3124
3125 <A NAME="IDX241"></A>
3126 <DL>
3127 <DT><U>Function:</U> char ** <B>rl_invoking_keyseqs</B> <I>(rl_command_func_t *function)</I>
3128 <DD>Return an array of strings representing the key sequences used to
3129 invoke <VAR>function</VAR> in the current keymap.
3130 </DL>
3131 </P><P>
3132
3133 <A NAME="IDX242"></A>
3134 <DL>
3135 <DT><U>Function:</U> char ** <B>rl_invoking_keyseqs_in_map</B> <I>(rl_command_func_t *function, Keymap map)</I>
3136 <DD>Return an array of strings representing the key sequences used to
3137 invoke <VAR>function</VAR> in the keymap <VAR>map</VAR>.
3138 </DL>
3139 </P><P>
3140
3141 <A NAME="IDX243"></A>
3142 <DL>
3143 <DT><U>Function:</U> void <B>rl_function_dumper</B> <I>(int readable)</I>
3144 <DD>Print the readline function names and the key sequences currently
3145 bound to them to <CODE>rl_outstream</CODE>.  If <VAR>readable</VAR> is non-zero,
3146 the list is formatted in such a way that it can be made part of an
3147 <CODE>inputrc</CODE> file and re-read.
3148 </DL>
3149 </P><P>
3150
3151 <A NAME="IDX244"></A>
3152 <DL>
3153 <DT><U>Function:</U> void <B>rl_list_funmap_names</B> <I>(void)</I>
3154 <DD>Print the names of all bindable Readline functions to <CODE>rl_outstream</CODE>.
3155 </DL>
3156 </P><P>
3157
3158 <A NAME="IDX245"></A>
3159 <DL>
3160 <DT><U>Function:</U> const char ** <B>rl_funmap_names</B> <I>(void)</I>
3161 <DD>Return a NULL terminated array of known function names.  The array is
3162 sorted.  The array itself is allocated, but not the strings inside.  You
3163 should <CODE>free()</CODE> the array when you are done, but not the pointers.
3164 </DL>
3165 </P><P>
3166
3167 <A NAME="IDX246"></A>
3168 <DL>
3169 <DT><U>Function:</U> int <B>rl_add_funmap_entry</B> <I>(const char *name, rl_command_func_t *function)</I>
3170 <DD>Add <VAR>name</VAR> to the list of bindable Readline command names, and make
3171 <VAR>function</VAR> the function to be called when <VAR>name</VAR> is invoked.
3172 </DL>
3173 </P><P>
3174
3175 <A NAME="Allowing Undoing"></A>
3176 <HR SIZE="6">
3177 <A NAME="SEC34"></A>
3178 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3179 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC33"> &lt; </A>]</TD>
3180 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC35"> &gt; </A>]</TD>
3181 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC35"> &lt;&lt; </A>]</TD>
3182 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3183 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3184 <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>
3185 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3186 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3187 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3188 </TR></TABLE>
3189 <H3> 2.4.5 Allowing Undoing </H3>
3190 <!--docid::SEC34::-->
3191 <P>
3192
3193 Supporting the undo command is a painless thing, and makes your
3194 functions much more useful.  It is certainly easy to try
3195 something if you know you can undo it.
3196 </P><P>
3197
3198 If your function simply inserts text once, or deletes text once, and
3199 uses <CODE>rl_insert_text()</CODE> or <CODE>rl_delete_text()</CODE> to do it, then
3200 undoing is already done for you automatically.
3201 </P><P>
3202
3203 If you do multiple insertions or multiple deletions, or any combination
3204 of these operations, you should group them together into one operation.
3205 This is done with <CODE>rl_begin_undo_group()</CODE> and
3206 <CODE>rl_end_undo_group()</CODE>.
3207 </P><P>
3208
3209 The types of events that can be undone are:
3210 </P><P>
3211
3212 <TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END }; 
3213 </FONT></pre></td></tr></table></P><P>
3214
3215 Notice that <CODE>UNDO_DELETE</CODE> means to insert some text, and
3216 <CODE>UNDO_INSERT</CODE> means to delete some text.  That is, the undo code
3217 tells what to undo, not how to undo it.  <CODE>UNDO_BEGIN</CODE> and
3218 <CODE>UNDO_END</CODE> are tags added by <CODE>rl_begin_undo_group()</CODE> and
3219 <CODE>rl_end_undo_group()</CODE>.
3220 </P><P>
3221
3222 <A NAME="IDX247"></A>
3223 <DL>
3224 <DT><U>Function:</U> int <B>rl_begin_undo_group</B> <I>(void)</I>
3225 <DD>Begins saving undo information in a group construct.  The undo
3226 information usually comes from calls to <CODE>rl_insert_text()</CODE> and
3227 <CODE>rl_delete_text()</CODE>, but could be the result of calls to
3228 <CODE>rl_add_undo()</CODE>.
3229 </DL>
3230 </P><P>
3231
3232 <A NAME="IDX248"></A>
3233 <DL>
3234 <DT><U>Function:</U> int <B>rl_end_undo_group</B> <I>(void)</I>
3235 <DD>Closes the current undo group started with <CODE>rl_begin_undo_group
3236 ()</CODE>.  There should be one call to <CODE>rl_end_undo_group()</CODE>
3237 for each call to <CODE>rl_begin_undo_group()</CODE>.
3238 </DL>
3239 </P><P>
3240
3241 <A NAME="IDX249"></A>
3242 <DL>
3243 <DT><U>Function:</U> void <B>rl_add_undo</B> <I>(enum undo_code what, int start, int end, char *text)</I>
3244 <DD>Remember how to undo an event (according to <VAR>what</VAR>).  The affected
3245 text runs from <VAR>start</VAR> to <VAR>end</VAR>, and encompasses <VAR>text</VAR>.
3246 </DL>
3247 </P><P>
3248
3249 <A NAME="IDX250"></A>
3250 <DL>
3251 <DT><U>Function:</U> void <B>rl_free_undo_list</B> <I>(void)</I>
3252 <DD>Free the existing undo list.
3253 </DL>
3254 </P><P>
3255
3256 <A NAME="IDX251"></A>
3257 <DL>
3258 <DT><U>Function:</U> int <B>rl_do_undo</B> <I>(void)</I>
3259 <DD>Undo the first thing on the undo list.  Returns <CODE>0</CODE> if there was
3260 nothing to undo, non-zero if something was undone.
3261 </DL>
3262 </P><P>
3263
3264 Finally, if you neither insert nor delete text, but directly modify the
3265 existing text (e.g., change its case), call <CODE>rl_modifying()</CODE>
3266 once, just before you modify the text.  You must supply the indices of
3267 the text range that you are going to modify.
3268 </P><P>
3269
3270 <A NAME="IDX252"></A>
3271 <DL>
3272 <DT><U>Function:</U> int <B>rl_modifying</B> <I>(int start, int end)</I>
3273 <DD>Tell Readline to save the text between <VAR>start</VAR> and <VAR>end</VAR> as a
3274 single undo unit.  It is assumed that you will subsequently modify
3275 that text.
3276 </DL>
3277 </P><P>
3278
3279 <A NAME="Redisplay"></A>
3280 <HR SIZE="6">
3281 <A NAME="SEC35"></A>
3282 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3283 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC34"> &lt; </A>]</TD>
3284 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC36"> &gt; </A>]</TD>
3285 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC36"> &lt;&lt; </A>]</TD>
3286 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3287 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3288 <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>
3289 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3290 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3291 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3292 </TR></TABLE>
3293 <H3> 2.4.6 Redisplay </H3>
3294 <!--docid::SEC35::-->
3295 <P>
3296
3297 <A NAME="IDX253"></A>
3298 <DL>
3299 <DT><U>Function:</U> void <B>rl_redisplay</B> <I>(void)</I>
3300 <DD>Change what's displayed on the screen to reflect the current contents
3301 of <CODE>rl_line_buffer</CODE>.
3302 </DL>
3303 </P><P>
3304
3305 <A NAME="IDX254"></A>
3306 <DL>
3307 <DT><U>Function:</U> int <B>rl_forced_update_display</B> <I>(void)</I>
3308 <DD>Force the line to be updated and redisplayed, whether or not
3309 Readline thinks the screen display is correct.
3310 </DL>
3311 </P><P>
3312
3313 <A NAME="IDX255"></A>
3314 <DL>
3315 <DT><U>Function:</U> int <B>rl_on_new_line</B> <I>(void)</I>
3316 <DD>Tell the update functions that we have moved onto a new (empty) line,
3317 usually after ouputting a newline.
3318 </DL>
3319 </P><P>
3320
3321 <A NAME="IDX256"></A>
3322 <DL>
3323 <DT><U>Function:</U> int <B>rl_on_new_line_with_prompt</B> <I>(void)</I>
3324 <DD>Tell the update functions that we have moved onto a new line, with
3325 <VAR>rl_prompt</VAR> already displayed.
3326 This could be used by applications that want to output the prompt string
3327 themselves, but still need Readline to know the prompt string length for
3328 redisplay.
3329 It should be used after setting <VAR>rl_already_prompted</VAR>.
3330 </DL>
3331 </P><P>
3332
3333 <A NAME="IDX257"></A>
3334 <DL>
3335 <DT><U>Function:</U> int <B>rl_reset_line_state</B> <I>(void)</I>
3336 <DD>Reset the display state to a clean state and redisplay the current line
3337 starting on a new line.
3338 </DL>
3339 </P><P>
3340
3341 <A NAME="IDX258"></A>
3342 <DL>
3343 <DT><U>Function:</U> int <B>rl_crlf</B> <I>(void)</I>
3344 <DD>Move the cursor to the start of the next screen line.
3345 </DL>
3346 </P><P>
3347
3348 <A NAME="IDX259"></A>
3349 <DL>
3350 <DT><U>Function:</U> int <B>rl_show_char</B> <I>(int c)</I>
3351 <DD>Display character <VAR>c</VAR> on <CODE>rl_outstream</CODE>.
3352 If Readline has not been set to display meta characters directly, this
3353 will convert meta characters to a meta-prefixed key sequence.
3354 This is intended for use by applications which wish to do their own
3355 redisplay.
3356 </DL>
3357 </P><P>
3358
3359 <A NAME="IDX260"></A>
3360 <DL>
3361 <DT><U>Function:</U> int <B>rl_message</B> <I>(const char *, <small>...</small>)</I>
3362 <DD>The arguments are a format string as would be supplied to <CODE>printf</CODE>,
3363 possibly containing conversion specifications such as <SAMP>`%d'</SAMP>, and
3364 any additional arguments necessary to satisfy the conversion specifications.
3365 The resulting string is displayed in the <EM>echo area</EM>.  The echo area
3366 is also used to display numeric arguments and search strings.
3367 You should call <CODE>rl_save_prompt</CODE> to save the prompt information
3368 before calling this function.
3369 </DL>
3370 </P><P>
3371
3372 <A NAME="IDX261"></A>
3373 <DL>
3374 <DT><U>Function:</U> int <B>rl_clear_message</B> <I>(void)</I>
3375 <DD>Clear the message in the echo area.  If the prompt was saved with a call to
3376 <CODE>rl_save_prompt</CODE> before the last call to <CODE>rl_message</CODE>,
3377 call <CODE>rl_restore_prompt</CODE> before calling this function.
3378 </DL>
3379 </P><P>
3380
3381 <A NAME="IDX262"></A>
3382 <DL>
3383 <DT><U>Function:</U> void <B>rl_save_prompt</B> <I>(void)</I>
3384 <DD>Save the local Readline prompt display state in preparation for
3385 displaying a new message in the message area with <CODE>rl_message()</CODE>.
3386 </DL>
3387 </P><P>
3388
3389 <A NAME="IDX263"></A>
3390 <DL>
3391 <DT><U>Function:</U> void <B>rl_restore_prompt</B> <I>(void)</I>
3392 <DD>Restore the local Readline prompt display state saved by the most
3393 recent call to <CODE>rl_save_prompt</CODE>.
3394 if <CODE>rl_save_prompt</CODE> was called to save the prompt before a call
3395 to <CODE>rl_message</CODE>, this function should be called before the
3396 corresponding call to <CODE>rl_clear_message</CODE>.
3397 </DL>
3398 </P><P>
3399
3400 <A NAME="IDX264"></A>
3401 <DL>
3402 <DT><U>Function:</U> int <B>rl_expand_prompt</B> <I>(char *prompt)</I>
3403 <DD>Expand any special character sequences in <VAR>prompt</VAR> and set up the
3404 local Readline prompt redisplay variables.
3405 This function is called by <CODE>readline()</CODE>.  It may also be called to
3406 expand the primary prompt if the <CODE>rl_on_new_line_with_prompt()</CODE>
3407 function or <CODE>rl_already_prompted</CODE> variable is used.
3408 It returns the number of visible characters on the last line of the
3409 (possibly multi-line) prompt.
3410 Applications may indicate that the prompt contains characters that take
3411 up no physical screen space when displayed by bracketing a sequence of
3412 such characters with the special markers <CODE>RL_PROMPT_START_IGNORE</CODE>
3413 and <CODE>RL_PROMPT_END_IGNORE</CODE> (declared in <TT>`readline.h'</TT>.  This may
3414 be used to embed terminal-specific escape sequences in prompts.
3415 </DL>
3416 </P><P>
3417
3418 <A NAME="IDX265"></A>
3419 <DL>
3420 <DT><U>Function:</U> int <B>rl_set_prompt</B> <I>(const char *prompt)</I>
3421 <DD>Make Readline use <VAR>prompt</VAR> for subsequent redisplay.  This calls
3422 <CODE>rl_expand_prompt()</CODE> to expand the prompt and sets <CODE>rl_prompt</CODE>
3423 to the result.
3424 </DL>
3425 </P><P>
3426
3427 <A NAME="Modifying Text"></A>
3428 <HR SIZE="6">
3429 <A NAME="SEC36"></A>
3430 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3431 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC35"> &lt; </A>]</TD>
3432 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC37"> &gt; </A>]</TD>
3433 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC37"> &lt;&lt; </A>]</TD>
3434 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3435 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3436 <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>
3437 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3438 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3439 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3440 </TR></TABLE>
3441 <H3> 2.4.7 Modifying Text </H3>
3442 <!--docid::SEC36::-->
3443 <P>
3444
3445 <A NAME="IDX266"></A>
3446 <DL>
3447 <DT><U>Function:</U> int <B>rl_insert_text</B> <I>(const char *text)</I>
3448 <DD>Insert <VAR>text</VAR> into the line at the current cursor position.
3449 Returns the number of characters inserted.
3450 </DL>
3451 </P><P>
3452
3453 <A NAME="IDX267"></A>
3454 <DL>
3455 <DT><U>Function:</U> int <B>rl_delete_text</B> <I>(int start, int end)</I>
3456 <DD>Delete the text between <VAR>start</VAR> and <VAR>end</VAR> in the current line.
3457 Returns the number of characters deleted.
3458 </DL>
3459 </P><P>
3460
3461 <A NAME="IDX268"></A>
3462 <DL>
3463 <DT><U>Function:</U> char * <B>rl_copy_text</B> <I>(int start, int end)</I>
3464 <DD>Return a copy of the text between <VAR>start</VAR> and <VAR>end</VAR> in
3465 the current line.
3466 </DL>
3467 </P><P>
3468
3469 <A NAME="IDX269"></A>
3470 <DL>
3471 <DT><U>Function:</U> int <B>rl_kill_text</B> <I>(int start, int end)</I>
3472 <DD>Copy the text between <VAR>start</VAR> and <VAR>end</VAR> in the current line
3473 to the kill ring, appending or prepending to the last kill if the
3474 last command was a kill command.  The text is deleted.
3475 If <VAR>start</VAR> is less than <VAR>end</VAR>,
3476 the text is appended, otherwise prepended.  If the last command was
3477 not a kill, a new kill ring slot is used.
3478 </DL>
3479 </P><P>
3480
3481 <A NAME="IDX270"></A>
3482 <DL>
3483 <DT><U>Function:</U> int <B>rl_push_macro_input</B> <I>(char *macro)</I>
3484 <DD>Cause <VAR>macro</VAR> to be inserted into the line, as if it had been invoked
3485 by a key bound to a macro.  Not especially useful; use
3486 <CODE>rl_insert_text()</CODE> instead.
3487 </DL>
3488 </P><P>
3489
3490 <A NAME="Character Input"></A>
3491 <HR SIZE="6">
3492 <A NAME="SEC37"></A>
3493 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3494 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC36"> &lt; </A>]</TD>
3495 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC38"> &gt; </A>]</TD>
3496 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC38"> &lt;&lt; </A>]</TD>
3497 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3498 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3499 <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>
3500 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3501 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3502 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3503 </TR></TABLE>
3504 <H3> 2.4.8 Character Input </H3>
3505 <!--docid::SEC37::-->
3506 <P>
3507
3508 <A NAME="IDX271"></A>
3509 <DL>
3510 <DT><U>Function:</U> int <B>rl_read_key</B> <I>(void)</I>
3511 <DD>Return the next character available from Readline's current input stream.
3512 This handles input inserted into
3513 the input stream via <VAR>rl_pending_input</VAR> (see section <A HREF="readline.html#SEC28">2.3 Readline Variables</A>)
3514 and <CODE>rl_stuff_char()</CODE>, macros, and characters read from the keyboard.
3515 While waiting for input, this function will call any function assigned to
3516 the <CODE>rl_event_hook</CODE> variable.
3517 </DL>
3518 </P><P>
3519
3520 <A NAME="IDX272"></A>
3521 <DL>
3522 <DT><U>Function:</U> int <B>rl_getc</B> <I>(FILE *stream)</I>
3523 <DD>Return the next character available from <VAR>stream</VAR>, which is assumed to
3524 be the keyboard.
3525 </DL>
3526 </P><P>
3527
3528 <A NAME="IDX273"></A>
3529 <DL>
3530 <DT><U>Function:</U> int <B>rl_stuff_char</B> <I>(int c)</I>
3531 <DD>Insert <VAR>c</VAR> into the Readline input stream.  It will be "read"
3532 before Readline attempts to read characters from the terminal with
3533 <CODE>rl_read_key()</CODE>.  Up to 512 characters may be pushed back.
3534 <CODE>rl_stuff_char</CODE> returns 1 if the character was successfully inserted;
3535 0 otherwise.
3536 </DL>
3537 </P><P>
3538
3539 <A NAME="IDX274"></A>
3540 <DL>
3541 <DT><U>Function:</U> int <B>rl_execute_next</B> <I>(int c)</I>
3542 <DD>Make <VAR>c</VAR> be the next command to be executed when <CODE>rl_read_key()</CODE>
3543 is called.  This sets <VAR>rl_pending_input</VAR>.
3544 </DL>
3545 </P><P>
3546
3547 <A NAME="IDX275"></A>
3548 <DL>
3549 <DT><U>Function:</U> int <B>rl_clear_pending_input</B> <I>(void)</I>
3550 <DD>Unset <VAR>rl_pending_input</VAR>, effectively negating the effect of any
3551 previous call to <CODE>rl_execute_next()</CODE>.  This works only if the
3552 pending input has not already been read with <CODE>rl_read_key()</CODE>.
3553 </DL>
3554 </P><P>
3555
3556 <A NAME="IDX276"></A>
3557 <DL>
3558 <DT><U>Function:</U> int <B>rl_set_keyboard_input_timeout</B> <I>(int u)</I>
3559 <DD>While waiting for keyboard input in <CODE>rl_read_key()</CODE>, Readline will
3560 wait for <VAR>u</VAR> microseconds for input before calling any function
3561 assigned to <CODE>rl_event_hook</CODE>.  The default waiting period is
3562 one-tenth of a second.  Returns the old timeout value.
3563 </DL>
3564 </P><P>
3565
3566 <A NAME="Terminal Management"></A>
3567 <HR SIZE="6">
3568 <A NAME="SEC38"></A>
3569 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3570 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC37"> &lt; </A>]</TD>
3571 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC39"> &gt; </A>]</TD>
3572 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &lt;&lt; </A>]</TD>
3573 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3574 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3575 <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>
3576 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3577 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3578 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3579 </TR></TABLE>
3580 <H3> 2.4.9 Terminal Management </H3>
3581 <!--docid::SEC38::-->
3582 <P>
3583
3584 <A NAME="IDX277"></A>
3585 <DL>
3586 <DT><U>Function:</U> void <B>rl_prep_terminal</B> <I>(int meta_flag)</I>
3587 <DD>Modify the terminal settings for Readline's use, so <CODE>readline()</CODE>
3588 can read a single character at a time from the keyboard.
3589 The <VAR>meta_flag</VAR> argument should be non-zero if Readline should
3590 read eight-bit input.
3591 </DL>
3592 </P><P>
3593
3594 <A NAME="IDX278"></A>
3595 <DL>
3596 <DT><U>Function:</U> void <B>rl_deprep_terminal</B> <I>(void)</I>
3597 <DD>Undo the effects of <CODE>rl_prep_terminal()</CODE>, leaving the terminal in
3598 the state in which it was before the most recent call to
3599 <CODE>rl_prep_terminal()</CODE>.
3600 </DL>
3601 </P><P>
3602
3603 <A NAME="IDX279"></A>
3604 <DL>
3605 <DT><U>Function:</U> void <B>rl_tty_set_default_bindings</B> <I>(Keymap kmap)</I>
3606 <DD>Read the operating system's terminal editing characters (as would be
3607 displayed by <CODE>stty</CODE>) to their Readline equivalents.
3608 The bindings are performed in <VAR>kmap</VAR>.
3609 </DL>
3610 </P><P>
3611
3612 <A NAME="IDX280"></A>
3613 <DL>
3614 <DT><U>Function:</U> void <B>rl_tty_unset_default_bindings</B> <I>(Keymap kmap)</I>
3615 <DD>Reset the bindings manipulated by <CODE>rl_tty_set_default_bindings</CODE> so
3616 that the terminal editing characters are bound to <CODE>rl_insert</CODE>.
3617 The bindings are performed in <VAR>kmap</VAR>.
3618 </DL>
3619 </P><P>
3620
3621 <A NAME="IDX281"></A>
3622 <DL>
3623 <DT><U>Function:</U> int <B>rl_reset_terminal</B> <I>(const char *terminal_name)</I>
3624 <DD>Reinitialize Readline's idea of the terminal settings using
3625 <VAR>terminal_name</VAR> as the terminal type (e.g., <CODE>vt100</CODE>).
3626 If <VAR>terminal_name</VAR> is <CODE>NULL</CODE>, the value of the <CODE>TERM</CODE>
3627 environment variable is used.
3628 </DL>
3629 </P><P>
3630
3631 <A NAME="Utility Functions"></A>
3632 <HR SIZE="6">
3633 <A NAME="SEC39"></A>
3634 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3635 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC38"> &lt; </A>]</TD>
3636 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC40"> &gt; </A>]</TD>
3637 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> &lt;&lt; </A>]</TD>
3638 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3639 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3640 <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>
3641 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3642 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3643 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3644 </TR></TABLE>
3645 <H3> 2.4.10 Utility Functions </H3>
3646 <!--docid::SEC39::-->
3647 <P>
3648
3649 <A NAME="IDX282"></A>
3650 <DL>
3651 <DT><U>Function:</U> void <B>rl_replace_line</B> <I>(const char *text, int clear_undo)</I>
3652 <DD>Replace the contents of <CODE>rl_line_buffer</CODE> with <VAR>text</VAR>.
3653 The point and mark are preserved, if possible.
3654 If <VAR>clear_undo</VAR> is non-zero, the undo list associated with the
3655 current line is cleared.
3656 </DL>
3657 </P><P>
3658
3659 <A NAME="IDX283"></A>
3660 <DL>
3661 <DT><U>Function:</U> int <B>rl_extend_line_buffer</B> <I>(int len)</I>
3662 <DD>Ensure that <CODE>rl_line_buffer</CODE> has enough space to hold <VAR>len</VAR>
3663 characters, possibly reallocating it if necessary.
3664 </DL>
3665 </P><P>
3666
3667 <A NAME="IDX284"></A>
3668 <DL>
3669 <DT><U>Function:</U> int <B>rl_initialize</B> <I>(void)</I>
3670 <DD>Initialize or re-initialize Readline's internal state.
3671 It's not strictly necessary to call this; <CODE>readline()</CODE> calls it before
3672 reading any input.
3673 </DL>
3674 </P><P>
3675
3676 <A NAME="IDX285"></A>
3677 <DL>
3678 <DT><U>Function:</U> int <B>rl_ding</B> <I>(void)</I>
3679 <DD>Ring the terminal bell, obeying the setting of <CODE>bell-style</CODE>.
3680 </DL>
3681 </P><P>
3682
3683 <A NAME="IDX286"></A>
3684 <DL>
3685 <DT><U>Function:</U> int <B>rl_alphabetic</B> <I>(int c)</I>
3686 <DD>Return 1 if <VAR>c</VAR> is an alphabetic character.
3687 </DL>
3688 </P><P>
3689
3690 <A NAME="IDX287"></A>
3691 <DL>
3692 <DT><U>Function:</U> void <B>rl_display_match_list</B> <I>(char **matches, int len, int max)</I>
3693 <DD>A convenience function for displaying a list of strings in
3694 columnar format on Readline's output stream.  <CODE>matches</CODE> is the list
3695 of strings, in argv format, such as a list of completion matches.
3696 <CODE>len</CODE> is the number of strings in <CODE>matches</CODE>, and <CODE>max</CODE>
3697 is the length of the longest string in <CODE>matches</CODE>.  This function uses
3698 the setting of <CODE>print-completions-horizontally</CODE> to select how the
3699 matches are displayed (see section <A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A>).
3700 </DL>
3701 </P><P>
3702
3703 The following are implemented as macros, defined in <CODE>chardefs.h</CODE>.
3704 Applications should refrain from using them.
3705 </P><P>
3706
3707 <A NAME="IDX288"></A>
3708 <DL>
3709 <DT><U>Function:</U> int <B>_rl_uppercase_p</B> <I>(int c)</I>
3710 <DD>Return 1 if <VAR>c</VAR> is an uppercase alphabetic character.
3711 </DL>
3712 </P><P>
3713
3714 <A NAME="IDX289"></A>
3715 <DL>
3716 <DT><U>Function:</U> int <B>_rl_lowercase_p</B> <I>(int c)</I>
3717 <DD>Return 1 if <VAR>c</VAR> is a lowercase alphabetic character.
3718 </DL>
3719 </P><P>
3720
3721 <A NAME="IDX290"></A>
3722 <DL>
3723 <DT><U>Function:</U> int <B>_rl_digit_p</B> <I>(int c)</I>
3724 <DD>Return 1 if <VAR>c</VAR> is a numeric character.
3725 </DL>
3726 </P><P>
3727
3728 <A NAME="IDX291"></A>
3729 <DL>
3730 <DT><U>Function:</U> int <B>_rl_to_upper</B> <I>(int c)</I>
3731 <DD>If <VAR>c</VAR> is a lowercase alphabetic character, return the corresponding
3732 uppercase character.
3733 </DL>
3734 </P><P>
3735
3736 <A NAME="IDX292"></A>
3737 <DL>
3738 <DT><U>Function:</U> int <B>_rl_to_lower</B> <I>(int c)</I>
3739 <DD>If <VAR>c</VAR> is an uppercase alphabetic character, return the corresponding
3740 lowercase character.
3741 </DL>
3742 </P><P>
3743
3744 <A NAME="IDX293"></A>
3745 <DL>
3746 <DT><U>Function:</U> int <B>_rl_digit_value</B> <I>(int c)</I>
3747 <DD>If <VAR>c</VAR> is a number, return the value it represents.
3748 </DL>
3749 </P><P>
3750
3751 <A NAME="Miscellaneous Functions"></A>
3752 <HR SIZE="6">
3753 <A NAME="SEC40"></A>
3754 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3755 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC39"> &lt; </A>]</TD>
3756 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC41"> &gt; </A>]</TD>
3757 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> &lt;&lt; </A>]</TD>
3758 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3759 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3760 <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>
3761 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3762 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3763 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3764 </TR></TABLE>
3765 <H3> 2.4.11 Miscellaneous Functions </H3>
3766 <!--docid::SEC40::-->
3767 <P>
3768
3769 <A NAME="IDX294"></A>
3770 <DL>
3771 <DT><U>Function:</U> int <B>rl_macro_bind</B> <I>(const char *keyseq, const char *macro, Keymap map)</I>
3772 <DD>Bind the key sequence <VAR>keyseq</VAR> to invoke the macro <VAR>macro</VAR>.
3773 The binding is performed in <VAR>map</VAR>.  When <VAR>keyseq</VAR> is invoked, the
3774 <VAR>macro</VAR> will be inserted into the line.  This function is deprecated;
3775 use <CODE>rl_generic_bind()</CODE> instead.
3776 </DL>
3777 </P><P>
3778
3779 <A NAME="IDX295"></A>
3780 <DL>
3781 <DT><U>Function:</U> void <B>rl_macro_dumper</B> <I>(int readable)</I>
3782 <DD>Print the key sequences bound to macros and their values, using
3783 the current keymap, to <CODE>rl_outstream</CODE>.
3784 If <VAR>readable</VAR> is non-zero, the list is formatted in such a way
3785 that it can be made part of an <CODE>inputrc</CODE> file and re-read.
3786 </DL>
3787 </P><P>
3788
3789 <A NAME="IDX296"></A>
3790 <DL>
3791 <DT><U>Function:</U> int <B>rl_variable_bind</B> <I>(const char *variable, const char *value)</I>
3792 <DD>Make the Readline variable <VAR>variable</VAR> have <VAR>value</VAR>.
3793 This behaves as if the readline command
3794 <SAMP>`set <VAR>variable</VAR> <VAR>value</VAR>'</SAMP> had been executed in an <CODE>inputrc</CODE>
3795 file (see section <A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A>).
3796 </DL>
3797 </P><P>
3798
3799 <A NAME="IDX297"></A>
3800 <DL>
3801 <DT><U>Function:</U> char * <B>rl_variable_value</B> <I>(const char *variable)</I>
3802 <DD>Return a string representing the value of the Readline variable <VAR>variable</VAR>.
3803 For boolean variables, this string is either <SAMP>`on'</SAMP> or <SAMP>`off'</SAMP>.
3804 </DL>
3805 </P><P>
3806
3807 <A NAME="IDX298"></A>
3808 <DL>
3809 <DT><U>Function:</U> void <B>rl_variable_dumper</B> <I>(int readable)</I>
3810 <DD>Print the readline variable names and their current values
3811 to <CODE>rl_outstream</CODE>.
3812 If <VAR>readable</VAR> is non-zero, the list is formatted in such a way
3813 that it can be made part of an <CODE>inputrc</CODE> file and re-read.
3814 </DL>
3815 </P><P>
3816
3817 <A NAME="IDX299"></A>
3818 <DL>
3819 <DT><U>Function:</U> int <B>rl_set_paren_blink_timeout</B> <I>(int u)</I>
3820 <DD>Set the time interval (in microseconds) that Readline waits when showing
3821 a balancing character when <CODE>blink-matching-paren</CODE> has been enabled.
3822 </DL>
3823 </P><P>
3824
3825 <A NAME="IDX300"></A>
3826 <DL>
3827 <DT><U>Function:</U> char * <B>rl_get_termcap</B> <I>(const char *cap)</I>
3828 <DD>Retrieve the string value of the termcap capability <VAR>cap</VAR>.
3829 Readline fetches the termcap entry for the current terminal name and
3830 uses those capabilities to move around the screen line and perform other
3831 terminal-specific operations, like erasing a line.  Readline does not
3832 use all of a terminal's capabilities, and this function will return
3833 values for only those capabilities Readline uses.
3834 </DL>
3835 </P><P>
3836
3837 <A NAME="Alternate Interface"></A>
3838 <HR SIZE="6">
3839 <A NAME="SEC41"></A>
3840 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3841 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC40"> &lt; </A>]</TD>
3842 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC42"> &gt; </A>]</TD>
3843 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> &lt;&lt; </A>]</TD>
3844 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3845 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3846 <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>
3847 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3848 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3849 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3850 </TR></TABLE>
3851 <H3> 2.4.12 Alternate Interface </H3>
3852 <!--docid::SEC41::-->
3853 <P>
3854
3855 An alternate interface is available to plain <CODE>readline()</CODE>.  Some
3856 applications need to interleave keyboard I/O with file, device, or
3857 window system I/O, typically by using a main loop to <CODE>select()</CODE>
3858 on various file descriptors.  To accomodate this need, readline can
3859 also be invoked as a `callback' function from an event loop.  There
3860 are functions available to make this easy.
3861 </P><P>
3862
3863 <A NAME="IDX301"></A>
3864 <DL>
3865 <DT><U>Function:</U> void <B>rl_callback_handler_install</B> <I>(const char *prompt, rl_vcpfunc_t *lhandler)</I>
3866 <DD>Set up the terminal for readline I/O and display the initial
3867 expanded value of <VAR>prompt</VAR>.  Save the value of <VAR>lhandler</VAR> to
3868 use as a function to call when a complete line of input has been entered.
3869 The function takes the text of the line as an argument.
3870 </DL>
3871 </P><P>
3872
3873 <A NAME="IDX302"></A>
3874 <DL>
3875 <DT><U>Function:</U> void <B>rl_callback_read_char</B> <I>(void)</I>
3876 <DD>Whenever an application determines that keyboard input is available, it
3877 should call <CODE>rl_callback_read_char()</CODE>, which will read the next
3878 character from the current input source.
3879 If that character completes the line, <CODE>rl_callback_read_char</CODE> will
3880 invoke the <VAR>lhandler</VAR> function saved by <CODE>rl_callback_handler_install</CODE>
3881 to process the line.
3882 Before calling the <VAR>lhandler</VAR> function, the terminal settings are
3883 reset to the values they had before calling
3884 <CODE>rl_callback_handler_install</CODE>.
3885 If the <VAR>lhandler</VAR> function returns,
3886 the terminal settings are modified for Readline's use again.
3887 <CODE>EOF</CODE> is  indicated by calling <VAR>lhandler</VAR> with a
3888 <CODE>NULL</CODE> line.
3889 </DL>
3890 </P><P>
3891
3892 <A NAME="IDX303"></A>
3893 <DL>
3894 <DT><U>Function:</U> void <B>rl_callback_handler_remove</B> <I>(void)</I>
3895 <DD>Restore the terminal to its initial state and remove the line handler.
3896 This may be called from within a callback as well as independently.
3897 If the <VAR>lhandler</VAR> installed by <CODE>rl_callback_handler_install</CODE>
3898 does not exit the program, either this function or the function referred
3899 to by the value of <CODE>rl_deprep_term_function</CODE> should be called before
3900 the program exits to reset the terminal settings.
3901 </DL>
3902 </P><P>
3903
3904 <A NAME="A Readline Example"></A>
3905 <HR SIZE="6">
3906 <A NAME="SEC42"></A>
3907 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3908 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC41"> &lt; </A>]</TD>
3909 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt; </A>]</TD>
3910 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> &lt;&lt; </A>]</TD>
3911 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3912 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &gt;&gt; </A>]</TD>
3913 <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>
3914 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3915 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3916 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3917 </TR></TABLE>
3918 <H3> 2.4.13 A Readline Example </H3>
3919 <!--docid::SEC42::-->
3920 <P>
3921
3922 Here is a function which changes lowercase characters to their uppercase
3923 equivalents, and uppercase characters to lowercase.  If
3924 this function was bound to <SAMP>`M-c'</SAMP>, then typing <SAMP>`M-c'</SAMP> would
3925 change the case of the character under point.  Typing <SAMP>`M-1 0 M-c'</SAMP>
3926 would change the case of the following 10 characters, leaving the cursor on
3927 the last character changed.
3928 </P><P>
3929
3930 <TABLE><tr><td>&nbsp;</td><td class=example><pre>/* Invert the case of the COUNT following characters. */
3931 int
3932 invert_case_line (count, key)
3933      int count, key;
3934 {
3935   register int start, end, i;
3936
3937   start = rl_point;
3938
3939   if (rl_point &#62;= rl_end)
3940     return (0);
3941
3942   if (count &#60; 0)
3943     {
3944       direction = -1;
3945       count = -count;
3946     }
3947   else
3948     direction = 1;
3949       
3950   /* Find the end of the range to modify. */
3951   end = start + (count * direction);
3952
3953   /* Force it to be within range. */
3954   if (end &#62; rl_end)
3955     end = rl_end;
3956   else if (end &#60; 0)
3957     end = 0;
3958
3959   if (start == end)
3960     return (0);
3961
3962   if (start &#62; end)
3963     {
3964       int temp = start;
3965       start = end;
3966       end = temp;
3967     }
3968
3969   /* Tell readline that we are modifying the line,
3970      so it will save the undo information. */
3971   rl_modifying (start, end);
3972
3973   for (i = start; i != end; i++)
3974     {
3975       if (_rl_uppercase_p (rl_line_buffer[i]))
3976         rl_line_buffer[i] = _rl_to_lower (rl_line_buffer[i]);
3977       else if (_rl_lowercase_p (rl_line_buffer[i]))
3978         rl_line_buffer[i] = _rl_to_upper (rl_line_buffer[i]);
3979     }
3980   /* Move point to on top of the last character changed. */
3981   rl_point = (direction == 1) ? end - 1 : start;
3982   return (0);
3983 }
3984 </pre></td></tr></table></P><P>
3985
3986 <A NAME="Readline Signal Handling"></A>
3987 <HR SIZE="6">
3988 <A NAME="SEC43"></A>
3989 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3990 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC42"> &lt; </A>]</TD>
3991 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> &gt; </A>]</TD>
3992 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> &lt;&lt; </A>]</TD>
3993 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
3994 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
3995 <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>
3996 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3997 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3998 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3999 </TR></TABLE>
4000 <H2> 2.5 Readline Signal Handling </H2>
4001 <!--docid::SEC43::-->
4002 <P>
4003
4004 Signals are asynchronous events sent to a process by the Unix kernel,
4005 sometimes on behalf of another process.  They are intended to indicate
4006 exceptional events, like a user pressing the interrupt key on his terminal,
4007 or a network connection being broken.  There is a class of signals that can
4008 be sent to the process currently reading input from the keyboard.  Since
4009 Readline changes the terminal attributes when it is called, it needs to
4010 perform special processing when such a signal is received in order to
4011 restore the terminal to a sane state, or provide application writers with
4012 functions to do so manually. 
4013 </P><P>
4014
4015 Readline contains an internal signal handler that is installed for a
4016 number of signals (<CODE>SIGINT</CODE>, <CODE>SIGQUIT</CODE>, <CODE>SIGTERM</CODE>,
4017 <CODE>SIGALRM</CODE>, <CODE>SIGTSTP</CODE>, <CODE>SIGTTIN</CODE>, and <CODE>SIGTTOU</CODE>).
4018 When one of these signals is received, the signal handler
4019 will reset the terminal attributes to those that were in effect before
4020 <CODE>readline()</CODE> was called, reset the signal handling to what it was
4021 before <CODE>readline()</CODE> was called, and resend the signal to the calling
4022 application.
4023 If and when the calling application's signal handler returns, Readline
4024 will reinitialize the terminal and continue to accept input.
4025 When a <CODE>SIGINT</CODE> is received, the Readline signal handler performs
4026 some additional work, which will cause any partially-entered line to be
4027 aborted (see the description of <CODE>rl_free_line_state()</CODE> below).
4028 </P><P>
4029
4030 There is an additional Readline signal handler, for <CODE>SIGWINCH</CODE>, which
4031 the kernel sends to a process whenever the terminal's size changes (for
4032 example, if a user resizes an <CODE>xterm</CODE>).  The Readline <CODE>SIGWINCH</CODE>
4033 handler updates Readline's internal screen size information, and then calls
4034 any <CODE>SIGWINCH</CODE> signal handler the calling application has installed. 
4035 Readline calls the application's <CODE>SIGWINCH</CODE> signal handler without
4036 resetting the terminal to its original state.  If the application's signal
4037 handler does more than update its idea of the terminal size and return (for
4038 example, a <CODE>longjmp</CODE> back to a main processing loop), it <EM>must</EM>
4039 call <CODE>rl_cleanup_after_signal()</CODE> (described below), to restore the
4040 terminal state. 
4041 </P><P>
4042
4043 Readline provides two variables that allow application writers to
4044 control whether or not it will catch certain signals and act on them
4045 when they are received.  It is important that applications change the
4046 values of these variables only when calling <CODE>readline()</CODE>, not in
4047 a signal handler, so Readline's internal signal state is not corrupted.
4048 </P><P>
4049
4050 <A NAME="IDX304"></A>
4051 <DL>
4052 <DT><U>Variable:</U> int <B>rl_catch_signals</B>
4053 <DD>If this variable is non-zero, Readline will install signal handlers for
4054 <CODE>SIGINT</CODE>, <CODE>SIGQUIT</CODE>, <CODE>SIGTERM</CODE>, <CODE>SIGALRM</CODE>,
4055 <CODE>SIGTSTP</CODE>, <CODE>SIGTTIN</CODE>, and <CODE>SIGTTOU</CODE>.
4056 </P><P>
4057
4058 The default value of <CODE>rl_catch_signals</CODE> is 1.
4059 </DL>
4060 </P><P>
4061
4062 <A NAME="IDX305"></A>
4063 <DL>
4064 <DT><U>Variable:</U> int <B>rl_catch_sigwinch</B>
4065 <DD>If this variable is non-zero, Readline will install a signal handler for
4066 <CODE>SIGWINCH</CODE>.
4067 </P><P>
4068
4069 The default value of <CODE>rl_catch_sigwinch</CODE> is 1.
4070 </DL>
4071 </P><P>
4072
4073 If an application does not wish to have Readline catch any signals, or
4074 to handle signals other than those Readline catches (<CODE>SIGHUP</CODE>,
4075 for example), 
4076 Readline provides convenience functions to do the necessary terminal
4077 and internal state cleanup upon receipt of a signal.
4078 </P><P>
4079
4080 <A NAME="IDX306"></A>
4081 <DL>
4082 <DT><U>Function:</U> void <B>rl_cleanup_after_signal</B> <I>(void)</I>
4083 <DD>This function will reset the state of the terminal to what it was before
4084 <CODE>readline()</CODE> was called, and remove the Readline signal handlers for
4085 all signals, depending on the values of <CODE>rl_catch_signals</CODE> and
4086 <CODE>rl_catch_sigwinch</CODE>.
4087 </DL>
4088 </P><P>
4089
4090 <A NAME="IDX307"></A>
4091 <DL>
4092 <DT><U>Function:</U> void <B>rl_free_line_state</B> <I>(void)</I>
4093 <DD>This will free any partial state associated with the current input line
4094 (undo information, any partial history entry, any partially-entered
4095 keyboard macro, and any partially-entered numeric argument).  This
4096 should be called before <CODE>rl_cleanup_after_signal()</CODE>.  The
4097 Readline signal handler for <CODE>SIGINT</CODE> calls this to abort the
4098 current input line.
4099 </DL>
4100 </P><P>
4101
4102 <A NAME="IDX308"></A>
4103 <DL>
4104 <DT><U>Function:</U> void <B>rl_reset_after_signal</B> <I>(void)</I>
4105 <DD>This will reinitialize the terminal and reinstall any Readline signal
4106 handlers, depending on the values of <CODE>rl_catch_signals</CODE> and
4107 <CODE>rl_catch_sigwinch</CODE>.
4108 </DL>
4109 </P><P>
4110
4111 If an application does not wish Readline to catch <CODE>SIGWINCH</CODE>, it may
4112 call <CODE>rl_resize_terminal()</CODE> or <CODE>rl_set_screen_size()</CODE> to force
4113 Readline to update its idea of the terminal size when a <CODE>SIGWINCH</CODE>
4114 is received.
4115 </P><P>
4116
4117 <A NAME="IDX309"></A>
4118 <DL>
4119 <DT><U>Function:</U> void <B>rl_resize_terminal</B> <I>(void)</I>
4120 <DD>Update Readline's internal screen size by reading values from the kernel.
4121 </DL>
4122 </P><P>
4123
4124 <A NAME="IDX310"></A>
4125 <DL>
4126 <DT><U>Function:</U> void <B>rl_set_screen_size</B> <I>(int rows, int cols)</I>
4127 <DD>Set Readline's idea of the terminal size to <VAR>rows</VAR> rows and
4128 <VAR>cols</VAR> columns.  If either <VAR>rows</VAR> or <VAR>columns</VAR> is less than
4129 or equal to 0, Readline's idea of that terminal dimension is unchanged.
4130 </DL>
4131 </P><P>
4132
4133 If an application does not want to install a <CODE>SIGWINCH</CODE> handler, but
4134 is still interested in the screen dimensions, Readline's idea of the screen
4135 size may be queried.
4136 </P><P>
4137
4138 <A NAME="IDX311"></A>
4139 <DL>
4140 <DT><U>Function:</U> void <B>rl_get_screen_size</B> <I>(int *rows, int *cols)</I>
4141 <DD>Return Readline's idea of the terminal's size in the
4142 variables pointed to by the arguments.
4143 </DL>
4144 </P><P>
4145
4146 <A NAME="IDX312"></A>
4147 <DL>
4148 <DT><U>Function:</U> void <B>rl_reset_screen_size</B> <I>(void)</I>
4149 <DD>Cause Readline to reobtain the screen size and recalculate its dimensions.
4150 </DL>
4151 </P><P>
4152
4153 The following functions install and remove Readline's signal handlers.
4154 </P><P>
4155
4156 <A NAME="IDX313"></A>
4157 <DL>
4158 <DT><U>Function:</U> int <B>rl_set_signals</B> <I>(void)</I>
4159 <DD>Install Readline's signal handler for <CODE>SIGINT</CODE>, <CODE>SIGQUIT</CODE>,
4160 <CODE>SIGTERM</CODE>, <CODE>SIGALRM</CODE>, <CODE>SIGTSTP</CODE>, <CODE>SIGTTIN</CODE>,
4161 <CODE>SIGTTOU</CODE>, and <CODE>SIGWINCH</CODE>, depending on the values of
4162 <CODE>rl_catch_signals</CODE> and <CODE>rl_catch_sigwinch</CODE>.
4163 </DL>
4164 </P><P>
4165
4166 <A NAME="IDX314"></A>
4167 <DL>
4168 <DT><U>Function:</U> int <B>rl_clear_signals</B> <I>(void)</I>
4169 <DD>Remove all of the Readline signal handlers installed by
4170 <CODE>rl_set_signals()</CODE>.
4171 </DL>
4172 </P><P>
4173
4174 <A NAME="Custom Completers"></A>
4175 <HR SIZE="6">
4176 <A NAME="SEC44"></A>
4177 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4178 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> &lt; </A>]</TD>
4179 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC45"> &gt; </A>]</TD>
4180 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
4181 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
4182 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
4183 <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>
4184 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4185 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4186 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4187 </TR></TABLE>
4188 <H2> 2.6 Custom Completers </H2>
4189 <!--docid::SEC44::-->
4190 <P>
4191
4192 Typically, a program that reads commands from the user has a way of
4193 disambiguating commands and data.  If your program is one of these, then
4194 it can provide completion for commands, data, or both.
4195 The following sections describe how your program and Readline
4196 cooperate to provide this service.
4197 </P><P>
4198
4199 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> 
4200 <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>
4201 <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>
4202 <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>
4203 <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>
4204 </TABLE></BLOCKQUOTE>
4205 <P>
4206
4207 <A NAME="How Completing Works"></A>
4208 <HR SIZE="6">
4209 <A NAME="SEC45"></A>
4210 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4211 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> &lt; </A>]</TD>
4212 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC46"> &gt; </A>]</TD>
4213 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
4214 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> Up </A>]</TD>
4215 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
4216 <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>
4217 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4218 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4219 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4220 </TR></TABLE>
4221 <H3> 2.6.1 How Completing Works </H3>
4222 <!--docid::SEC45::-->
4223 <P>
4224
4225 In order to complete some text, the full list of possible completions
4226 must be available.  That is, it is not possible to accurately
4227 expand a partial word without knowing all of the possible words
4228 which make sense in that context.  The Readline library provides
4229 the user interface to completion, and two of the most common
4230 completion functions:  filename and username.  For completing other types
4231 of text, you must write your own completion function.  This section
4232 describes exactly what such functions must do, and provides an example.
4233 </P><P>
4234
4235 There are three major functions used to perform completion:
4236 </P><P>
4237
4238 <OL>
4239 <LI>
4240 The user-interface function <CODE>rl_complete()</CODE>.  This function is
4241 called with the same arguments as other bindable Readline functions:
4242 <VAR>count</VAR> and <VAR>invoking_key</VAR>.
4243 It isolates the word to be completed and calls
4244 <CODE>rl_completion_matches()</CODE> to generate a list of possible completions.
4245 It then either lists the possible completions, inserts the possible
4246 completions, or actually performs the
4247 completion, depending on which behavior is desired.
4248 <P>
4249
4250 <LI>
4251 The internal function <CODE>rl_completion_matches()</CODE> uses an
4252 application-supplied <EM>generator</EM> function to generate the list of
4253 possible matches, and then returns the array of these matches.
4254 The caller should place the address of its generator function in
4255 <CODE>rl_completion_entry_function</CODE>.
4256 <P>
4257
4258 <LI>
4259 The generator function is called repeatedly from
4260 <CODE>rl_completion_matches()</CODE>, returning a string each time.  The
4261 arguments to the generator function are <VAR>text</VAR> and <VAR>state</VAR>.
4262 <VAR>text</VAR> is the partial word to be completed.  <VAR>state</VAR> is zero the
4263 first time the function is called, allowing the generator to perform
4264 any necessary initialization, and a positive non-zero integer for
4265 each subsequent call.  The generator function returns
4266 <CODE>(char *)NULL</CODE> to inform <CODE>rl_completion_matches()</CODE> that there are
4267 no more possibilities left.  Usually the generator function computes the
4268 list of possible completions when <VAR>state</VAR> is zero, and returns them
4269 one at a time on subsequent calls.  Each string the generator function
4270 returns as a match must be allocated with <CODE>malloc()</CODE>; Readline
4271 frees the strings when it has finished with them.
4272 Such a generator function is referred to as an
4273 <EM>application-specific completion function</EM>.
4274 <P>
4275
4276 </OL>
4277 <P>
4278
4279 <A NAME="IDX315"></A>
4280 <DL>
4281 <DT><U>Function:</U> int <B>rl_complete</B> <I>(int ignore, int invoking_key)</I>
4282 <DD>Complete the word at or before point.  You have supplied the function
4283 that does the initial simple matching selection algorithm (see
4284 <CODE>rl_completion_matches()</CODE>).  The default is to do filename completion.
4285 </DL>
4286 </P><P>
4287
4288 <A NAME="IDX316"></A>
4289 <DL>
4290 <DT><U>Variable:</U> rl_compentry_func_t * <B>rl_completion_entry_function</B>
4291 <DD>This is a pointer to the generator function for
4292 <CODE>rl_completion_matches()</CODE>.
4293 If the value of <CODE>rl_completion_entry_function</CODE> is
4294 <CODE>NULL</CODE> then the default filename generator
4295 function, <CODE>rl_filename_completion_function()</CODE>, is used.
4296 An <EM>application-specific completion function</EM> is a function whose
4297 address is assigned to <CODE>rl_completion_entry_function</CODE> and whose
4298 return values are used to  generate possible completions.
4299 </DL>
4300 </P><P>
4301
4302 <A NAME="Completion Functions"></A>
4303 <HR SIZE="6">
4304 <A NAME="SEC46"></A>
4305 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4306 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC45"> &lt; </A>]</TD>
4307 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC47"> &gt; </A>]</TD>
4308 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC47"> &lt;&lt; </A>]</TD>
4309 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> Up </A>]</TD>
4310 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
4311 <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>
4312 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4313 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4314 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4315 </TR></TABLE>
4316 <H3> 2.6.2 Completion Functions </H3>
4317 <!--docid::SEC46::-->
4318 <P>
4319
4320 Here is the complete list of callable completion functions present in
4321 Readline.
4322 </P><P>
4323
4324 <A NAME="IDX317"></A>
4325 <DL>
4326 <DT><U>Function:</U> int <B>rl_complete_internal</B> <I>(int what_to_do)</I>
4327 <DD>Complete the word at or before point.  <VAR>what_to_do</VAR> says what to do
4328 with the completion.  A value of <SAMP>`?'</SAMP> means list the possible
4329 completions.  <SAMP>`TAB'</SAMP> means do standard completion.  <SAMP>`*'</SAMP> means
4330 insert all of the possible completions.  <SAMP>`!'</SAMP> means to display
4331 all of the possible completions, if there is more than one, as well as
4332 performing partial completion.  <SAMP>`@'</SAMP> is similar to <SAMP>`!'</SAMP>, but
4333 possible completions are not listed if the possible completions share
4334 a common prefix.
4335 </DL>
4336 </P><P>
4337
4338 <A NAME="IDX318"></A>
4339 <DL>
4340 <DT><U>Function:</U> int <B>rl_complete</B> <I>(int ignore, int invoking_key)</I>
4341 <DD>Complete the word at or before point.  You have supplied the function
4342 that does the initial simple matching selection algorithm (see
4343 <CODE>rl_completion_matches()</CODE> and <CODE>rl_completion_entry_function</CODE>).
4344 The default is to do filename
4345 completion.  This calls <CODE>rl_complete_internal()</CODE> with an
4346 argument depending on <VAR>invoking_key</VAR>.
4347 </DL>
4348 </P><P>
4349
4350 <A NAME="IDX319"></A>
4351 <DL>
4352 <DT><U>Function:</U> int <B>rl_possible_completions</B> <I>(int count, int invoking_key)</I>
4353 <DD>List the possible completions.  See description of <CODE>rl_complete
4354 ()</CODE>.  This calls <CODE>rl_complete_internal()</CODE> with an argument of
4355 <SAMP>`?'</SAMP>.
4356 </DL>
4357 </P><P>
4358
4359 <A NAME="IDX320"></A>
4360 <DL>
4361 <DT><U>Function:</U> int <B>rl_insert_completions</B> <I>(int count, int invoking_key)</I>
4362 <DD>Insert the list of possible completions into the line, deleting the
4363 partially-completed word.  See description of <CODE>rl_complete()</CODE>.
4364 This calls <CODE>rl_complete_internal()</CODE> with an argument of <SAMP>`*'</SAMP>.
4365 </DL>
4366 </P><P>
4367
4368 <A NAME="IDX321"></A>
4369 <DL>
4370 <DT><U>Function:</U> int <B>rl_completion_mode</B> <I>(rl_command_func_t *cfunc)</I>
4371 <DD>Returns the apppriate value to pass to <CODE>rl_complete_internal()</CODE>
4372 depending on whether <VAR>cfunc</VAR> was called twice in succession and
4373 the values of the <CODE>show-all-if-ambiguous</CODE> and
4374 <CODE>show-all-if-unmodified</CODE> variables.
4375 Application-specific completion functions may use this function to present
4376 the same interface as <CODE>rl_complete()</CODE>.
4377 </DL>
4378 </P><P>
4379
4380 <A NAME="IDX322"></A>
4381 <DL>
4382 <DT><U>Function:</U> char ** <B>rl_completion_matches</B> <I>(const char *text, rl_compentry_func_t *entry_func)</I>
4383 <DD>Returns an array of strings which is a list of completions for
4384 <VAR>text</VAR>.  If there are no completions, returns <CODE>NULL</CODE>.
4385 The first entry in the returned array is the substitution for <VAR>text</VAR>.
4386 The remaining entries are the possible completions.  The array is
4387 terminated with a <CODE>NULL</CODE> pointer.
4388 </P><P>
4389
4390 <VAR>entry_func</VAR> is a function of two args, and returns a
4391 <CODE>char *</CODE>.  The first argument is <VAR>text</VAR>.  The second is a
4392 state argument; it is zero on the first call, and non-zero on subsequent
4393 calls.  <VAR>entry_func</VAR> returns a <CODE>NULL</CODE>  pointer to the caller
4394 when there are no more matches.
4395 </DL>
4396 </P><P>
4397
4398 <A NAME="IDX323"></A>
4399 <DL>
4400 <DT><U>Function:</U> char * <B>rl_filename_completion_function</B> <I>(const char *text, int state)</I>
4401 <DD>A generator function for filename completion in the general case.
4402 <VAR>text</VAR> is a partial filename.
4403 The Bash source is a useful reference for writing application-specific
4404 completion functions (the Bash completion functions call this and other
4405 Readline functions).
4406 </DL>
4407 </P><P>
4408
4409 <A NAME="IDX324"></A>
4410 <DL>
4411 <DT><U>Function:</U> char * <B>rl_username_completion_function</B> <I>(const char *text, int state)</I>
4412 <DD>A completion generator for usernames.  <VAR>text</VAR> contains a partial
4413 username preceded by a random character (usually <SAMP>`~'</SAMP>).  As with all
4414 completion generators, <VAR>state</VAR> is zero on the first call and non-zero
4415 for subsequent calls.
4416 </DL>
4417 </P><P>
4418
4419 <A NAME="Completion Variables"></A>
4420 <HR SIZE="6">
4421 <A NAME="SEC47"></A>
4422 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4423 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC46"> &lt; </A>]</TD>
4424 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC48"> &gt; </A>]</TD>
4425 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC48"> &lt;&lt; </A>]</TD>
4426 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> Up </A>]</TD>
4427 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
4428 <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>
4429 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4430 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4431 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4432 </TR></TABLE>
4433 <H3> 2.6.3 Completion Variables </H3>
4434 <!--docid::SEC47::-->
4435 <P>
4436
4437 <A NAME="IDX325"></A>
4438 <DL>
4439 <DT><U>Variable:</U> rl_compentry_func_t * <B>rl_completion_entry_function</B>
4440 <DD>A pointer to the generator function for <CODE>rl_completion_matches()</CODE>.
4441 <CODE>NULL</CODE> means to use <CODE>rl_filename_completion_function()</CODE>,
4442 the default filename completer.
4443 </DL>
4444 </P><P>
4445
4446 <A NAME="IDX326"></A>
4447 <DL>
4448 <DT><U>Variable:</U> rl_completion_func_t * <B>rl_attempted_completion_function</B>
4449 <DD>A pointer to an alternative function to create matches.
4450 The function is called with <VAR>text</VAR>, <VAR>start</VAR>, and <VAR>end</VAR>.
4451 <VAR>start</VAR> and <VAR>end</VAR> are indices in <CODE>rl_line_buffer</CODE> defining
4452 the boundaries of <VAR>text</VAR>, which is a character string.
4453 If this function exists and returns <CODE>NULL</CODE>, or if this variable is
4454 set to <CODE>NULL</CODE>, then <CODE>rl_complete()</CODE> will call the value of
4455 <CODE>rl_completion_entry_function</CODE> to generate matches, otherwise the
4456 array of strings returned will be used.
4457 If this function sets the <CODE>rl_attempted_completion_over</CODE>
4458 variable to a non-zero value, Readline will not perform its default
4459 completion even if this function returns no matches.
4460 </DL>
4461 </P><P>
4462
4463 <A NAME="IDX327"></A>
4464 <DL>
4465 <DT><U>Variable:</U> rl_quote_func_t * <B>rl_filename_quoting_function</B>
4466 <DD>A pointer to a function that will quote a filename in an
4467 application-specific fashion.  This is called if filename completion is being
4468 attempted and one of the characters in <CODE>rl_filename_quote_characters</CODE>
4469 appears in a completed filename.  The function is called with
4470 <VAR>text</VAR>, <VAR>match_type</VAR>, and <VAR>quote_pointer</VAR>.  The <VAR>text</VAR>
4471 is the filename to be quoted.  The <VAR>match_type</VAR> is either
4472 <CODE>SINGLE_MATCH</CODE>, if there is only one completion match, or
4473 <CODE>MULT_MATCH</CODE>.  Some functions use this to decide whether or not to
4474 insert a closing quote character.  The <VAR>quote_pointer</VAR> is a pointer
4475 to any opening quote character the user typed.  Some functions choose
4476 to reset this character.
4477 </DL>
4478 </P><P>
4479
4480 <A NAME="IDX328"></A>
4481 <DL>
4482 <DT><U>Variable:</U> rl_dequote_func_t * <B>rl_filename_dequoting_function</B>
4483 <DD>A pointer to a function that will remove application-specific quoting
4484 characters from a filename before completion is attempted, so those
4485 characters do not interfere with matching the text against names in
4486 the filesystem.  It is called with <VAR>text</VAR>, the text of the word
4487 to be dequoted, and <VAR>quote_char</VAR>, which is the quoting character 
4488 that delimits the filename (usually <SAMP>`''</SAMP> or <SAMP>`"'</SAMP>).  If
4489 <VAR>quote_char</VAR> is zero, the filename was not in an embedded string.
4490 </DL>
4491 </P><P>
4492
4493 <A NAME="IDX329"></A>
4494 <DL>
4495 <DT><U>Variable:</U> rl_linebuf_func_t * <B>rl_char_is_quoted_p</B>
4496 <DD>A pointer to a function to call that determines whether or not a specific
4497 character in the line buffer is quoted, according to whatever quoting
4498 mechanism the program calling Readline uses.  The function is called with
4499 two arguments: <VAR>text</VAR>, the text of the line, and <VAR>index</VAR>, the
4500 index of the character in the line.  It is used to decide whether a
4501 character found in <CODE>rl_completer_word_break_characters</CODE> should be
4502 used to break words for the completer.
4503 </DL>
4504 </P><P>
4505
4506 <A NAME="IDX330"></A>
4507 <DL>
4508 <DT><U>Variable:</U> rl_compignore_func_t * <B>rl_ignore_some_completions_function</B>
4509 <DD>This function, if defined, is called by the completer when real filename
4510 completion is done, after all the matching names have been generated.
4511 It is passed a <CODE>NULL</CODE> terminated array of matches.
4512 The first element (<CODE>matches[0]</CODE>) is the
4513 maximal substring common to all matches. This function can
4514 re-arrange the list of matches as required, but each element deleted
4515 from the array must be freed.
4516 </DL>
4517 </P><P>
4518
4519 <A NAME="IDX331"></A>
4520 <DL>
4521 <DT><U>Variable:</U> rl_icppfunc_t * <B>rl_directory_completion_hook</B>
4522 <DD>This function, if defined, is allowed to modify the directory portion
4523 of filenames Readline completes.  It is called with the address of a
4524 string (the current directory name) as an argument, and may modify that string.
4525 If the string is replaced with a new string, the old value should be freed.
4526 Any modified directory name should have a trailing slash.
4527 The modified value will be displayed as part of the completion, replacing
4528 the directory portion of the pathname the user typed.
4529 It returns an integer that should be non-zero if the function modifies
4530 its directory argument.
4531 It could be used to expand symbolic links or shell variables in pathnames.
4532 </DL>
4533 </P><P>
4534
4535 <A NAME="IDX332"></A>
4536 <DL>
4537 <DT><U>Variable:</U> rl_compdisp_func_t * <B>rl_completion_display_matches_hook</B>
4538 <DD>If non-zero, then this is the address of a function to call when
4539 completing a word would normally display the list of possible matches.
4540 This function is called in lieu of Readline displaying the list.
4541 It takes three arguments:
4542 (<CODE>char **</CODE><VAR>matches</VAR>, <CODE>int</CODE> <VAR>num_matches</VAR>, <CODE>int</CODE> <VAR>max_length</VAR>)
4543 where <VAR>matches</VAR> is the array of matching strings,
4544 <VAR>num_matches</VAR> is the number of strings in that array, and
4545 <VAR>max_length</VAR> is the length of the longest string in that array.
4546 Readline provides a convenience function, <CODE>rl_display_match_list</CODE>,
4547 that takes care of doing the display to Readline's output stream.  That
4548 function may be called from this hook.
4549 </DL>
4550 </P><P>
4551
4552 <A NAME="IDX333"></A>
4553 <DL>
4554 <DT><U>Variable:</U> const char * <B>rl_basic_word_break_characters</B>
4555 <DD>The basic list of characters that signal a break between words for the
4556 completer routine.  The default value of this variable is the characters
4557 which break words for completion in Bash:
4558 <CODE>" \t\n\"\\'`@$>&#60;=;|&#38;{("</CODE>.
4559 </DL>
4560 </P><P>
4561
4562 <A NAME="IDX334"></A>
4563 <DL>
4564 <DT><U>Variable:</U> const char * <B>rl_basic_quote_characters</B>
4565 <DD>A list of quote characters which can cause a word break.
4566 </DL>
4567 </P><P>
4568
4569 <A NAME="IDX335"></A>
4570 <DL>
4571 <DT><U>Variable:</U> const char * <B>rl_completer_word_break_characters</B>
4572 <DD>The list of characters that signal a break between words for
4573 <CODE>rl_complete_internal()</CODE>.  The default list is the value of
4574 <CODE>rl_basic_word_break_characters</CODE>.
4575 </DL>
4576 </P><P>
4577
4578 <A NAME="IDX336"></A>
4579 <DL>
4580 <DT><U>Variable:</U> rl_cpvfunc_t * <B>rl_completion_word_break_hook</B>
4581 <DD>If non-zero, this is the address of a function to call when Readline is
4582 deciding where to separate words for word completion.  It should return
4583 a character string like <CODE>rl_completer_word_break_characters</CODE> to be
4584 used to perform the current completion.  The function may choose to set
4585 <CODE>rl_completer_word_break_characters</CODE> itself.  If the function
4586 returns <CODE>NULL</CODE>, <CODE>rl_completer_word_break_characters</CODE> is used.
4587 </DL>
4588 </P><P>
4589
4590 <A NAME="IDX337"></A>
4591 <DL>
4592 <DT><U>Variable:</U> const char * <B>rl_completer_quote_characters</B>
4593 <DD>A list of characters which can be used to quote a substring of the line.
4594 Completion occurs on the entire substring, and within the substring
4595 <CODE>rl_completer_word_break_characters</CODE> are treated as any other character,
4596 unless they also appear within this list.
4597 </DL>
4598 </P><P>
4599
4600 <A NAME="IDX338"></A>
4601 <DL>
4602 <DT><U>Variable:</U> const char * <B>rl_filename_quote_characters</B>
4603 <DD>A list of characters that cause a filename to be quoted by the completer
4604 when they appear in a completed filename.  The default is the null string.
4605 </DL>
4606 </P><P>
4607
4608 <A NAME="IDX339"></A>
4609 <DL>
4610 <DT><U>Variable:</U> const char * <B>rl_special_prefixes</B>
4611 <DD>The list of characters that are word break characters, but should be
4612 left in <VAR>text</VAR> when it is passed to the completion function.
4613 Programs can use this to help determine what kind of completing to do.
4614 For instance, Bash sets this variable to "$@" so that it can complete
4615 shell variables and hostnames.
4616 </DL>
4617 </P><P>
4618
4619 <A NAME="IDX340"></A>
4620 <DL>
4621 <DT><U>Variable:</U> int <B>rl_completion_query_items</B>
4622 <DD>Up to this many items will be displayed in response to a
4623 possible-completions call.  After that, readline asks the user if she is sure
4624 she wants to see them all.  The default value is 100.  A negative value 
4625 indicates that Readline should never ask the user.
4626 </DL>
4627 </P><P>
4628
4629 <A NAME="IDX341"></A>
4630 <DL>
4631 <DT><U>Variable:</U> int <B>rl_completion_append_character</B>
4632 <DD>When a single completion alternative matches at the end of the command
4633 line, this character is appended to the inserted completion text.  The
4634 default is a space character (<SAMP>` '</SAMP>).  Setting this to the null
4635 character (<SAMP>`\0'</SAMP>) prevents anything being appended automatically.
4636 This can be changed in application-specific completion functions to
4637 provide the "most sensible word separator character" according to
4638 an application-specific command line syntax specification.
4639 </DL>
4640 </P><P>
4641
4642 <A NAME="IDX342"></A>
4643 <DL>
4644 <DT><U>Variable:</U> int <B>rl_completion_suppress_append</B>
4645 <DD>If non-zero, <VAR>rl_completion_append_character</VAR> is not appended to
4646 matches at the end of the command line, as described above.
4647 It is set to 0 before any application-specific completion function
4648 is called, and may only be changed within such a function.
4649 </DL>
4650 </P><P>
4651
4652 <A NAME="IDX343"></A>
4653 <DL>
4654 <DT><U>Variable:</U> int <B>rl_completion_quote_character</B>
4655 <DD>When Readline is completing quoted text, as delimited by one of the
4656 characters in <VAR>rl_completer_quote_characters</VAR>, it sets this variable
4657 to the quoting character found.
4658 This is set before any application-specific completion function is called.
4659 </DL>
4660 </P><P>
4661
4662 <A NAME="IDX344"></A>
4663 <DL>
4664 <DT><U>Variable:</U> int <B>rl_completion_suppress_quote</B>
4665 <DD>If non-zero, Readline does not append a matching quote character when
4666 performing completion on a quoted string.
4667 It is set to 0 before any application-specific completion function
4668 is called, and may only be changed within such a function.
4669 </DL>
4670 </P><P>
4671
4672 <A NAME="IDX345"></A>
4673 <DL>
4674 <DT><U>Variable:</U> int <B>rl_completion_found_quote</B>
4675 <DD>When Readline is completing quoted text, it sets this variable
4676 to a non-zero value if the word being completed contains or is delimited
4677 by any quoting characters, including backslashes.
4678 This is set before any application-specific completion function is called.
4679 </DL>
4680 </P><P>
4681
4682 <A NAME="IDX346"></A>
4683 <DL>
4684 <DT><U>Variable:</U> int <B>rl_completion_mark_symlink_dirs</B>
4685 <DD>If non-zero, a slash will be appended to completed filenames that are
4686 symbolic links to directory names, subject to the value of the
4687 user-settable <VAR>mark-directories</VAR> variable.
4688 This variable exists so that application-specific completion functions
4689 can override the user's global preference (set via the
4690 <VAR>mark-symlinked-directories</VAR> Readline variable) if appropriate.
4691 This variable is set to the user's preference before any
4692 application-specific completion function is called, so unless that
4693 function modifies the value, the user's preferences are honored.
4694 </DL>
4695 </P><P>
4696
4697 <A NAME="IDX347"></A>
4698 <DL>
4699 <DT><U>Variable:</U> int <B>rl_ignore_completion_duplicates</B>
4700 <DD>If non-zero, then duplicates in the matches are removed.
4701 The default is 1.
4702 </DL>
4703 </P><P>
4704
4705 <A NAME="IDX348"></A>
4706 <DL>
4707 <DT><U>Variable:</U> int <B>rl_filename_completion_desired</B>
4708 <DD>Non-zero means that the results of the matches are to be treated as
4709 filenames.  This is <EM>always</EM> zero when completion is attempted,
4710 and can only be changed
4711 within an application-specific completion function.  If it is set to a
4712 non-zero value by such a function, directory names have a slash appended
4713 and Readline attempts to quote completed filenames if they contain any
4714 characters in <CODE>rl_filename_quote_characters</CODE> and
4715 <CODE>rl_filename_quoting_desired</CODE> is set to a non-zero value.
4716 </DL>
4717 </P><P>
4718
4719 <A NAME="IDX349"></A>
4720 <DL>
4721 <DT><U>Variable:</U> int <B>rl_filename_quoting_desired</B>
4722 <DD>Non-zero means that the results of the matches are to be quoted using
4723 double quotes (or an application-specific quoting mechanism) if the
4724 completed filename contains any characters in
4725 <CODE>rl_filename_quote_chars</CODE>.  This is <EM>always</EM> non-zero
4726 when completion is attempted, and can only be changed within an
4727 application-specific completion function.
4728 The quoting is effected via a call to the function pointed to
4729 by <CODE>rl_filename_quoting_function</CODE>.
4730 </DL>
4731 </P><P>
4732
4733 <A NAME="IDX350"></A>
4734 <DL>
4735 <DT><U>Variable:</U> int <B>rl_attempted_completion_over</B>
4736 <DD>If an application-specific completion function assigned to
4737 <CODE>rl_attempted_completion_function</CODE> sets this variable to a non-zero
4738 value, Readline will not perform its default filename completion even
4739 if the application's completion function returns no matches.
4740 It should be set only by an application's completion function.
4741 </DL>
4742 </P><P>
4743
4744 <A NAME="IDX351"></A>
4745 <DL>
4746 <DT><U>Variable:</U> int <B>rl_completion_type</B>
4747 <DD>Set to a character describing the type of completion Readline is currently
4748 attempting; see the description of <CODE>rl_complete_internal()</CODE>
4749 (see section <A HREF="readline.html#SEC46">2.6.2 Completion Functions</A>) for the list of characters.
4750 This is set to the appropriate value before any application-specific
4751 completion function is called, allowing such functions to present
4752 the same interface as <CODE>rl_complete()</CODE>.
4753 </DL>
4754 </P><P>
4755
4756 <A NAME="IDX352"></A>
4757 <DL>
4758 <DT><U>Variable:</U> int <B>rl_inhibit_completion</B>
4759 <DD>If this variable is non-zero, completion is inhibited.  The completion
4760 character will be inserted as any other bound to <CODE>self-insert</CODE>.
4761 </DL>
4762 </P><P>
4763
4764 <A NAME="A Short Completion Example"></A>
4765 <HR SIZE="6">
4766 <A NAME="SEC48"></A>
4767 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4768 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC47"> &lt; </A>]</TD>
4769 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt; </A>]</TD>
4770 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
4771 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> Up </A>]</TD>
4772 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
4773 <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>
4774 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4775 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4776 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4777 </TR></TABLE>
4778 <H3> 2.6.4 A Short Completion Example </H3>
4779 <!--docid::SEC48::-->
4780 <P>
4781
4782 Here is a small application demonstrating the use of the GNU Readline
4783 library.  It is called <CODE>fileman</CODE>, and the source code resides in
4784 <TT>`examples/fileman.c'</TT>.  This sample application provides
4785 completion of command names, line editing features, and access to the
4786 history list.
4787 </P><P>
4788
4789 <TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>/* fileman.c -- A tiny application which demonstrates how to use the
4790    GNU Readline library.  This application interactively allows users
4791    to manipulate files and their modes. */
4792
4793 #include &#60;stdio.h&#62;
4794 #include &#60;sys/types.h&#62;
4795 #include &#60;sys/file.h&#62;
4796 #include &#60;sys/stat.h&#62;
4797 #include &#60;sys/errno.h&#62;
4798
4799 #include &#60;readline/readline.h&#62;
4800 #include &#60;readline/history.h&#62;
4801
4802 extern char *xmalloc ();
4803
4804 /* The names of functions that actually do the manipulation. */
4805 int com_list __P((char *));
4806 int com_view __P((char *));
4807 int com_rename __P((char *));
4808 int com_stat __P((char *));
4809 int com_pwd __P((char *));
4810 int com_delete __P((char *));
4811 int com_help __P((char *));
4812 int com_cd __P((char *));
4813 int com_quit __P((char *));
4814
4815 /* A structure which contains information on the commands this program
4816    can understand. */
4817
4818 typedef struct {
4819   char *name;                   /* User printable name of the function. */
4820   rl_icpfunc_t *func;           /* Function to call to do the job. */
4821   char *doc;                    /* Documentation for this function.  */
4822 } COMMAND;
4823
4824 COMMAND commands[] = {
4825   { "cd", com_cd, "Change to directory DIR" },
4826   { "delete", com_delete, "Delete FILE" },
4827   { "help", com_help, "Display this text" },
4828   { "?", com_help, "Synonym for `help'" },
4829   { "list", com_list, "List files in DIR" },
4830   { "ls", com_list, "Synonym for `list'" },
4831   { "pwd", com_pwd, "Print the current working directory" },
4832   { "quit", com_quit, "Quit using Fileman" },
4833   { "rename", com_rename, "Rename FILE to NEWNAME" },
4834   { "stat", com_stat, "Print out statistics on FILE" },
4835   { "view", com_view, "View the contents of FILE" },
4836   { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL }
4837 };
4838
4839 /* Forward declarations. */
4840 char *stripwhite ();
4841 COMMAND *find_command ();
4842
4843 /* The name of this program, as taken from argv[0]. */
4844 char *progname;
4845
4846 /* When non-zero, this means the user is done using this program. */
4847 int done;
4848
4849 char *
4850 dupstr (s)
4851      int s;
4852 {
4853   char *r;
4854
4855   r = xmalloc (strlen (s) + 1);
4856   strcpy (r, s);
4857   return (r);
4858 }
4859
4860 main (argc, argv)
4861      int argc;
4862      char **argv;
4863 {
4864   char *line, *s;
4865
4866   progname = argv[0];
4867
4868   initialize_readline ();       /* Bind our completer. */
4869
4870   /* Loop reading and executing lines until the user quits. */
4871   for ( ; done == 0; )
4872     {
4873       line = readline ("FileMan: ");
4874
4875       if (!line)
4876         break;
4877
4878       /* Remove leading and trailing whitespace from the line.
4879          Then, if there is anything left, add it to the history list
4880          and execute it. */
4881       s = stripwhite (line);
4882
4883       if (*s)
4884         {
4885           add_history (s);
4886           execute_line (s);
4887         }
4888
4889       free (line);
4890     }
4891   exit (0);
4892 }
4893
4894 /* Execute a command line. */
4895 int
4896 execute_line (line)
4897      char *line;
4898 {
4899   register int i;
4900   COMMAND *command;
4901   char *word;
4902
4903   /* Isolate the command word. */
4904   i = 0;
4905   while (line[i] &#38;&#38; whitespace (line[i]))
4906     i++;
4907   word = line + i;
4908
4909   while (line[i] &#38;&#38; !whitespace (line[i]))
4910     i++;
4911
4912   if (line[i])
4913     line[i++] = '\0';
4914
4915   command = find_command (word);
4916
4917   if (!command)
4918     {
4919       fprintf (stderr, "%s: No such command for FileMan.\n", word);
4920       return (-1);
4921     }
4922
4923   /* Get argument to command, if any. */
4924   while (whitespace (line[i]))
4925     i++;
4926
4927   word = line + i;
4928
4929   /* Call the function. */
4930   return ((*(command-&#62;func)) (word));
4931 }
4932
4933 /* Look up NAME as the name of a command, and return a pointer to that
4934    command.  Return a NULL pointer if NAME isn't a command name. */
4935 COMMAND *
4936 find_command (name)
4937      char *name;
4938 {
4939   register int i;
4940
4941   for (i = 0; commands[i].name; i++)
4942     if (strcmp (name, commands[i].name) == 0)
4943       return (&#38;commands[i]);
4944
4945   return ((COMMAND *)NULL);
4946 }
4947
4948 /* Strip whitespace from the start and end of STRING.  Return a pointer
4949    into STRING. */
4950 char *
4951 stripwhite (string)
4952      char *string;
4953 {
4954   register char *s, *t;
4955
4956   for (s = string; whitespace (*s); s++)
4957     ;
4958     
4959   if (*s == 0)
4960     return (s);
4961
4962   t = s + strlen (s) - 1;
4963   while (t &#62; s &#38;&#38; whitespace (*t))
4964     t--;
4965   *++t = '\0';
4966
4967   return s;
4968 }
4969
4970 /* **************************************************************** */
4971 /*                                                                  */
4972 /*                  Interface to Readline Completion                */
4973 /*                                                                  */
4974 /* **************************************************************** */
4975
4976 char *command_generator __P((const char *, int));
4977 char **fileman_completion __P((const char *, int, int));
4978
4979 /* Tell the GNU Readline library how to complete.  We want to try to
4980    complete on command names if this is the first word in the line, or
4981    on filenames if not. */
4982 initialize_readline ()
4983 {
4984   /* Allow conditional parsing of the ~/.inputrc file. */
4985   rl_readline_name = "FileMan";
4986
4987   /* Tell the completer that we want a crack first. */
4988   rl_attempted_completion_function = fileman_completion;
4989 }
4990
4991 /* Attempt to complete on the contents of TEXT.  START and END
4992    bound the region of rl_line_buffer that contains the word to
4993    complete.  TEXT is the word to complete.  We can use the entire
4994    contents of rl_line_buffer in case we want to do some simple
4995    parsing.  Returnthe array of matches, or NULL if there aren't any. */
4996 char **
4997 fileman_completion (text, start, end)
4998      const char *text;
4999      int start, end;
5000 {
5001   char **matches;
5002
5003   matches = (char **)NULL;
5004
5005   /* If this word is at the start of the line, then it is a command
5006      to complete.  Otherwise it is the name of a file in the current
5007      directory. */
5008   if (start == 0)
5009     matches = rl_completion_matches (text, command_generator);
5010
5011   return (matches);
5012 }
5013
5014 /* Generator function for command completion.  STATE lets us
5015    know whether to start from scratch; without any state
5016    (i.e. STATE == 0), then we start at the top of the list. */
5017 char *
5018 command_generator (text, state)
5019      const char *text;
5020      int state;
5021 {
5022   static int list_index, len;
5023   char *name;
5024
5025   /* If this is a new word to complete, initialize now.  This
5026      includes saving the length of TEXT for efficiency, and
5027      initializing the index variable to 0. */
5028   if (!state)
5029     {
5030       list_index = 0;
5031       len = strlen (text);
5032     }
5033
5034   /* Return the next name which partially matches from the
5035      command list. */
5036   while (name = commands[list_index].name)
5037     {
5038       list_index++;
5039
5040       if (strncmp (name, text, len) == 0)
5041         return (dupstr(name));
5042     }
5043
5044   /* If no names matched, then return NULL. */
5045   return ((char *)NULL);
5046 }
5047
5048 /* **************************************************************** */
5049 /*                                                                  */
5050 /*                       FileMan Commands                           */
5051 /*                                                                  */
5052 /* **************************************************************** */
5053
5054 /* String to pass to system ().  This is for the LIST, VIEW and RENAME
5055    commands. */
5056 static char syscom[1024];
5057
5058 /* List the file(s) named in arg. */
5059 com_list (arg)
5060      char *arg;
5061 {
5062   if (!arg)
5063     arg = "";
5064
5065   sprintf (syscom, "ls -FClg %s", arg);
5066   return (system (syscom));
5067 }
5068
5069 com_view (arg)
5070      char *arg;
5071 {
5072   if (!valid_argument ("view", arg))
5073     return 1;
5074
5075   sprintf (syscom, "more %s", arg);
5076   return (system (syscom));
5077 }
5078
5079 com_rename (arg)
5080      char *arg;
5081 {
5082   too_dangerous ("rename");
5083   return (1);
5084 }
5085
5086 com_stat (arg)
5087      char *arg;
5088 {
5089   struct stat finfo;
5090
5091   if (!valid_argument ("stat", arg))
5092     return (1);
5093
5094   if (stat (arg, &#38;finfo) == -1)
5095     {
5096       perror (arg);
5097       return (1);
5098     }
5099
5100   printf ("Statistics for `%s':\n", arg);
5101
5102   printf ("%s has %d link%s, and is %d byte%s in length.\n", arg,
5103           finfo.st_nlink,
5104           (finfo.st_nlink == 1) ? "" : "s",
5105           finfo.st_size,
5106           (finfo.st_size == 1) ? "" : "s");
5107   printf ("Inode Last Change at: %s", ctime (&#38;finfo.st_ctime));
5108   printf ("      Last access at: %s", ctime (&#38;finfo.st_atime));
5109   printf ("    Last modified at: %s", ctime (&#38;finfo.st_mtime));
5110   return (0);
5111 }
5112
5113 com_delete (arg)
5114      char *arg;
5115 {
5116   too_dangerous ("delete");
5117   return (1);
5118 }
5119
5120 /* Print out help for ARG, or for all of the commands if ARG is
5121    not present. */
5122 com_help (arg)
5123      char *arg;
5124 {
5125   register int i;
5126   int printed = 0;
5127
5128   for (i = 0; commands[i].name; i++)
5129     {
5130       if (!*arg || (strcmp (arg, commands[i].name) == 0))
5131         {
5132           printf ("%s\t\t%s.\n", commands[i].name, commands[i].doc);
5133           printed++;
5134         }
5135     }
5136
5137   if (!printed)
5138     {
5139       printf ("No commands match `%s'.  Possibilties are:\n", arg);
5140
5141       for (i = 0; commands[i].name; i++)
5142         {
5143           /* Print in six columns. */
5144           if (printed == 6)
5145             {
5146               printed = 0;
5147               printf ("\n");
5148             }
5149
5150           printf ("%s\t", commands[i].name);
5151           printed++;
5152         }
5153
5154       if (printed)
5155         printf ("\n");
5156     }
5157   return (0);
5158 }
5159
5160 /* Change to the directory ARG. */
5161 com_cd (arg)
5162      char *arg;
5163 {
5164   if (chdir (arg) == -1)
5165     {
5166       perror (arg);
5167       return 1;
5168     }
5169
5170   com_pwd ("");
5171   return (0);
5172 }
5173
5174 /* Print out the current working directory. */
5175 com_pwd (ignore)
5176      char *ignore;
5177 {
5178   char dir[1024], *s;
5179
5180   s = getcwd (dir, sizeof(dir) - 1);
5181   if (s == 0)
5182     {
5183       printf ("Error getting pwd: %s\n", dir);
5184       return 1;
5185     }
5186
5187   printf ("Current directory is %s\n", dir);
5188   return 0;
5189 }
5190
5191 /* The user wishes to quit using this program.  Just set DONE
5192    non-zero. */
5193 com_quit (arg)
5194      char *arg;
5195 {
5196   done = 1;
5197   return (0);
5198 }
5199
5200 /* Function which tells you that you can't do this. */
5201 too_dangerous (caller)
5202      char *caller;
5203 {
5204   fprintf (stderr,
5205            "%s: Too dangerous for me to distribute.\n",
5206            caller);
5207   fprintf (stderr, "Write it yourself.\n");
5208 }
5209
5210 /* Return non-zero if ARG is a valid argument for CALLER,
5211    else print an error message and return zero. */
5212 int
5213 valid_argument (caller, arg)
5214      char *caller, *arg;
5215 {
5216   if (!arg || !*arg)
5217     {
5218       fprintf (stderr, "%s: Argument required.\n", caller);
5219       return (0);
5220     }
5221
5222   return (1);
5223 }
5224 </FONT></pre></td></tr></table></P><P>
5225
5226 <A NAME="Copying This Manual"></A>
5227 <HR SIZE="6">
5228 <A NAME="SEC49"></A>
5229 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5230 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC48"> &lt; </A>]</TD>
5231 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> &gt; </A>]</TD>
5232 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> &lt;&lt; </A>]</TD>
5233 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> Up </A>]</TD>
5234 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
5235 <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>
5236 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5237 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5238 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5239 </TR></TABLE>
5240 <H1> A. Copying This Manual </H1>
5241 <!--docid::SEC49::-->
5242 <P>
5243
5244 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> 
5245 <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>
5246 </TABLE></BLOCKQUOTE>
5247 <P>
5248
5249 <A NAME="GNU Free Documentation License"></A>
5250 <HR SIZE="6">
5251 <A NAME="SEC50"></A>
5252 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5253 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &lt; </A>]</TD>
5254 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC51"> &gt; </A>]</TD>
5255 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &lt;&lt; </A>]</TD>
5256 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> Up </A>]</TD>
5257 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
5258 <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>
5259 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5260 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5261 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5262 </TR></TABLE>
5263 <H2> A.1 GNU Free Documentation License </H2>
5264 <!--docid::SEC50::-->
5265 <P>
5266
5267 <A NAME="IDX353"></A>
5268 <center>
5269  Version 1.2, November 2002
5270 </center>
5271 </P><P>
5272
5273 <TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
5274 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA
5275
5276 Everyone is permitted to copy and distribute verbatim copies
5277 of this license document, but changing it is not allowed.
5278 </pre></td></tr></table></P><P>
5279
5280 <OL>
5281 <LI>
5282 PREAMBLE
5283 <P>
5284
5285 The purpose of this License is to make a manual, textbook, or other
5286 functional and useful document <EM>free</EM> in the sense of freedom: to
5287 assure everyone the effective freedom to copy and redistribute it,
5288 with or without modifying it, either commercially or noncommercially.
5289 Secondarily, this License preserves for the author and publisher a way
5290 to get credit for their work, while not being considered responsible
5291 for modifications made by others.
5292 </P><P>
5293
5294 This License is a kind of "copyleft", which means that derivative
5295 works of the document must themselves be free in the same sense.  It
5296 complements the GNU General Public License, which is a copyleft
5297 license designed for free software.
5298 </P><P>
5299
5300 We have designed this License in order to use it for manuals for free
5301 software, because free software needs free documentation: a free
5302 program should come with manuals providing the same freedoms that the
5303 software does.  But this License is not limited to software manuals;
5304 it can be used for any textual work, regardless of subject matter or
5305 whether it is published as a printed book.  We recommend this License
5306 principally for works whose purpose is instruction or reference.
5307 </P><P>
5308
5309 <LI>
5310 APPLICABILITY AND DEFINITIONS
5311 <P>
5312
5313 This License applies to any manual or other work, in any medium, that
5314 contains a notice placed by the copyright holder saying it can be
5315 distributed under the terms of this License.  Such a notice grants a
5316 world-wide, royalty-free license, unlimited in duration, to use that
5317 work under the conditions stated herein.  The "Document", below,
5318 refers to any such manual or work.  Any member of the public is a
5319 licensee, and is addressed as "you".  You accept the license if you
5320 copy, modify or distribute the work in a way requiring permission
5321 under copyright law.
5322 </P><P>
5323
5324 A "Modified Version" of the Document means any work containing the
5325 Document or a portion of it, either copied verbatim, or with
5326 modifications and/or translated into another language.
5327 </P><P>
5328
5329 A "Secondary Section" is a named appendix or a front-matter section
5330 of the Document that deals exclusively with the relationship of the
5331 publishers or authors of the Document to the Document's overall
5332 subject (or to related matters) and contains nothing that could fall
5333 directly within that overall subject.  (Thus, if the Document is in
5334 part a textbook of mathematics, a Secondary Section may not explain
5335 any mathematics.)  The relationship could be a matter of historical
5336 connection with the subject or with related matters, or of legal,
5337 commercial, philosophical, ethical or political position regarding
5338 them.
5339 </P><P>
5340
5341 The "Invariant Sections" are certain Secondary Sections whose titles
5342 are designated, as being those of Invariant Sections, in the notice
5343 that says that the Document is released under this License.  If a
5344 section does not fit the above definition of Secondary then it is not
5345 allowed to be designated as Invariant.  The Document may contain zero
5346 Invariant Sections.  If the Document does not identify any Invariant
5347 Sections then there are none.
5348 </P><P>
5349
5350 The "Cover Texts" are certain short passages of text that are listed,
5351 as Front-Cover Texts or Back-Cover Texts, in the notice that says that
5352 the Document is released under this License.  A Front-Cover Text may
5353 be at most 5 words, and a Back-Cover Text may be at most 25 words.
5354 </P><P>
5355
5356 A "Transparent" copy of the Document means a machine-readable copy,
5357 represented in a format whose specification is available to the
5358 general public, that is suitable for revising the document
5359 straightforwardly with generic text editors or (for images composed of
5360 pixels) generic paint programs or (for drawings) some widely available
5361 drawing editor, and that is suitable for input to text formatters or
5362 for automatic translation to a variety of formats suitable for input
5363 to text formatters.  A copy made in an otherwise Transparent file
5364 format whose markup, or absence of markup, has been arranged to thwart
5365 or discourage subsequent modification by readers is not Transparent.
5366 An image format is not Transparent if used for any substantial amount
5367 of text.  A copy that is not "Transparent" is called "Opaque".
5368 </P><P>
5369
5370 Examples of suitable formats for Transparent copies include plain
5371 ASCII without markup, Texinfo input format, LaTeX input
5372 format, <FONT SIZE="-1">SGML</FONT> or <FONT SIZE="-1">XML</FONT> using a publicly available
5373 <FONT SIZE="-1">DTD</FONT>, and standard-conforming simple <FONT SIZE="-1">HTML</FONT>,
5374 PostScript or <FONT SIZE="-1">PDF</FONT> designed for human modification.  Examples
5375 of transparent image formats include <FONT SIZE="-1">PNG</FONT>, <FONT SIZE="-1">XCF</FONT> and
5376 <FONT SIZE="-1">JPG</FONT>.  Opaque formats include proprietary formats that can be
5377 read and edited only by proprietary word processors, <FONT SIZE="-1">SGML</FONT> or
5378 <FONT SIZE="-1">XML</FONT> for which the <FONT SIZE="-1">DTD</FONT> and/or processing tools are
5379 not generally available, and the machine-generated <FONT SIZE="-1">HTML</FONT>,
5380 PostScript or <FONT SIZE="-1">PDF</FONT> produced by some word processors for
5381 output purposes only.
5382 </P><P>
5383
5384 The "Title Page" means, for a printed book, the title page itself,
5385 plus such following pages as are needed to hold, legibly, the material
5386 this License requires to appear in the title page.  For works in
5387 formats which do not have any title page as such, "Title Page" means
5388 the text near the most prominent appearance of the work's title,
5389 preceding the beginning of the body of the text.
5390 </P><P>
5391
5392 A section "Entitled XYZ" means a named subunit of the Document whose
5393 title either is precisely XYZ or contains XYZ in parentheses following
5394 text that translates XYZ in another language.  (Here XYZ stands for a
5395 specific section name mentioned below, such as "Acknowledgements",
5396 "Dedications", "Endorsements", or "History".)  To "Preserve the Title"
5397 of such a section when you modify the Document means that it remains a
5398 section "Entitled XYZ" according to this definition.
5399 </P><P>
5400
5401 The Document may include Warranty Disclaimers next to the notice which
5402 states that this License applies to the Document.  These Warranty
5403 Disclaimers are considered to be included by reference in this
5404 License, but only as regards disclaiming warranties: any other
5405 implication that these Warranty Disclaimers may have is void and has
5406 no effect on the meaning of this License.
5407 </P><P>
5408
5409 <LI>
5410 VERBATIM COPYING
5411 <P>
5412
5413 You may copy and distribute the Document in any medium, either
5414 commercially or noncommercially, provided that this License, the
5415 copyright notices, and the license notice saying this License applies
5416 to the Document are reproduced in all copies, and that you add no other
5417 conditions whatsoever to those of this License.  You may not use
5418 technical measures to obstruct or control the reading or further
5419 copying of the copies you make or distribute.  However, you may accept
5420 compensation in exchange for copies.  If you distribute a large enough
5421 number of copies you must also follow the conditions in section 3.
5422 </P><P>
5423
5424 You may also lend copies, under the same conditions stated above, and
5425 you may publicly display copies.
5426 </P><P>
5427
5428 <LI>
5429 COPYING IN QUANTITY
5430 <P>
5431
5432 If you publish printed copies (or copies in media that commonly have
5433 printed covers) of the Document, numbering more than 100, and the
5434 Document's license notice requires Cover Texts, you must enclose the
5435 copies in covers that carry, clearly and legibly, all these Cover
5436 Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
5437 the back cover.  Both covers must also clearly and legibly identify
5438 you as the publisher of these copies.  The front cover must present
5439 the full title with all words of the title equally prominent and
5440 visible.  You may add other material on the covers in addition.
5441 Copying with changes limited to the covers, as long as they preserve
5442 the title of the Document and satisfy these conditions, can be treated
5443 as verbatim copying in other respects.
5444 </P><P>
5445
5446 If the required texts for either cover are too voluminous to fit
5447 legibly, you should put the first ones listed (as many as fit
5448 reasonably) on the actual cover, and continue the rest onto adjacent
5449 pages.
5450 </P><P>
5451
5452 If you publish or distribute Opaque copies of the Document numbering
5453 more than 100, you must either include a machine-readable Transparent
5454 copy along with each Opaque copy, or state in or with each Opaque copy
5455 a computer-network location from which the general network-using
5456 public has access to download using public-standard network protocols
5457 a complete Transparent copy of the Document, free of added material.
5458 If you use the latter option, you must take reasonably prudent steps,
5459 when you begin distribution of Opaque copies in quantity, to ensure
5460 that this Transparent copy will remain thus accessible at the stated
5461 location until at least one year after the last time you distribute an
5462 Opaque copy (directly or through your agents or retailers) of that
5463 edition to the public.
5464 </P><P>
5465
5466 It is requested, but not required, that you contact the authors of the
5467 Document well before redistributing any large number of copies, to give
5468 them a chance to provide you with an updated version of the Document.
5469 </P><P>
5470
5471 <LI>
5472 MODIFICATIONS
5473 <P>
5474
5475 You may copy and distribute a Modified Version of the Document under
5476 the conditions of sections 2 and 3 above, provided that you release
5477 the Modified Version under precisely this License, with the Modified
5478 Version filling the role of the Document, thus licensing distribution
5479 and modification of the Modified Version to whoever possesses a copy
5480 of it.  In addition, you must do these things in the Modified Version:
5481 </P><P>
5482
5483 <OL>
5484 <LI>
5485 Use in the Title Page (and on the covers, if any) a title distinct
5486 from that of the Document, and from those of previous versions
5487 (which should, if there were any, be listed in the History section
5488 of the Document).  You may use the same title as a previous version
5489 if the original publisher of that version gives permission.
5490 <P>
5491
5492 <LI>
5493 List on the Title Page, as authors, one or more persons or entities
5494 responsible for authorship of the modifications in the Modified
5495 Version, together with at least five of the principal authors of the
5496 Document (all of its principal authors, if it has fewer than five),
5497 unless they release you from this requirement.
5498 <P>
5499
5500 <LI>
5501 State on the Title page the name of the publisher of the
5502 Modified Version, as the publisher.
5503 <P>
5504
5505 <LI>
5506 Preserve all the copyright notices of the Document.
5507 <P>
5508
5509 <LI>
5510 Add an appropriate copyright notice for your modifications
5511 adjacent to the other copyright notices.
5512 <P>
5513
5514 <LI>
5515 Include, immediately after the copyright notices, a license notice
5516 giving the public permission to use the Modified Version under the
5517 terms of this License, in the form shown in the Addendum below.
5518 <P>
5519
5520 <LI>
5521 Preserve in that license notice the full lists of Invariant Sections
5522 and required Cover Texts given in the Document's license notice.
5523 <P>
5524
5525 <LI>
5526 Include an unaltered copy of this License.
5527 <P>
5528
5529 <LI>
5530 Preserve the section Entitled "History", Preserve its Title, and add
5531 to it an item stating at least the title, year, new authors, and
5532 publisher of the Modified Version as given on the Title Page.  If
5533 there is no section Entitled "History" in the Document, create one
5534 stating the title, year, authors, and publisher of the Document as
5535 given on its Title Page, then add an item describing the Modified
5536 Version as stated in the previous sentence.
5537 <P>
5538
5539 <LI>
5540 Preserve the network location, if any, given in the Document for
5541 public access to a Transparent copy of the Document, and likewise
5542 the network locations given in the Document for previous versions
5543 it was based on.  These may be placed in the "History" section.
5544 You may omit a network location for a work that was published at
5545 least four years before the Document itself, or if the original
5546 publisher of the version it refers to gives permission.
5547 <P>
5548
5549 <LI>
5550 For any section Entitled "Acknowledgements" or "Dedications", Preserve
5551 the Title of the section, and preserve in the section all the
5552 substance and tone of each of the contributor acknowledgements and/or
5553 dedications given therein.
5554 <P>
5555
5556 <LI>
5557 Preserve all the Invariant Sections of the Document,
5558 unaltered in their text and in their titles.  Section numbers
5559 or the equivalent are not considered part of the section titles.
5560 <P>
5561
5562 <LI>
5563 Delete any section Entitled "Endorsements".  Such a section
5564 may not be included in the Modified Version.
5565 <P>
5566
5567 <LI>
5568 Do not retitle any existing section to be Entitled "Endorsements" or
5569 to conflict in title with any Invariant Section.
5570 <P>
5571
5572 <LI>
5573 Preserve any Warranty Disclaimers.
5574 </OL>
5575 <P>
5576
5577 If the Modified Version includes new front-matter sections or
5578 appendices that qualify as Secondary Sections and contain no material
5579 copied from the Document, you may at your option designate some or all
5580 of these sections as invariant.  To do this, add their titles to the
5581 list of Invariant Sections in the Modified Version's license notice.
5582 These titles must be distinct from any other section titles.
5583 </P><P>
5584
5585 You may add a section Entitled "Endorsements", provided it contains
5586 nothing but endorsements of your Modified Version by various
5587 parties--for example, statements of peer review or that the text has
5588 been approved by an organization as the authoritative definition of a
5589 standard.
5590 </P><P>
5591
5592 You may add a passage of up to five words as a Front-Cover Text, and a
5593 passage of up to 25 words as a Back-Cover Text, to the end of the list
5594 of Cover Texts in the Modified Version.  Only one passage of
5595 Front-Cover Text and one of Back-Cover Text may be added by (or
5596 through arrangements made by) any one entity.  If the Document already
5597 includes a cover text for the same cover, previously added by you or
5598 by arrangement made by the same entity you are acting on behalf of,
5599 you may not add another; but you may replace the old one, on explicit
5600 permission from the previous publisher that added the old one.
5601 </P><P>
5602
5603 The author(s) and publisher(s) of the Document do not by this License
5604 give permission to use their names for publicity for or to assert or
5605 imply endorsement of any Modified Version.
5606 </P><P>
5607
5608 <LI>
5609 COMBINING DOCUMENTS
5610 <P>
5611
5612 You may combine the Document with other documents released under this
5613 License, under the terms defined in section 4 above for modified
5614 versions, provided that you include in the combination all of the
5615 Invariant Sections of all of the original documents, unmodified, and
5616 list them all as Invariant Sections of your combined work in its
5617 license notice, and that you preserve all their Warranty Disclaimers.
5618 </P><P>
5619
5620 The combined work need only contain one copy of this License, and
5621 multiple identical Invariant Sections may be replaced with a single
5622 copy.  If there are multiple Invariant Sections with the same name but
5623 different contents, make the title of each such section unique by
5624 adding at the end of it, in parentheses, the name of the original
5625 author or publisher of that section if known, or else a unique number.
5626 Make the same adjustment to the section titles in the list of
5627 Invariant Sections in the license notice of the combined work.
5628 </P><P>
5629
5630 In the combination, you must combine any sections Entitled "History"
5631 in the various original documents, forming one section Entitled
5632 "History"; likewise combine any sections Entitled "Acknowledgements",
5633 and any sections Entitled "Dedications".  You must delete all
5634 sections Entitled "Endorsements."
5635 </P><P>
5636
5637 <LI>
5638 COLLECTIONS OF DOCUMENTS
5639 <P>
5640
5641 You may make a collection consisting of the Document and other documents
5642 released under this License, and replace the individual copies of this
5643 License in the various documents with a single copy that is included in
5644 the collection, provided that you follow the rules of this License for
5645 verbatim copying of each of the documents in all other respects.
5646 </P><P>
5647
5648 You may extract a single document from such a collection, and distribute
5649 it individually under this License, provided you insert a copy of this
5650 License into the extracted document, and follow this License in all
5651 other respects regarding verbatim copying of that document.
5652 </P><P>
5653
5654 <LI>
5655 AGGREGATION WITH INDEPENDENT WORKS
5656 <P>
5657
5658 A compilation of the Document or its derivatives with other separate
5659 and independent documents or works, in or on a volume of a storage or
5660 distribution medium, is called an "aggregate" if the copyright
5661 resulting from the compilation is not used to limit the legal rights
5662 of the compilation's users beyond what the individual works permit.
5663 When the Document is included an aggregate, this License does not
5664 apply to the other works in the aggregate which are not themselves
5665 derivative works of the Document.
5666 </P><P>
5667
5668 If the Cover Text requirement of section 3 is applicable to these
5669 copies of the Document, then if the Document is less than one half of
5670 the entire aggregate, the Document's Cover Texts may be placed on
5671 covers that bracket the Document within the aggregate, or the
5672 electronic equivalent of covers if the Document is in electronic form.
5673 Otherwise they must appear on printed covers that bracket the whole
5674 aggregate.
5675 </P><P>
5676
5677 <LI>
5678 TRANSLATION
5679 <P>
5680
5681 Translation is considered a kind of modification, so you may
5682 distribute translations of the Document under the terms of section 4.
5683 Replacing Invariant Sections with translations requires special
5684 permission from their copyright holders, but you may include
5685 translations of some or all Invariant Sections in addition to the
5686 original versions of these Invariant Sections.  You may include a
5687 translation of this License, and all the license notices in the
5688 Document, and any Warranty Disclaimers, provided that you also include
5689 the original English version of this License and the original versions
5690 of those notices and disclaimers.  In case of a disagreement between
5691 the translation and the original version of this License or a notice
5692 or disclaimer, the original version will prevail.
5693 </P><P>
5694
5695 If a section in the Document is Entitled "Acknowledgements",
5696 "Dedications", or "History", the requirement (section 4) to Preserve
5697 its Title (section 1) will typically require changing the actual
5698 title.
5699 </P><P>
5700
5701 <LI>
5702 TERMINATION
5703 <P>
5704
5705 You may not copy, modify, sublicense, or distribute the Document except
5706 as expressly provided for under this License.  Any other attempt to
5707 copy, modify, sublicense or distribute the Document is void, and will
5708 automatically terminate your rights under this License.  However,
5709 parties who have received copies, or rights, from you under this
5710 License will not have their licenses terminated so long as such
5711 parties remain in full compliance.
5712 </P><P>
5713
5714 <LI>
5715 FUTURE REVISIONS OF THIS LICENSE
5716 <P>
5717
5718 The Free Software Foundation may publish new, revised versions
5719 of the GNU Free Documentation License from time to time.  Such new
5720 versions will be similar in spirit to the present version, but may
5721 differ in detail to address new problems or concerns.  See
5722 <A HREF="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</A>.
5723 </P><P>
5724
5725 Each version of the License is given a distinguishing version number.
5726 If the Document specifies that a particular numbered version of this
5727 License "or any later version" applies to it, you have the option of
5728 following the terms and conditions either of that specified version or
5729 of any later version that has been published (not as a draft) by the
5730 Free Software Foundation.  If the Document does not specify a version
5731 number of this License, you may choose any version ever published (not
5732 as a draft) by the Free Software Foundation.
5733 </OL>
5734 <P>
5735
5736 <HR SIZE="6">
5737 <A NAME="SEC51"></A>
5738 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5739 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> &lt; </A>]</TD>
5740 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52"> &gt; </A>]</TD>
5741 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &lt;&lt; </A>]</TD>
5742 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> Up </A>]</TD>
5743 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
5744 <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>
5745 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5746 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5747 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5748 </TR></TABLE>
5749 <H3> A.1.1 ADDENDUM: How to use this License for your documents </H3>
5750 <!--docid::SEC51::-->
5751 <P>
5752
5753 To use this License in a document you have written, include a copy of
5754 the License in the document and put the following copyright and
5755 license notices just after the title page:
5756 </P><P>
5757
5758 <TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>  Copyright (C)  <VAR>year</VAR>  <VAR>your name</VAR>.
5759   Permission is granted to copy, distribute and/or modify this document
5760   under the terms of the GNU Free Documentation License, Version 1.2
5761   or any later version published by the Free Software Foundation;
5762   with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
5763   A copy of the license is included in the section entitled ``GNU
5764   Free Documentation License''.
5765 </FONT></pre></td></tr></table></P><P>
5766
5767 If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
5768 replace the "with...Texts." line with this:
5769 </P><P>
5770
5771 <TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>    with the Invariant Sections being <VAR>list their titles</VAR>, with
5772     the Front-Cover Texts being <VAR>list</VAR>, and with the Back-Cover Texts
5773     being <VAR>list</VAR>.
5774 </FONT></pre></td></tr></table></P><P>
5775
5776 If you have Invariant Sections without Cover Texts, or some other
5777 combination of the three, merge those two alternatives to suit the
5778 situation.
5779 </P><P>
5780
5781 If your document contains nontrivial examples of program code, we
5782 recommend releasing these examples in parallel under your choice of
5783 free software license, such as the GNU General Public License,
5784 to permit their use in free software.
5785 </P><P>
5786
5787 <A NAME="Concept Index"></A>
5788 <HR SIZE="6">
5789 <A NAME="SEC52"></A>
5790 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5791 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC51"> &lt; </A>]</TD>
5792 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC53"> &gt; </A>]</TD>
5793 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
5794 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> Up </A>]</TD>
5795 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
5796 <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>
5797 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5798 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5799 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5800 </TR></TABLE>
5801 <H1> Concept Index </H1>
5802 <!--docid::SEC52::-->
5803 <table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="readline.html#cp_A" style="text-decoration:none"><b>A</b></A>
5804  &nbsp; 
5805 <A HREF="readline.html#cp_C" style="text-decoration:none"><b>C</b></A>
5806  &nbsp; 
5807 <A HREF="readline.html#cp_E" style="text-decoration:none"><b>E</b></A>
5808  &nbsp; 
5809 <A HREF="readline.html#cp_F" style="text-decoration:none"><b>F</b></A>
5810  &nbsp; 
5811 <A HREF="readline.html#cp_I" style="text-decoration:none"><b>I</b></A>
5812  &nbsp; 
5813 <A HREF="readline.html#cp_K" style="text-decoration:none"><b>K</b></A>
5814  &nbsp; 
5815 <A HREF="readline.html#cp_N" style="text-decoration:none"><b>N</b></A>
5816  &nbsp; 
5817 <A HREF="readline.html#cp_R" style="text-decoration:none"><b>R</b></A>
5818  &nbsp; 
5819 <A HREF="readline.html#cp_V" style="text-decoration:none"><b>V</b></A>
5820  &nbsp; 
5821 <A HREF="readline.html#cp_Y" style="text-decoration:none"><b>Y</b></A>
5822  &nbsp; 
5823 </td></tr></table><br><P></P>
5824 <TABLE border=0>
5825 <TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
5826 <TR><TD COLSPAN=3> <HR></TD></TR>
5827 <TR><TH><A NAME="cp_A"></A>A</TH><TD></TD><TD></TD></TR>
5828 <TR><TD></TD><TD valign=top><A HREF="readline.html#SEC44">application-specific completion functions</A></TD><TD valign=top><A HREF="rlman.html#SEC44">2.6 Custom Completers</A></TD></TR>
5829 <TR><TD COLSPAN=3> <HR></TD></TR>
5830 <TR><TH><A NAME="cp_C"></A>C</TH><TD></TD><TD></TD></TR>
5831 <TR><TD></TD><TD valign=top><A HREF="readline.html#SEC4">command editing</A></TD><TD valign=top><A HREF="rlman.html#SEC4">1.2.1 Readline Bare Essentials</A></TD></TR>
5832 <TR><TD COLSPAN=3> <HR></TD></TR>
5833 <TR><TH><A NAME="cp_E"></A>E</TH><TD></TD><TD></TD></TR>
5834 <TR><TD></TD><TD valign=top><A HREF="readline.html#SEC4">editing command lines</A></TD><TD valign=top><A HREF="rlman.html#SEC4">1.2.1 Readline Bare Essentials</A></TD></TR>
5835 <TR><TD COLSPAN=3> <HR></TD></TR>
5836 <TR><TH><A NAME="cp_F"></A>F</TH><TD></TD><TD></TD></TR>
5837 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX353">FDL, GNU Free Documentation License</A></TD><TD valign=top><A HREF="rlman.html#SEC50">A.1 GNU Free Documentation License</A></TD></TR>
5838 <TR><TD COLSPAN=3> <HR></TD></TR>
5839 <TR><TH><A NAME="cp_I"></A>I</TH><TD></TD><TD></TD></TR>
5840 <TR><TD></TD><TD valign=top><A HREF="readline.html#SEC9">initialization file, readline</A></TD><TD valign=top><A HREF="rlman.html#SEC9">1.3 Readline Init File</A></TD></TR>
5841 <TR><TD></TD><TD valign=top><A HREF="readline.html#SEC3">interaction, readline</A></TD><TD valign=top><A HREF="rlman.html#SEC3">1.2 Readline Interaction</A></TD></TR>
5842 <TR><TD COLSPAN=3> <HR></TD></TR>
5843 <TR><TH><A NAME="cp_K"></A>K</TH><TD></TD><TD></TD></TR>
5844 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX3">kill ring</A></TD><TD valign=top><A HREF="rlman.html#SEC6">1.2.3 Readline Killing Commands</A></TD></TR>
5845 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX1">killing text</A></TD><TD valign=top><A HREF="rlman.html#SEC6">1.2.3 Readline Killing Commands</A></TD></TR>
5846 <TR><TD COLSPAN=3> <HR></TD></TR>
5847 <TR><TH><A NAME="cp_N"></A>N</TH><TD></TD><TD></TD></TR>
5848 <TR><TD></TD><TD valign=top><A HREF="readline.html#SEC4">notation, readline</A></TD><TD valign=top><A HREF="rlman.html#SEC4">1.2.1 Readline Bare Essentials</A></TD></TR>
5849 <TR><TD COLSPAN=3> <HR></TD></TR>
5850 <TR><TH><A NAME="cp_R"></A>R</TH><TD></TD><TD></TD></TR>
5851 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX179">readline, function</A></TD><TD valign=top><A HREF="rlman.html#SEC24">2.1 Basic Behavior</A></TD></TR>
5852 <TR><TD COLSPAN=3> <HR></TD></TR>
5853 <TR><TH><A NAME="cp_V"></A>V</TH><TD></TD><TD></TD></TR>
5854 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX4">variables, readline</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5855 <TR><TD COLSPAN=3> <HR></TD></TR>
5856 <TR><TH><A NAME="cp_Y"></A>Y</TH><TD></TD><TD></TD></TR>
5857 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX2">yanking text</A></TD><TD valign=top><A HREF="rlman.html#SEC6">1.2.3 Readline Killing Commands</A></TD></TR>
5858 <TR><TD COLSPAN=3> <HR></TD></TR>
5859 </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>
5860  &nbsp; 
5861 <A HREF="readline.html#cp_C" style="text-decoration:none"><b>C</b></A>
5862  &nbsp; 
5863 <A HREF="readline.html#cp_E" style="text-decoration:none"><b>E</b></A>
5864  &nbsp; 
5865 <A HREF="readline.html#cp_F" style="text-decoration:none"><b>F</b></A>
5866  &nbsp; 
5867 <A HREF="readline.html#cp_I" style="text-decoration:none"><b>I</b></A>
5868  &nbsp; 
5869 <A HREF="readline.html#cp_K" style="text-decoration:none"><b>K</b></A>
5870  &nbsp; 
5871 <A HREF="readline.html#cp_N" style="text-decoration:none"><b>N</b></A>
5872  &nbsp; 
5873 <A HREF="readline.html#cp_R" style="text-decoration:none"><b>R</b></A>
5874  &nbsp; 
5875 <A HREF="readline.html#cp_V" style="text-decoration:none"><b>V</b></A>
5876  &nbsp; 
5877 <A HREF="readline.html#cp_Y" style="text-decoration:none"><b>Y</b></A>
5878  &nbsp; 
5879 </td></tr></table><br><P>
5880
5881 <A NAME="Function and Variable Index"></A>
5882 <HR SIZE="6">
5883 <A NAME="SEC53"></A>
5884 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5885 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52"> &lt; </A>]</TD>
5886 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt; ]</TD>
5887 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
5888 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> Up </A>]</TD>
5889 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
5890 <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>
5891 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5892 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5893 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5894 </TR></TABLE>
5895 <H1> Function and Variable Index </H1>
5896 <!--docid::SEC53::-->
5897 <table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="readline.html#fn__" style="text-decoration:none"><b>_</b></A>
5898  &nbsp; 
5899 <BR>
5900 <A HREF="readline.html#fn_A" style="text-decoration:none"><b>A</b></A>
5901  &nbsp; 
5902 <A HREF="readline.html#fn_B" style="text-decoration:none"><b>B</b></A>
5903  &nbsp; 
5904 <A HREF="readline.html#fn_C" style="text-decoration:none"><b>C</b></A>
5905  &nbsp; 
5906 <A HREF="readline.html#fn_D" style="text-decoration:none"><b>D</b></A>
5907  &nbsp; 
5908 <A HREF="readline.html#fn_E" style="text-decoration:none"><b>E</b></A>
5909  &nbsp; 
5910 <A HREF="readline.html#fn_F" style="text-decoration:none"><b>F</b></A>
5911  &nbsp; 
5912 <A HREF="readline.html#fn_H" style="text-decoration:none"><b>H</b></A>
5913  &nbsp; 
5914 <A HREF="readline.html#fn_I" style="text-decoration:none"><b>I</b></A>
5915  &nbsp; 
5916 <A HREF="readline.html#fn_K" style="text-decoration:none"><b>K</b></A>
5917  &nbsp; 
5918 <A HREF="readline.html#fn_M" style="text-decoration:none"><b>M</b></A>
5919  &nbsp; 
5920 <A HREF="readline.html#fn_N" style="text-decoration:none"><b>N</b></A>
5921  &nbsp; 
5922 <A HREF="readline.html#fn_O" style="text-decoration:none"><b>O</b></A>
5923  &nbsp; 
5924 <A HREF="readline.html#fn_P" style="text-decoration:none"><b>P</b></A>
5925  &nbsp; 
5926 <A HREF="readline.html#fn_Q" style="text-decoration:none"><b>Q</b></A>
5927  &nbsp; 
5928 <A HREF="readline.html#fn_R" style="text-decoration:none"><b>R</b></A>
5929  &nbsp; 
5930 <A HREF="readline.html#fn_S" style="text-decoration:none"><b>S</b></A>
5931  &nbsp; 
5932 <A HREF="readline.html#fn_T" style="text-decoration:none"><b>T</b></A>
5933  &nbsp; 
5934 <A HREF="readline.html#fn_U" style="text-decoration:none"><b>U</b></A>
5935  &nbsp; 
5936 <A HREF="readline.html#fn_V" style="text-decoration:none"><b>V</b></A>
5937  &nbsp; 
5938 <A HREF="readline.html#fn_Y" style="text-decoration:none"><b>Y</b></A>
5939  &nbsp; 
5940 </td></tr></table><br><P></P>
5941 <TABLE border=0>
5942 <TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
5943 <TR><TD COLSPAN=3> <HR></TD></TR>
5944 <TR><TH><A NAME="fn__"></A>_</TH><TD></TD><TD></TD></TR>
5945 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX290"><CODE>_rl_digit_p</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
5946 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX293"><CODE>_rl_digit_value</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
5947 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX289"><CODE>_rl_lowercase_p</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
5948 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX292"><CODE>_rl_to_lower</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
5949 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX291"><CODE>_rl_to_upper</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
5950 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX288"><CODE>_rl_uppercase_p</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
5951 <TR><TD COLSPAN=3> <HR></TD></TR>
5952 <TR><TH><A NAME="fn_A"></A>A</TH><TD></TD><TD></TD></TR>
5953 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX146"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5954 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX147"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5955 <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="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5956 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX45"><CODE>accept-line (Newline or Return)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5957 <TR><TD COLSPAN=3> <HR></TD></TR>
5958 <TR><TH><A NAME="fn_B"></A>B</TH><TD></TD><TD></TD></TR>
5959 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX34"><CODE>backward-char (C-b)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5960 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX35"><CODE>backward-char (C-b)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5961 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX72"><CODE>backward-delete-char (Rubout)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
5962 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX73"><CODE>backward-delete-char (Rubout)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
5963 <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="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5964 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX97"><CODE>backward-kill-line (C-x Rubout)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5965 <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="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5966 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX105"><CODE>backward-kill-word (M-<KBD>DEL</KBD>)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5967 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX38"><CODE>backward-word (M-b)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5968 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX39"><CODE>backward-word (M-b)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5969 <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="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5970 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX51"><CODE>beginning-of-history (M-&#38;#60;)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
5971 <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="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5972 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX29"><CODE>beginning-of-line (C-a)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5973 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX5">bell-style</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5974 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX6">bind-tty-special-chars</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5975 <TR><TD COLSPAN=3> <HR></TD></TR>
5976 <TR><TH><A NAME="fn_C"></A>C</TH><TD></TD><TD></TD></TR>
5977 <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="rlman.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
5978 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX143"><CODE>call-last-kbd-macro (C-x e)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
5979 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX90"><CODE>capitalize-word (M-c)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
5980 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX91"><CODE>capitalize-word (M-c)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
5981 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX162"><CODE>character-search (C-])</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5982 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX163"><CODE>character-search (C-])</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5983 <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="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5984 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX165"><CODE>character-search-backward (M-C-])</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5985 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX40"><CODE>clear-screen (C-l)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5986 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX41"><CODE>clear-screen (C-l)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
5987 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX7">comment-begin</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5988 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX128"><CODE>complete (<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
5989 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX129"><CODE>complete (<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
5990 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX8">completion-query-items</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5991 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX9">convert-meta</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
5992 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX116"><CODE>copy-backward-word ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5993 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX117"><CODE>copy-backward-word ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5994 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX118"><CODE>copy-forward-word ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5995 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX119"><CODE>copy-forward-word ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5996 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX114"><CODE>copy-region-as-kill ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5997 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX115"><CODE>copy-region-as-kill ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
5998 <TR><TD COLSPAN=3> <HR></TD></TR>
5999 <TR><TH><A NAME="fn_D"></A>D</TH><TD></TD><TD></TD></TR>
6000 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX70"><CODE>delete-char (C-d)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6001 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX71"><CODE>delete-char (C-d)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6002 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX136"><CODE>delete-char-or-list ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6003 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX137"><CODE>delete-char-or-list ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6004 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX110"><CODE>delete-horizontal-space ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6005 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX111"><CODE>delete-horizontal-space ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6006 <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="rlman.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD></TR>
6007 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX125"><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="rlman.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD></TR>
6008 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX10">disable-completion</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6009 <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="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6010 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX149"><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="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6011 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX88"><CODE>downcase-word (M-l)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6012 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX89"><CODE>downcase-word (M-l)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6013 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX168"><CODE>dump-functions ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6014 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX169"><CODE>dump-functions ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6015 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX172"><CODE>dump-macros ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6016 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX173"><CODE>dump-macros ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6017 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX170"><CODE>dump-variables ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6018 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX171"><CODE>dump-variables ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6019 <TR><TD COLSPAN=3> <HR></TD></TR>
6020 <TR><TH><A NAME="fn_E"></A>E</TH><TD></TD><TD></TD></TR>
6021 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX11">editing-mode</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6022 <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="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6023 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX175"><CODE>emacs-editing-mode (C-e)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6024 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX12">enable-keypad</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6025 <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="rlman.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
6026 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX141"><CODE>end-kbd-macro (C-x ))</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
6027 <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="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6028 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX53"><CODE>end-of-history (M-&#38;#62;)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6029 <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="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
6030 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX31"><CODE>end-of-line (C-e)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
6031 <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="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6032 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX161"><CODE>exchange-point-and-mark (C-x C-x)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6033 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX13">expand-tilde</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6034 <TR><TD COLSPAN=3> <HR></TD></TR>
6035 <TR><TH><A NAME="fn_F"></A>F</TH><TD></TD><TD></TD></TR>
6036 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX74"><CODE>forward-backward-delete-char ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6037 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX75"><CODE>forward-backward-delete-char ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6038 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX32"><CODE>forward-char (C-f)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
6039 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX33"><CODE>forward-char (C-f)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
6040 <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="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6041 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX57"><CODE>forward-search-history (C-s)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6042 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX36"><CODE>forward-word (M-f)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
6043 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX37"><CODE>forward-word (M-f)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
6044 <TR><TD COLSPAN=3> <HR></TD></TR>
6045 <TR><TH><A NAME="fn_H"></A>H</TH><TD></TD><TD></TD></TR>
6046 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX14">history-preserve-point</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6047 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX64"><CODE>history-search-backward ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6048 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX65"><CODE>history-search-backward ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6049 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX62"><CODE>history-search-forward ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6050 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX63"><CODE>history-search-forward ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6051 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX15">horizontal-scroll-mode</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6052 <TR><TD COLSPAN=3> <HR></TD></TR>
6053 <TR><TH><A NAME="fn_I"></A>I</TH><TD></TD><TD></TD></TR>
6054 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX16">input-meta</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6055 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX166"><CODE>insert-comment (M-#)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6056 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX167"><CODE>insert-comment (M-#)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6057 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX132"><CODE>insert-completions (M-*)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6058 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX133"><CODE>insert-completions (M-*)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6059 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX18">isearch-terminators</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6060 <TR><TD COLSPAN=3> <HR></TD></TR>
6061 <TR><TH><A NAME="fn_K"></A>K</TH><TD></TD><TD></TD></TR>
6062 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX19">keymap</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6063 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX94"><CODE>kill-line (C-k)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6064 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX95"><CODE>kill-line (C-k)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6065 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX112"><CODE>kill-region ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6066 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX113"><CODE>kill-region ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6067 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX100"><CODE>kill-whole-line ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6068 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX101"><CODE>kill-whole-line ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6069 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX102"><CODE>kill-word (M-d)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6070 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX103"><CODE>kill-word (M-d)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6071 <TR><TD COLSPAN=3> <HR></TD></TR>
6072 <TR><TH><A NAME="fn_M"></A>M</TH><TD></TD><TD></TD></TR>
6073 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX20">mark-modified-lines</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6074 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX21">mark-symlinked-directories</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6075 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX22">match-hidden-files</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6076 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX134"><CODE>menu-complete ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6077 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX135"><CODE>menu-complete ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6078 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX17">meta-flag</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6079 <TR><TD COLSPAN=3> <HR></TD></TR>
6080 <TR><TH><A NAME="fn_N"></A>N</TH><TD></TD><TD></TD></TR>
6081 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX48"><CODE>next-history (C-n)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6082 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX49"><CODE>next-history (C-n)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6083 <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="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6084 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX61"><CODE>non-incremental-forward-search-history (M-n)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6085 <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="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6086 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX59"><CODE>non-incremental-reverse-search-history (M-p)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6087 <TR><TD COLSPAN=3> <HR></TD></TR>
6088 <TR><TH><A NAME="fn_O"></A>O</TH><TD></TD><TD></TD></TR>
6089 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX23">output-meta</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6090 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX92"><CODE>overwrite-mode ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6091 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX93"><CODE>overwrite-mode ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6092 <TR><TD COLSPAN=3> <HR></TD></TR>
6093 <TR><TH><A NAME="fn_P"></A>P</TH><TD></TD><TD></TD></TR>
6094 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX24">page-completions</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6095 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX130"><CODE>possible-completions (M-?)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6096 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX131"><CODE>possible-completions (M-?)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6097 <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="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6098 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX151"><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6099 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX46"><CODE>previous-history (C-p)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6100 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX47"><CODE>previous-history (C-p)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6101 <TR><TD COLSPAN=3> <HR></TD></TR>
6102 <TR><TH><A NAME="fn_Q"></A>Q</TH><TD></TD><TD></TD></TR>
6103 <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="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6104 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX77"><CODE>quoted-insert (C-q or C-v)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6105 <TR><TD COLSPAN=3> <HR></TD></TR>
6106 <TR><TH><A NAME="fn_R"></A>R</TH><TD></TD><TD></TD></TR>
6107 <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="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6108 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX145"><CODE>re-read-init-file (C-x C-r)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6109 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX178"><CODE>readline</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC24">2.1 Basic Behavior</A></TD></TR>
6110 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX42"><CODE>redraw-current-line ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
6111 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX43"><CODE>redraw-current-line ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
6112 <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="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6113 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX55"><CODE>reverse-search-history (C-r)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6114 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX154"><CODE>revert-line (M-r)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6115 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX155"><CODE>revert-line (M-r)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6116 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX214"><CODE>rl_add_defun</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC30">2.4.1 Naming a Function</A></TD></TR>
6117 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX246"><CODE>rl_add_funmap_entry</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6118 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX249"><CODE>rl_add_undo</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
6119 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX286"><CODE>rl_alphabetic</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
6120 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX190">rl_already_prompted</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6121 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX326">rl_attempted_completion_function</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6122 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX350">rl_attempted_completion_over</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6123 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX334">rl_basic_quote_characters</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6124 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX333">rl_basic_word_break_characters</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6125 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX247"><CODE>rl_begin_undo_group</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
6126 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX223"><CODE>rl_bind_key</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6127 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX225"><CODE>rl_bind_key_if_unbound</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6128 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX226"><CODE>rl_bind_key_if_unbound_in_map</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6129 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX224"><CODE>rl_bind_key_in_map</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6130 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX231"><CODE>rl_bind_keyseq</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6131 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX234"><CODE>rl_bind_keyseq_if_unbound</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6132 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX235"><CODE>rl_bind_keyseq_if_unbound_in_map</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6133 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX232"><CODE>rl_bind_keyseq_in_map</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6134 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX208">rl_binding_keymap</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6135 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX301"><CODE>rl_callback_handler_install</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC41">2.4.12 Alternate Interface</A></TD></TR>
6136 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX303"><CODE>rl_callback_handler_remove</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC41">2.4.12 Alternate Interface</A></TD></TR>
6137 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX302"><CODE>rl_callback_read_char</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC41">2.4.12 Alternate Interface</A></TD></TR>
6138 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX304">rl_catch_signals</A></TD><TD valign=top><A HREF="rlman.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6139 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX305">rl_catch_sigwinch</A></TD><TD valign=top><A HREF="rlman.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6140 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX329">rl_char_is_quoted_p</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6141 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX306"><CODE>rl_cleanup_after_signal</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6142 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX261"><CODE>rl_clear_message</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6143 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX275"><CODE>rl_clear_pending_input</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC37">2.4.8 Character Input</A></TD></TR>
6144 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX314"><CODE>rl_clear_signals</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6145 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX315"><CODE>rl_complete</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC45">2.6.1 How Completing Works</A></TD></TR>
6146 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX318"><CODE>rl_complete</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6147 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX317"><CODE>rl_complete_internal</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6148 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX337">rl_completer_quote_characters</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6149 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX335">rl_completer_word_break_characters</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6150 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX341">rl_completion_append_character</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6151 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX332">rl_completion_display_matches_hook</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6152 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX316">rl_completion_entry_function</A></TD><TD valign=top><A HREF="rlman.html#SEC45">2.6.1 How Completing Works</A></TD></TR>
6153 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX325">rl_completion_entry_function</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6154 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX345">rl_completion_found_quote</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6155 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX346">rl_completion_mark_symlink_dirs</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6156 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX322"><CODE>rl_completion_matches</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6157 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX321"><CODE>rl_completion_mode</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6158 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX340">rl_completion_query_items</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6159 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX343">rl_completion_quote_character</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6160 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX342">rl_completion_suppress_append</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6161 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX344">rl_completion_suppress_quote</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6162 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX351">rl_completion_type</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6163 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX336">rl_completion_word_break_hook</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6164 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX216"><CODE>rl_copy_keymap</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6165 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX268"><CODE>rl_copy_text</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
6166 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX258"><CODE>rl_crlf</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6167 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX267"><CODE>rl_delete_text</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
6168 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX206">rl_deprep_term_function</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6169 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX278"><CODE>rl_deprep_terminal</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC38">2.4.9 Terminal Management</A></TD></TR>
6170 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX285"><CODE>rl_ding</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
6171 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX331">rl_directory_completion_hook</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6172 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX218"><CODE>rl_discard_keymap</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6173 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX187">rl_dispatching</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6174 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX287"><CODE>rl_display_match_list</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
6175 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX251"><CODE>rl_do_undo</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
6176 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX184">rl_done</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6177 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX213">rl_editing_mode</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6178 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX182">rl_end</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6179 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX248"><CODE>rl_end_undo_group</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
6180 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX188">rl_erase_empty_line</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6181 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX202">rl_event_hook</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6182 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX274"><CODE>rl_execute_next</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC37">2.4.8 Character Input</A></TD></TR>
6183 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX207">rl_executing_keymap</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6184 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX209">rl_executing_macro</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6185 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX264"><CODE>rl_expand_prompt</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6186 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX211">rl_explicit_arg</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6187 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX283"><CODE>rl_extend_line_buffer</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
6188 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX348">rl_filename_completion_desired</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6189 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX323"><CODE>rl_filename_completion_function</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6190 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX328">rl_filename_dequoting_function</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6191 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX338">rl_filename_quote_characters</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6192 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX349">rl_filename_quoting_desired</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6193 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX327">rl_filename_quoting_function</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6194 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX254"><CODE>rl_forced_update_display</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6195 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX307"><CODE>rl_free_line_state</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6196 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX250"><CODE>rl_free_undo_list</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
6197 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX243"><CODE>rl_function_dumper</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6198 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX240"><CODE>rl_function_of_keyseq</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6199 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX245"><CODE>rl_funmap_names</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6200 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX236"><CODE>rl_generic_bind</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6201 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX219"><CODE>rl_get_keymap</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6202 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX221"><CODE>rl_get_keymap_by_name</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6203 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX222"><CODE>rl_get_keymap_name</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6204 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX311"><CODE>rl_get_screen_size</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6205 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX300"><CODE>rl_get_termcap</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
6206 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX272"><CODE>rl_getc</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC37">2.4.8 Character Input</A></TD></TR>
6207 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX203">rl_getc_function</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6208 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX193">rl_gnu_readline_p</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6209 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX347">rl_ignore_completion_duplicates</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6210 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX330">rl_ignore_some_completions_function</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6211 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX352">rl_inhibit_completion</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6212 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX284"><CODE>rl_initialize</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
6213 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX320"><CODE>rl_insert_completions</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6214 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX266"><CODE>rl_insert_text</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
6215 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX196">rl_instream</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6216 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX241"><CODE>rl_invoking_keyseqs</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6217 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX242"><CODE>rl_invoking_keyseqs_in_map</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6218 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX269"><CODE>rl_kill_text</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
6219 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX199">rl_last_func</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6220 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX191">rl_library_version</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6221 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX180">rl_line_buffer</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6222 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX244"><CODE>rl_list_funmap_names</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6223 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX294"><CODE>rl_macro_bind</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
6224 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX295"><CODE>rl_macro_dumper</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
6225 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX215"><CODE>rl_make_bare_keymap</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6226 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX217"><CODE>rl_make_keymap</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6227 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX183">rl_mark</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6228 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX260"><CODE>rl_message</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6229 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX252"><CODE>rl_modifying</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
6230 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX239"><CODE>rl_named_function</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
6231 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX185">rl_num_chars_to_read</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6232 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX212">rl_numeric_arg</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6233 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX255"><CODE>rl_on_new_line</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6234 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX256"><CODE>rl_on_new_line_with_prompt</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6235 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX197">rl_outstream</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6236 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX237"><CODE>rl_parse_and_bind</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6237 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX186">rl_pending_input</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6238 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX181">rl_point</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6239 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX319"><CODE>rl_possible_completions</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6240 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX201">rl_pre_input_hook</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6241 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX198">rl_prefer_env_winsize</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6242 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX205">rl_prep_term_function</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6243 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX277"><CODE>rl_prep_terminal</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC38">2.4.9 Terminal Management</A></TD></TR>
6244 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX189">rl_prompt</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6245 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX270"><CODE>rl_push_macro_input</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
6246 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX238"><CODE>rl_read_init_file</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6247 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX271"><CODE>rl_read_key</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC37">2.4.8 Character Input</A></TD></TR>
6248 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX195">rl_readline_name</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6249 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX210">rl_readline_state</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6250 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX192">rl_readline_version</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6251 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX253"><CODE>rl_redisplay</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6252 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX204">rl_redisplay_function</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6253 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX282"><CODE>rl_replace_line</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
6254 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX308"><CODE>rl_reset_after_signal</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6255 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX257"><CODE>rl_reset_line_state</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6256 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX312"><CODE>rl_reset_screen_size</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6257 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX281"><CODE>rl_reset_terminal</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC38">2.4.9 Terminal Management</A></TD></TR>
6258 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX309"><CODE>rl_resize_terminal</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6259 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX263"><CODE>rl_restore_prompt</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6260 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX262"><CODE>rl_save_prompt</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6261 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX233"><CODE>rl_set_key</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6262 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX276"><CODE>rl_set_keyboard_input_timeout</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC37">2.4.8 Character Input</A></TD></TR>
6263 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX220"><CODE>rl_set_keymap</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
6264 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX299"><CODE>rl_set_paren_blink_timeout</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
6265 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX265"><CODE>rl_set_prompt</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6266 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX310"><CODE>rl_set_screen_size</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6267 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX313"><CODE>rl_set_signals</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC43">2.5 Readline Signal Handling</A></TD></TR>
6268 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX259"><CODE>rl_show_char</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC35">2.4.6 Redisplay</A></TD></TR>
6269 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX339">rl_special_prefixes</A></TD><TD valign=top><A HREF="rlman.html#SEC47">2.6.3 Completion Variables</A></TD></TR>
6270 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX200">rl_startup_hook</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6271 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX273"><CODE>rl_stuff_char</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC37">2.4.8 Character Input</A></TD></TR>
6272 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX194">rl_terminal_name</A></TD><TD valign=top><A HREF="rlman.html#SEC28">2.3 Readline Variables</A></TD></TR>
6273 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX279"><CODE>rl_tty_set_default_bindings</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC38">2.4.9 Terminal Management</A></TD></TR>
6274 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX280"><CODE>rl_tty_unset_default_bindings</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC38">2.4.9 Terminal Management</A></TD></TR>
6275 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX230"><CODE>rl_unbind_command_in_map</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6276 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX229"><CODE>rl_unbind_function_in_map</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6277 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX227"><CODE>rl_unbind_key</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6278 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX228"><CODE>rl_unbind_key_in_map</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
6279 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX324"><CODE>rl_username_completion_function</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC46">2.6.2 Completion Functions</A></TD></TR>
6280 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX296"><CODE>rl_variable_bind</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
6281 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX298"><CODE>rl_variable_dumper</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
6282 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX297"><CODE>rl_variable_value</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
6283 <TR><TD COLSPAN=3> <HR></TD></TR>
6284 <TR><TH><A NAME="fn_S"></A>S</TH><TD></TD><TD></TD></TR>
6285 <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="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6286 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX81"><CODE>self-insert (a, b, A, 1, !, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6287 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX158"><CODE>set-mark (C-@)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6288 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX159"><CODE>set-mark (C-@)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6289 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX25">show-all-if-ambiguous</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6290 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX26">show-all-if-unmodified</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6291 <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="rlman.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
6292 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX139"><CODE>start-kbd-macro (C-x ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
6293 <TR><TD COLSPAN=3> <HR></TD></TR>
6294 <TR><TH><A NAME="fn_T"></A>T</TH><TD></TD><TD></TD></TR>
6295 <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="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6296 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX79"><CODE>tab-insert (M-<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6297 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX156"><CODE>tilde-expand (M-~)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6298 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX157"><CODE>tilde-expand (M-~)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6299 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX82"><CODE>transpose-chars (C-t)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6300 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX83"><CODE>transpose-chars (C-t)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6301 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX84"><CODE>transpose-words (M-t)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6302 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX85"><CODE>transpose-words (M-t)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6303 <TR><TD COLSPAN=3> <HR></TD></TR>
6304 <TR><TH><A NAME="fn_U"></A>U</TH><TD></TD><TD></TD></TR>
6305 <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="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6306 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX153"><CODE>undo (C-_ or C-x C-u)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6307 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX126"><CODE>universal-argument ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD></TR>
6308 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX127"><CODE>universal-argument ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD></TR>
6309 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX108"><CODE>unix-filename-rubout ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6310 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX109"><CODE>unix-filename-rubout ()</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6311 <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="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6312 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX99"><CODE>unix-line-discard (C-u)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6313 <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="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6314 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX107"><CODE>unix-word-rubout (C-w)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6315 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX86"><CODE>upcase-word (M-u)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6316 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX87"><CODE>upcase-word (M-u)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
6317 <TR><TD COLSPAN=3> <HR></TD></TR>
6318 <TR><TH><A NAME="fn_V"></A>V</TH><TD></TD><TD></TD></TR>
6319 <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="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6320 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX177"><CODE>vi-editing-mode (M-C-j)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
6321 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX27">visible-stats</A></TD><TD valign=top><A HREF="rlman.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6322 <TR><TD COLSPAN=3> <HR></TD></TR>
6323 <TR><TH><A NAME="fn_Y"></A>Y</TH><TD></TD><TD></TD></TR>
6324 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX120"><CODE>yank (C-y)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6325 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX121"><CODE>yank (C-y)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6326 <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="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6327 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX69"><CODE>yank-last-arg (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6328 <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="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6329 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX67"><CODE>yank-nth-arg (M-C-y)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6330 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX122"><CODE>yank-pop (M-y)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6331 <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX123"><CODE>yank-pop (M-y)</CODE></A></TD><TD valign=top><A HREF="rlman.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6332 <TR><TD COLSPAN=3> <HR></TD></TR>
6333 </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>
6334  &nbsp; 
6335 <BR>
6336 <A HREF="readline.html#fn_A" style="text-decoration:none"><b>A</b></A>
6337  &nbsp; 
6338 <A HREF="readline.html#fn_B" style="text-decoration:none"><b>B</b></A>
6339  &nbsp; 
6340 <A HREF="readline.html#fn_C" style="text-decoration:none"><b>C</b></A>
6341  &nbsp; 
6342 <A HREF="readline.html#fn_D" style="text-decoration:none"><b>D</b></A>
6343  &nbsp; 
6344 <A HREF="readline.html#fn_E" style="text-decoration:none"><b>E</b></A>
6345  &nbsp; 
6346 <A HREF="readline.html#fn_F" style="text-decoration:none"><b>F</b></A>
6347  &nbsp; 
6348 <A HREF="readline.html#fn_H" style="text-decoration:none"><b>H</b></A>
6349  &nbsp; 
6350 <A HREF="readline.html#fn_I" style="text-decoration:none"><b>I</b></A>
6351  &nbsp; 
6352 <A HREF="readline.html#fn_K" style="text-decoration:none"><b>K</b></A>
6353  &nbsp; 
6354 <A HREF="readline.html#fn_M" style="text-decoration:none"><b>M</b></A>
6355  &nbsp; 
6356 <A HREF="readline.html#fn_N" style="text-decoration:none"><b>N</b></A>
6357  &nbsp; 
6358 <A HREF="readline.html#fn_O" style="text-decoration:none"><b>O</b></A>
6359  &nbsp; 
6360 <A HREF="readline.html#fn_P" style="text-decoration:none"><b>P</b></A>
6361  &nbsp; 
6362 <A HREF="readline.html#fn_Q" style="text-decoration:none"><b>Q</b></A>
6363  &nbsp; 
6364 <A HREF="readline.html#fn_R" style="text-decoration:none"><b>R</b></A>
6365  &nbsp; 
6366 <A HREF="readline.html#fn_S" style="text-decoration:none"><b>S</b></A>
6367  &nbsp; 
6368 <A HREF="readline.html#fn_T" style="text-decoration:none"><b>T</b></A>
6369  &nbsp; 
6370 <A HREF="readline.html#fn_U" style="text-decoration:none"><b>U</b></A>
6371  &nbsp; 
6372 <A HREF="readline.html#fn_V" style="text-decoration:none"><b>V</b></A>
6373  &nbsp; 
6374 <A HREF="readline.html#fn_Y" style="text-decoration:none"><b>Y</b></A>
6375  &nbsp; 
6376 </td></tr></table><br><P>
6377
6378 <HR SIZE="6">
6379 <A NAME="SEC_Contents"></A>
6380 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6381 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
6382 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
6383 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
6384 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
6385 </TR></TABLE>
6386 <H1>Table of Contents</H1>
6387 <UL>
6388 <A NAME="TOC1" HREF="readline.html#SEC1">1. Command Line Editing</A>
6389 <BR>
6390 <UL>
6391 <A NAME="TOC2" HREF="readline.html#SEC2">1.1 Introduction to Line Editing</A>
6392 <BR>
6393 <A NAME="TOC3" HREF="readline.html#SEC3">1.2 Readline Interaction</A>
6394 <BR>
6395 <UL>
6396 <A NAME="TOC4" HREF="readline.html#SEC4">1.2.1 Readline Bare Essentials</A>
6397 <BR>
6398 <A NAME="TOC5" HREF="readline.html#SEC5">1.2.2 Readline Movement Commands</A>
6399 <BR>
6400 <A NAME="TOC6" HREF="readline.html#SEC6">1.2.3 Readline Killing Commands</A>
6401 <BR>
6402 <A NAME="TOC7" HREF="readline.html#SEC7">1.2.4 Readline Arguments</A>
6403 <BR>
6404 <A NAME="TOC8" HREF="readline.html#SEC8">1.2.5 Searching for Commands in the History</A>
6405 <BR>
6406 </UL>
6407 <A NAME="TOC9" HREF="readline.html#SEC9">1.3 Readline Init File</A>
6408 <BR>
6409 <UL>
6410 <A NAME="TOC10" HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A>
6411 <BR>
6412 <A NAME="TOC11" HREF="readline.html#SEC11">1.3.2 Conditional Init Constructs</A>
6413 <BR>
6414 <A NAME="TOC12" HREF="readline.html#SEC12">1.3.3 Sample Init File</A>
6415 <BR>
6416 </UL>
6417 <A NAME="TOC13" HREF="readline.html#SEC13">1.4 Bindable Readline Commands</A>
6418 <BR>
6419 <UL>
6420 <A NAME="TOC14" HREF="readline.html#SEC14">1.4.1 Commands For Moving</A>
6421 <BR>
6422 <A NAME="TOC15" HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A>
6423 <BR>
6424 <A NAME="TOC16" HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A>
6425 <BR>
6426 <A NAME="TOC17" HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A>
6427 <BR>
6428 <A NAME="TOC18" HREF="readline.html#SEC18">1.4.5 Specifying Numeric Arguments</A>
6429 <BR>
6430 <A NAME="TOC19" HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A>
6431 <BR>
6432 <A NAME="TOC20" HREF="readline.html#SEC20">1.4.7 Keyboard Macros</A>
6433 <BR>
6434 <A NAME="TOC21" HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A>
6435 <BR>
6436 </UL>
6437 <A NAME="TOC22" HREF="readline.html#SEC22">1.5 Readline vi Mode</A>
6438 <BR>
6439 </UL>
6440 <A NAME="TOC23" HREF="readline.html#SEC23">2. Programming with GNU Readline</A>
6441 <BR>
6442 <UL>
6443 <A NAME="TOC24" HREF="readline.html#SEC24">2.1 Basic Behavior</A>
6444 <BR>
6445 <A NAME="TOC25" HREF="readline.html#SEC25">2.2 Custom Functions</A>
6446 <BR>
6447 <UL>
6448 <A NAME="TOC26" HREF="readline.html#SEC26">2.2.1 Readline Typedefs</A>
6449 <BR>
6450 <A NAME="TOC27" HREF="readline.html#SEC27">2.2.2 Writing a New Function</A>
6451 <BR>
6452 </UL>
6453 <A NAME="TOC28" HREF="readline.html#SEC28">2.3 Readline Variables</A>
6454 <BR>
6455 <A NAME="TOC29" HREF="readline.html#SEC29">2.4 Readline Convenience Functions</A>
6456 <BR>
6457 <UL>
6458 <A NAME="TOC30" HREF="readline.html#SEC30">2.4.1 Naming a Function</A>
6459 <BR>
6460 <A NAME="TOC31" HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A>
6461 <BR>
6462 <A NAME="TOC32" HREF="readline.html#SEC32">2.4.3 Binding Keys</A>
6463 <BR>
6464 <A NAME="TOC33" HREF="readline.html#SEC33">2.4.4 Associating Function Names and Bindings</A>
6465 <BR>
6466 <A NAME="TOC34" HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A>
6467 <BR>
6468 <A NAME="TOC35" HREF="readline.html#SEC35">2.4.6 Redisplay</A>
6469 <BR>
6470 <A NAME="TOC36" HREF="readline.html#SEC36">2.4.7 Modifying Text</A>
6471 <BR>
6472 <A NAME="TOC37" HREF="readline.html#SEC37">2.4.8 Character Input</A>
6473 <BR>
6474 <A NAME="TOC38" HREF="readline.html#SEC38">2.4.9 Terminal Management</A>
6475 <BR>
6476 <A NAME="TOC39" HREF="readline.html#SEC39">2.4.10 Utility Functions</A>
6477 <BR>
6478 <A NAME="TOC40" HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A>
6479 <BR>
6480 <A NAME="TOC41" HREF="readline.html#SEC41">2.4.12 Alternate Interface</A>
6481 <BR>
6482 <A NAME="TOC42" HREF="readline.html#SEC42">2.4.13 A Readline Example</A>
6483 <BR>
6484 </UL>
6485 <A NAME="TOC43" HREF="readline.html#SEC43">2.5 Readline Signal Handling</A>
6486 <BR>
6487 <A NAME="TOC44" HREF="readline.html#SEC44">2.6 Custom Completers</A>
6488 <BR>
6489 <UL>
6490 <A NAME="TOC45" HREF="readline.html#SEC45">2.6.1 How Completing Works</A>
6491 <BR>
6492 <A NAME="TOC46" HREF="readline.html#SEC46">2.6.2 Completion Functions</A>
6493 <BR>
6494 <A NAME="TOC47" HREF="readline.html#SEC47">2.6.3 Completion Variables</A>
6495 <BR>
6496 <A NAME="TOC48" HREF="readline.html#SEC48">2.6.4 A Short Completion Example</A>
6497 <BR>
6498 </UL>
6499 </UL>
6500 <A NAME="TOC49" HREF="readline.html#SEC49">A. Copying This Manual</A>
6501 <BR>
6502 <UL>
6503 <A NAME="TOC50" HREF="readline.html#SEC50">A.1 GNU Free Documentation License</A>
6504 <BR>
6505 <UL>
6506 <A NAME="TOC51" HREF="readline.html#SEC51">A.1.1 ADDENDUM: How to use this License for your documents</A>
6507 <BR>
6508 </UL>
6509 </UL>
6510 <A NAME="TOC52" HREF="readline.html#SEC52">Concept Index</A>
6511 <BR>
6512 <A NAME="TOC53" HREF="readline.html#SEC53">Function and Variable Index</A>
6513 <BR>
6514 </UL>
6515 <HR SIZE=1>
6516 <A NAME="SEC_OVERVIEW"></A>
6517 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6518 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
6519 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
6520 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
6521 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
6522 </TR></TABLE>
6523 <H1>Short Table of Contents</H1>
6524 <BLOCKQUOTE>
6525 <A NAME="TOC1" HREF="readline.html#SEC1">1. Command Line Editing</A>
6526 <BR>
6527 <A NAME="TOC23" HREF="readline.html#SEC23">2. Programming with GNU Readline</A>
6528 <BR>
6529 <A NAME="TOC49" HREF="readline.html#SEC49">A. Copying This Manual</A>
6530 <BR>
6531 <A NAME="TOC52" HREF="readline.html#SEC52">Concept Index</A>
6532 <BR>
6533 <A NAME="TOC53" HREF="readline.html#SEC53">Function and Variable Index</A>
6534 <BR>
6535
6536 </BLOCKQUOTE>
6537 <HR SIZE=1>
6538 <A NAME="SEC_About"></A>
6539 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6540 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
6541 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
6542 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
6543 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
6544 </TR></TABLE>
6545 <H1>About this document</H1>
6546 This document was generated by <I>Chet Ramey</I> on <I>November, 17  2005</I>
6547 using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
6548 "><I>texi2html</I></A>
6549 <P></P>  
6550 The buttons in the navigation panels have the following meaning:
6551 <P></P>
6552 <table border = "1">
6553 <TR>
6554 <TH> Button </TH>
6555 <TH> Name </TH>
6556 <TH> Go to </TH>
6557 <TH> From 1.2.3 go to</TH>
6558 </TR>
6559 <TR>
6560 <TD ALIGN="CENTER">
6561  [ &lt; ] </TD>
6562 <TD ALIGN="CENTER">
6563 Back
6564 </TD>
6565 <TD>
6566 previous section in reading order
6567 </TD>
6568 <TD>
6569 1.2.2
6570 </TD>
6571 </TR>
6572 <TR>
6573 <TD ALIGN="CENTER">
6574  [ &gt; ] </TD>
6575 <TD ALIGN="CENTER">
6576 Forward
6577 </TD>
6578 <TD>
6579 next section in reading order
6580 </TD>
6581 <TD>
6582 1.2.4
6583 </TD>
6584 </TR>
6585 <TR>
6586 <TD ALIGN="CENTER">
6587  [ &lt;&lt; ] </TD>
6588 <TD ALIGN="CENTER">
6589 FastBack
6590 </TD>
6591 <TD>
6592 previous or up-and-previous section 
6593 </TD>
6594 <TD>
6595 1.1
6596 </TD>
6597 </TR>
6598 <TR>
6599 <TD ALIGN="CENTER">
6600  [ Up ] </TD>
6601 <TD ALIGN="CENTER">
6602 Up
6603 </TD>
6604 <TD>
6605 up section
6606 </TD>
6607 <TD>
6608 1.2
6609 </TD>
6610 </TR>
6611 <TR>
6612 <TD ALIGN="CENTER">
6613  [ &gt;&gt; ] </TD>
6614 <TD ALIGN="CENTER">
6615 FastForward
6616 </TD>
6617 <TD>
6618 next or up-and-next section
6619 </TD>
6620 <TD>
6621 1.3
6622 </TD>
6623 </TR>
6624 <TR>
6625 <TD ALIGN="CENTER">
6626  [Top] </TD>
6627 <TD ALIGN="CENTER">
6628 Top
6629 </TD>
6630 <TD>
6631 cover (top) of document
6632 </TD>
6633 <TD>
6634  &nbsp; 
6635 </TD>
6636 </TR>
6637 <TR>
6638 <TD ALIGN="CENTER">
6639  [Contents] </TD>
6640 <TD ALIGN="CENTER">
6641 Contents
6642 </TD>
6643 <TD>
6644 table of contents
6645 </TD>
6646 <TD>
6647  &nbsp; 
6648 </TD>
6649 </TR>
6650 <TR>
6651 <TD ALIGN="CENTER">
6652  [Index] </TD>
6653 <TD ALIGN="CENTER">
6654 Index
6655 </TD>
6656 <TD>
6657 concept index
6658 </TD>
6659 <TD>
6660  &nbsp; 
6661 </TD>
6662 </TR>
6663 <TR>
6664 <TD ALIGN="CENTER">
6665  [ ? ] </TD>
6666 <TD ALIGN="CENTER">
6667 About
6668 </TD>
6669 <TD>
6670 this page
6671 </TD>
6672 <TD>
6673  &nbsp; 
6674 </TD>
6675 </TR>
6676 </TABLE>
6677 <P></P>
6678 where the <STRONG> Example </STRONG> assumes that the current position 
6679 is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of 
6680 the following structure:
6681 <UL>
6682 <LI> 1. Section One  </LI>
6683 <UL>
6684 <LI>1.1 Subsection One-One</LI>
6685 <UL>
6686 <LI> ... </LI>
6687 </UL>
6688 <LI>1.2 Subsection One-Two</LI>
6689 <UL>
6690 <LI>1.2.1 Subsubsection One-Two-One
6691 </LI><LI>1.2.2 Subsubsection One-Two-Two
6692 </LI><LI>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp; <STRONG>
6693 &lt;== Current Position </STRONG>
6694 </LI><LI>1.2.4 Subsubsection One-Two-Four
6695 </LI></UL>
6696 <LI>1.3 Subsection One-Three</LI>
6697 <UL>
6698 <LI> ... </LI>
6699 </UL>
6700 <LI>1.4 Subsection One-Four</LI>
6701 </UL>
6702 </UL>
6703
6704 <HR SIZE=1>
6705 <BR>  
6706 <FONT SIZE="-1">
6707 This document was generated
6708 by <I>Chet Ramey</I> on <I>November, 17  2005</I>
6709 using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
6710 "><I>texi2html</I></A>
6711
6712 </BODY>
6713 </HTML>