import of readlilne 5.1
[deliverable/binutils-gdb.git] / readline / doc / readline.html
CommitLineData
a44161c3 1<HTML>
84041b4c 2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
b585a9fa 3<!-- Created on December, 6 2005 by texi2html 1.64 -->
84041b4c
EZ
4<!--
5Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
6 Karl Berry <karl@freefriends.org>
7 Olaf Bachmann <obachman@mathematik.uni-kl.de>
8 and many others.
9Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
10Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
11
12-->
a44161c3 13<HEAD>
84041b4c
EZ
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">
a44161c3 21
a44161c3 22</HEAD>
a44161c3 23
84041b4c
EZ
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>
b585a9fa 30<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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
a44161c3 35This document describes the GNU Readline Library, a utility which aids
b585a9fa
EZ
36in the consistency of user interface across discrete programs which
37provide a command line interface.
84041b4c
EZ
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>
b585a9fa
EZ
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
84041b4c
EZ
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>
b585a9fa 60<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 66<P>
a44161c3 67
a44161c3
EZ
68This chapter describes the basic features of the GNU
69command line editing interface.
84041b4c
EZ
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>
b585a9fa 94<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 99<P>
84041b4c 100
a44161c3
EZ
101The following paragraphs describe the notation used to represent
102keystrokes.
84041b4c 103</P><P>
a44161c3 104
a44161c3
EZ
105The text <KBD>C-k</KBD> is read as `Control-K' and describes the character
106produced when the <KBD>k</KBD> key is pressed while the Control key
107is depressed.
84041b4c 108</P><P>
a44161c3 109
a44161c3 110The text <KBD>M-k</KBD> is read as `Meta-K' and describes the character
f9267e15
EZ
111produced when the Meta key (if you have one) is depressed, and the <KBD>k</KBD>
112key is pressed.
113The Meta key is labeled <KBD>ALT</KBD> on many keyboards.
114On keyboards with two keys labeled <KBD>ALT</KBD> (usually to either side of
115the space bar), the <KBD>ALT</KBD> on the left side is generally set to
116work as a Meta key.
117The <KBD>ALT</KBD> key on the right may also be configured to work as a
118Meta key or may be configured as some other modifier, such as a
119Compose key for typing accented characters.
84041b4c 120</P><P>
f9267e15 121
f9267e15
EZ
122If you do not have a Meta or <KBD>ALT</KBD> key, or another key working as
123a Meta key, the identical keystroke can be generated by typing <KBD>ESC</KBD>
84041b4c 124<EM>first</EM>, and then typing <KBD>k</KBD>.
a44161c3 125Either process is known as <EM>metafying</EM> the <KBD>k</KBD> key.
84041b4c 126</P><P>
a44161c3 127
a44161c3
EZ
128The text <KBD>M-C-k</KBD> is read as `Meta-Control-k' and describes the
129character produced by <EM>metafying</EM> <KBD>C-k</KBD>.
84041b4c 130</P><P>
a44161c3 131
a44161c3
EZ
132In addition, several keys have their own names. Specifically,
133<KBD>DEL</KBD>, <KBD>ESC</KBD>, <KBD>LFD</KBD>, <KBD>SPC</KBD>, <KBD>RET</KBD>, and <KBD>TAB</KBD> all
134stand for themselves when seen in this text, or in an init file
84041b4c 135(see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
f9267e15
EZ
136If your keyboard lacks a <KBD>LFD</KBD> key, typing <KBD>C-j</KBD> will
137produce the desired character.
138The <KBD>RET</KBD> key may be labeled <KBD>Return</KBD> or <KBD>Enter</KBD> on
139some keyboards.
84041b4c
EZ
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>
b585a9fa 153<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 158<P>
a44161c3 159
a44161c3
EZ
160Often during an interactive session you type in a long line of text,
161only to notice that the first word on the line is misspelled. The
162Readline library gives you a set of commands for manipulating the text
163as you type it in, allowing you to just fix your typo, and not forcing
164you to retype the majority of the line. Using these editing commands,
165you move the cursor to the place that needs correction, and delete or
166insert the text of the corrections. Then, when you are satisfied with
84041b4c
EZ
167the line, you simply press <KBD>RET</KBD>. You do not have to be at the
168end of the line to press <KBD>RET</KBD>; the entire line is accepted
a44161c3 169regardless of the location of the cursor within the line.
84041b4c
EZ
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>
b585a9fa 192<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 197<P>
a44161c3 198
a44161c3
EZ
199In order to enter characters into the line, simply type them. The typed
200character appears where the cursor was, and then the cursor moves one
201space to the right. If you mistype a character, you can use your
202erase character to back up and delete the mistyped character.
84041b4c 203</P><P>
a44161c3 204
f9267e15
EZ
205Sometimes you may mistype a character, and
206not notice the error until you have typed several other characters. In
a44161c3
EZ
207that case, you can type <KBD>C-b</KBD> to move the cursor to the left, and then
208correct your mistake. Afterwards, you can move the cursor to the right
209with <KBD>C-f</KBD>.
84041b4c 210</P><P>
a44161c3 211
a44161c3
EZ
212When you add text in the middle of a line, you will notice that characters
213to the right of the cursor are `pushed over' to make room for the text
214that you have inserted. Likewise, when you delete text behind the cursor,
215characters to the right of the cursor are `pulled back' to fill in the
f9267e15 216blank space created by the removal of the text. A list of the bare
a44161c3 217essentials for editing the text of an input line follows.
84041b4c 218</P><P>
a44161c3 219
a44161c3 220<DL COMPACT>
a44161c3 221<DT><KBD>C-b</KBD>
84041b4c 222<DD>Move back one character.
a44161c3 223<DT><KBD>C-f</KBD>
84041b4c 224<DD>Move forward one character.
f9267e15 225<DT><KBD>DEL</KBD> or <KBD>Backspace</KBD>
84041b4c 226<DD>Delete the character to the left of the cursor.
a44161c3 227<DT><KBD>C-d</KBD>
84041b4c 228<DD>Delete the character underneath the cursor.
a44161c3 229<DT>Printing characters
84041b4c 230<DD>Insert the character into the line at the cursor.
f9267e15 231<DT><KBD>C-_</KBD> or <KBD>C-x C-u</KBD>
84041b4c 232<DD>Undo the last editing command. You can undo all the way back to an
a44161c3
EZ
233empty line.
234</DL>
f9267e15 235<P>
84041b4c 236
f9267e15
EZ
237(Depending on your configuration, the <KBD>Backspace</KBD> key be set to
238delete the character to the left of the cursor and the <KBD>DEL</KBD> key set
239to delete the character underneath the cursor, like <KBD>C-d</KBD>, rather
240than the character to the left of the cursor.)
84041b4c
EZ
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>
b585a9fa 254<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 259<P>
84041b4c 260
f9267e15 261The above table describes the most basic keystrokes that you need
a44161c3
EZ
262in order to do editing of the input line. For your convenience, many
263other commands have been added in addition to <KBD>C-b</KBD>, <KBD>C-f</KBD>,
264<KBD>C-d</KBD>, and <KBD>DEL</KBD>. Here are some commands for moving more rapidly
265about the line.
84041b4c 266</P><P>
a44161c3 267
a44161c3 268<DL COMPACT>
a44161c3 269<DT><KBD>C-a</KBD>
84041b4c 270<DD>Move to the start of the line.
a44161c3 271<DT><KBD>C-e</KBD>
84041b4c 272<DD>Move to the end of the line.
a44161c3 273<DT><KBD>M-f</KBD>
84041b4c 274<DD>Move forward a word, where a word is composed of letters and digits.
a44161c3 275<DT><KBD>M-b</KBD>
84041b4c 276<DD>Move backward a word.
a44161c3 277<DT><KBD>C-l</KBD>
84041b4c 278<DD>Clear the screen, reprinting the current line at the top.
a44161c3 279</DL>
a44161c3 280<P>
84041b4c 281
a44161c3
EZ
282Notice how <KBD>C-f</KBD> moves forward a character, while <KBD>M-f</KBD> moves
283forward a word. It is a loose convention that control keystrokes
284operate on characters while meta keystrokes operate on words.
84041b4c
EZ
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>
b585a9fa 298<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 303<P>
a44161c3 304
84041b4c
EZ
305<A NAME="IDX1"></A>
306<A NAME="IDX2"></A>
307</P><P>
308
a44161c3
EZ
309<EM>Killing</EM> text means to delete the text from the line, but to save
310it away for later use, usually by <EM>yanking</EM> (re-inserting)
311it back into the line.
f9267e15 312(`Cut' and `paste' are more recent jargon for `kill' and `yank'.)
84041b4c 313</P><P>
f9267e15 314
a44161c3
EZ
315If the description for a command says that it `kills' text, then you can
316be sure that you can get the text back in a different (or the same)
317place later.
84041b4c 318</P><P>
a44161c3 319
a44161c3
EZ
320When you use a kill command, the text is saved in a <EM>kill-ring</EM>.
321Any number of consecutive kills save all of the killed text together, so
322that when you yank it back, you get it all. The kill
323ring is not line specific; the text that you killed on a previously
324typed line is available to be yanked back later, when you are typing
325another line.
84041b4c
EZ
326<A NAME="IDX3"></A>
327</P><P>
a44161c3 328
a44161c3 329Here is the list of commands for killing text.
84041b4c 330</P><P>
a44161c3 331
a44161c3 332<DL COMPACT>
a44161c3 333<DT><KBD>C-k</KBD>
84041b4c
EZ
334<DD>Kill the text from the current cursor position to the end of the line.
335<P>
a44161c3
EZ
336
337<DT><KBD>M-d</KBD>
84041b4c 338<DD>Kill from the cursor to the end of the current word, or, if between
a44161c3 339words, to the end of the next word.
f9267e15 340Word boundaries are the same as those used by <KBD>M-f</KBD>.
84041b4c 341<P>
a44161c3 342
84041b4c
EZ
343<DT><KBD>M-<KBD>DEL</KBD></KBD>
344<DD>Kill from the cursor the start of the current word, or, if between
a44161c3 345words, to the start of the previous word.
f9267e15 346Word boundaries are the same as those used by <KBD>M-b</KBD>.
84041b4c 347<P>
a44161c3
EZ
348
349<DT><KBD>C-w</KBD>
84041b4c
EZ
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>
a44161c3
EZ
353
354</DL>
a44161c3 355<P>
84041b4c 356
a44161c3
EZ
357Here is how to <EM>yank</EM> the text back into the line. Yanking
358means to copy the most-recently-killed text from the kill buffer.
84041b4c 359</P><P>
a44161c3 360
a44161c3 361<DL COMPACT>
a44161c3 362<DT><KBD>C-y</KBD>
84041b4c
EZ
363<DD>Yank the most recently killed text back into the buffer at the cursor.
364<P>
a44161c3
EZ
365
366<DT><KBD>M-y</KBD>
84041b4c 367<DD>Rotate the kill-ring, and yank the new top. You can only do this if
a44161c3
EZ
368the prior command is <KBD>C-y</KBD> or <KBD>M-y</KBD>.
369</DL>
84041b4c 370<P>
a44161c3 371
84041b4c
EZ
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>
b585a9fa 383<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 388<P>
84041b4c 389
a44161c3
EZ
390You can pass numeric arguments to Readline commands. Sometimes the
391argument acts as a repeat count, other times it is the <I>sign</I> of the
392argument that is significant. If you pass a negative argument to a
393command which normally acts in a forward direction, that command will
394act in a backward direction. For example, to kill text back to the
395start of the line, you might type <SAMP>`M-- C-k'</SAMP>.
84041b4c 396</P><P>
a44161c3 397
a44161c3
EZ
398The general way to pass numeric arguments to a command is to type meta
399digits before the command. If the first `digit' typed is a minus
f9267e15 400sign (<SAMP>`-'</SAMP>), then the sign of the argument will be negative. Once
a44161c3
EZ
401you have typed one meta digit to get the argument started, you can type
402the remainder of the digits, and then the command. For example, to give
84041b4c
EZ
403the <KBD>C-d</KBD> command an argument of 10, you could type <SAMP>`M-1 0 C-d'</SAMP>,
404which will delete the next ten characters on the input line.
405</P><P>
406
407<A NAME="Searching"></A>
408<HR SIZE="6">
409<A NAME="SEC8"></A>
410<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
411<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC7"> &lt; </A>]</TD>
412<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> &gt; </A>]</TD>
413<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> &lt;&lt; </A>]</TD>
414<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> Up </A>]</TD>
415<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> &gt;&gt; </A>]</TD>
416<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
417<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
b585a9fa 418<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 423<P>
84041b4c 424
a44161c3
EZ
425Readline provides commands for searching through the command history
426for lines containing a specified string.
84041b4c
EZ
427There are two search modes: <EM>incremental</EM> and <EM>non-incremental</EM>.
428</P><P>
a44161c3 429
a44161c3
EZ
430Incremental searches begin before the user has finished typing the
431search string.
432As each character of the search string is typed, Readline displays
433the next entry from the history matching the string typed so far.
434An incremental search requires only as many characters as needed to
435find the desired history entry.
f9267e15
EZ
436To search backward in the history for a particular string, type
437<KBD>C-r</KBD>. Typing <KBD>C-s</KBD> searches forward through the history.
438The characters present in the value of the <CODE>isearch-terminators</CODE> variable
a44161c3
EZ
439are used to terminate an incremental search.
440If that variable has not been assigned a value, the <KBD>ESC</KBD> and
441<KBD>C-J</KBD> characters will terminate an incremental search.
442<KBD>C-g</KBD> will abort an incremental search and restore the original line.
443When the search is terminated, the history entry containing the
444search string becomes the current line.
84041b4c 445</P><P>
f9267e15 446
f9267e15
EZ
447To find other matching entries in the history list, type <KBD>C-r</KBD> or
448<KBD>C-s</KBD> as appropriate.
a44161c3
EZ
449This will search backward or forward in the history for the next
450entry matching the search string typed so far.
451Any other key sequence bound to a Readline command will terminate
452the search and execute that command.
453For instance, a <KBD>RET</KBD> will terminate the search and accept
454the line, thereby executing the command from the history list.
84041b4c
EZ
455A movement command will terminate the search, make the last line found
456the current line, and begin editing.
457</P><P>
458
459Readline remembers the last incremental search string. If two
460<KBD>C-r</KBD>s are typed without any intervening characters defining a new
461search string, any remembered search string is used.
462</P><P>
a44161c3 463
a44161c3
EZ
464Non-incremental searches read the entire search string before starting
465to search for matching history lines. The search string may be
466typed by the user or be part of the contents of the current line.
84041b4c
EZ
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>
b585a9fa 480<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 485<P>
a44161c3 486
f9267e15 487Although the Readline library comes with a set of Emacs-like
a44161c3
EZ
488keybindings installed by default, it is possible to use a different set
489of keybindings.
490Any user can customize programs that use Readline by putting
f9267e15 491commands in an <EM>inputrc</EM> file, conventionally in his home directory.
a44161c3
EZ
492The name of this
493file is taken from the value of the environment variable <CODE>INPUTRC</CODE>. If
494that variable is unset, the default is <TT>`~/.inputrc'</TT>.
84041b4c 495</P><P>
a44161c3 496
a44161c3
EZ
497When a program which uses the Readline library starts up, the
498init file is read, and the key bindings are set.
84041b4c 499</P><P>
a44161c3 500
a44161c3
EZ
501In addition, the <CODE>C-x C-r</CODE> command re-reads this init file, thus
502incorporating any changes that you might have made to it.
84041b4c
EZ
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>
b585a9fa 531<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 536<P>
84041b4c 537
a44161c3
EZ
538There are only a few basic constructs allowed in the
539Readline init file. Blank lines are ignored.
540Lines beginning with a <SAMP>`#'</SAMP> are comments.
541Lines beginning with a <SAMP>`$'</SAMP> indicate conditional
84041b4c 542constructs (see section <A HREF="readline.html#SEC11">1.3.2 Conditional Init Constructs</A>). Other lines
a44161c3 543denote variable settings and key bindings.
84041b4c 544</P><P>
a44161c3 545
a44161c3 546<DL COMPACT>
a44161c3 547<DT>Variable Settings
84041b4c 548<DD>You can modify the run-time behavior of Readline by
a44161c3 549altering the values of variables in Readline
84041b4c
EZ
550using the <CODE>set</CODE> command within the init file.
551The syntax is simple:
552<P>
553
554<TABLE><tr><td>&nbsp;</td><td class=example><pre>set <VAR>variable</VAR> <VAR>value</VAR>
555</pre></td></tr></table></P><P>
556
557Here, for example, is how to
a44161c3
EZ
558change from the default Emacs-like key binding to use
559<CODE>vi</CODE> line editing commands:
84041b4c 560</P><P>
a44161c3 561
84041b4c
EZ
562<TABLE><tr><td>&nbsp;</td><td class=example><pre>set editing-mode vi
563</pre></td></tr></table></P><P>
a44161c3 564
84041b4c 565Variable names and values, where appropriate, are recognized without regard
b585a9fa
EZ
566to case. Unrecognized variable names are ignored.
567</P><P>
568
569Boolean variables (those that can be set to on or off) are set to on if
570the value is null or empty, <VAR>on</VAR> (case-insensitive), or 1. Any other
571value results in the variable being set to off.
84041b4c 572</P><P>
a44161c3
EZ
573
574A great deal of run-time behavior is changeable with the following
575variables.
84041b4c 576</P><P>
a44161c3 577
84041b4c 578<A NAME="IDX4"></A>
a44161c3
EZ
579<DL COMPACT>
580
581<DT><CODE>bell-style</CODE>
84041b4c 582<DD><A NAME="IDX5"></A>
a44161c3
EZ
583Controls what happens when Readline wants to ring the terminal bell.
584If 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.
586If set to <SAMP>`audible'</SAMP> (the default), Readline attempts to ring
587the terminal's bell.
84041b4c 588<P>
a44161c3 589
b585a9fa 590<DT><CODE>bind-tty-special-chars</CODE>
84041b4c 591<DD><A NAME="IDX6"></A>
b585a9fa
EZ
592If set to <SAMP>`on'</SAMP>, Readline attempts to bind the control characters
593treated specially by the kernel's terminal driver to their Readline
594equivalents.
595<P>
596
597<DT><CODE>comment-begin</CODE>
598<DD><A NAME="IDX7"></A>
a44161c3
EZ
599The string to insert at the beginning of the line when the
600<CODE>insert-comment</CODE> command is executed. The default value
601is <CODE>"#"</CODE>.
84041b4c 602<P>
a44161c3
EZ
603
604<DT><CODE>completion-ignore-case</CODE>
84041b4c 605<DD>If set to <SAMP>`on'</SAMP>, Readline performs filename matching and completion
a44161c3
EZ
606in a case-insensitive fashion.
607The default value is <SAMP>`off'</SAMP>.
84041b4c 608<P>
a44161c3
EZ
609
610<DT><CODE>completion-query-items</CODE>
b585a9fa 611<DD><A NAME="IDX8"></A>
a44161c3 612The number of possible completions that determines when the user is
b585a9fa
EZ
613asked whether the list of possibilities should be displayed.
614If the number of possible completions is greater than this value,
a44161c3 615Readline will ask the user whether or not he wishes to view
84041b4c
EZ
616them; otherwise, they are simply listed.
617This variable must be set to an integer value greater than or equal to 0.
b585a9fa 618A negative value means Readline should never ask.
84041b4c
EZ
619The default limit is <CODE>100</CODE>.
620<P>
a44161c3
EZ
621
622<DT><CODE>convert-meta</CODE>
b585a9fa 623<DD><A NAME="IDX9"></A>
a44161c3
EZ
624If set to <SAMP>`on'</SAMP>, Readline will convert characters with the
625eighth bit set to an ASCII key sequence by stripping the eighth
f9267e15 626bit and prefixing an <KBD>ESC</KBD> character, converting them to a
a44161c3 627meta-prefixed key sequence. The default value is <SAMP>`on'</SAMP>.
84041b4c 628<P>
a44161c3
EZ
629
630<DT><CODE>disable-completion</CODE>
b585a9fa 631<DD><A NAME="IDX10"></A>
a44161c3
EZ
632If set to <SAMP>`On'</SAMP>, Readline will inhibit word completion.
633Completion characters will be inserted into the line as if they had
634been mapped to <CODE>self-insert</CODE>. The default is <SAMP>`off'</SAMP>.
84041b4c 635<P>
a44161c3
EZ
636
637<DT><CODE>editing-mode</CODE>
b585a9fa 638<DD><A NAME="IDX11"></A>
a44161c3
EZ
639The <CODE>editing-mode</CODE> variable controls which default set of
640key bindings is used. By default, Readline starts up in Emacs editing
641mode, where the keystrokes are most similar to Emacs. This variable can be
642set to either <SAMP>`emacs'</SAMP> or <SAMP>`vi'</SAMP>.
84041b4c 643<P>
a44161c3
EZ
644
645<DT><CODE>enable-keypad</CODE>
b585a9fa 646<DD><A NAME="IDX12"></A>
a44161c3
EZ
647When set to <SAMP>`on'</SAMP>, Readline will try to enable the application
648keypad when it is called. Some systems need this to enable the
649arrow keys. The default is <SAMP>`off'</SAMP>.
84041b4c 650<P>
a44161c3
EZ
651
652<DT><CODE>expand-tilde</CODE>
b585a9fa 653<DD><A NAME="IDX13"></A>
a44161c3
EZ
654If set to <SAMP>`on'</SAMP>, tilde expansion is performed when Readline
655attempts word completion. The default is <SAMP>`off'</SAMP>.
84041b4c
EZ
656<P>
657
b585a9fa
EZ
658<DT><CODE>history-preserve-point</CODE>
659<DD><A NAME="IDX14"></A>
84041b4c 660If set to <SAMP>`on'</SAMP>, the history code attempts to place point at the
b585a9fa
EZ
661same location on each history line retrieved with <CODE>previous-history</CODE>
662or <CODE>next-history</CODE>. The default is <SAMP>`off'</SAMP>.
663<P>
a44161c3
EZ
664
665<DT><CODE>horizontal-scroll-mode</CODE>
b585a9fa 666<DD><A NAME="IDX15"></A>
a44161c3
EZ
667This variable can be set to either <SAMP>`on'</SAMP> or <SAMP>`off'</SAMP>. Setting it
668to <SAMP>`on'</SAMP> means that the text of the lines being edited will scroll
669horizontally on a single screen line when they are longer than the width
670of the screen, instead of wrapping onto a new screen line. By default,
671this variable is set to <SAMP>`off'</SAMP>.
84041b4c 672<P>
a44161c3
EZ
673
674<DT><CODE>input-meta</CODE>
b585a9fa
EZ
675<DD><A NAME="IDX16"></A>
676<A NAME="IDX17"></A>
a44161c3 677If set to <SAMP>`on'</SAMP>, Readline will enable eight-bit input (it
84041b4c 678will not clear the eighth bit in the characters it reads),
a44161c3
EZ
679regardless of what the terminal claims it can support. The
680default value is <SAMP>`off'</SAMP>. The name <CODE>meta-flag</CODE> is a
681synonym for this variable.
84041b4c 682<P>
a44161c3
EZ
683
684<DT><CODE>isearch-terminators</CODE>
b585a9fa 685<DD><A NAME="IDX18"></A>
a44161c3 686The string of characters that should terminate an incremental search without
84041b4c 687subsequently executing the character as a command (see section <A HREF="readline.html#SEC8">1.2.5 Searching for Commands in the History</A>).
a44161c3
EZ
688If this variable has not been given a value, the characters <KBD>ESC</KBD> and
689<KBD>C-J</KBD> will terminate an incremental search.
84041b4c 690<P>
a44161c3
EZ
691
692<DT><CODE>keymap</CODE>
b585a9fa 693<DD><A NAME="IDX19"></A>
a44161c3
EZ
694Sets Readline's idea of the current keymap for key binding commands.
695Acceptable <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>,
84041b4c 701<CODE>vi-move</CODE>,
a44161c3
EZ
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
705equivalent to <CODE>emacs-standard</CODE>. The default value is <CODE>emacs</CODE>.
706The value of the <CODE>editing-mode</CODE> variable also affects the
707default keymap.
84041b4c 708<P>
a44161c3
EZ
709
710<DT><CODE>mark-directories</CODE>
84041b4c 711<DD>If set to <SAMP>`on'</SAMP>, completed directory names have a slash
a44161c3 712appended. The default is <SAMP>`on'</SAMP>.
84041b4c 713<P>
a44161c3
EZ
714
715<DT><CODE>mark-modified-lines</CODE>
b585a9fa 716<DD><A NAME="IDX20"></A>
a44161c3
EZ
717This variable, when set to <SAMP>`on'</SAMP>, causes Readline to display an
718asterisk (<SAMP>`*'</SAMP>) at the start of history lines which have been modified.
719This variable is <SAMP>`off'</SAMP> by default.
84041b4c
EZ
720<P>
721
722<DT><CODE>mark-symlinked-directories</CODE>
b585a9fa 723<DD><A NAME="IDX21"></A>
84041b4c
EZ
724If set to <SAMP>`on'</SAMP>, completed names which are symbolic links
725to directories have a slash appended (subject to the value of
726<CODE>mark-directories</CODE>).
727The default is <SAMP>`off'</SAMP>.
728<P>
729
730<DT><CODE>match-hidden-files</CODE>
b585a9fa 731<DD><A NAME="IDX22"></A>
84041b4c
EZ
732This variable, when set to <SAMP>`on'</SAMP>, causes Readline to match files whose
733names begin with a <SAMP>`.'</SAMP> (hidden files) when performing filename
734completion, unless the leading <SAMP>`.'</SAMP> is
735supplied by the user in the filename to be completed.
736This variable is <SAMP>`on'</SAMP> by default.
737<P>
a44161c3
EZ
738
739<DT><CODE>output-meta</CODE>
b585a9fa 740<DD><A NAME="IDX23"></A>
a44161c3
EZ
741If set to <SAMP>`on'</SAMP>, Readline will display characters with the
742eighth bit set directly rather than as a meta-prefixed escape
743sequence. The default is <SAMP>`off'</SAMP>.
84041b4c
EZ
744<P>
745
746<DT><CODE>page-completions</CODE>
b585a9fa 747<DD><A NAME="IDX24"></A>
84041b4c
EZ
748If set to <SAMP>`on'</SAMP>, Readline uses an internal <CODE>more</CODE>-like pager
749to display a screenful of possible completions at a time.
750This variable is <SAMP>`on'</SAMP> by default.
751<P>
a44161c3
EZ
752
753<DT><CODE>print-completions-horizontally</CODE>
84041b4c 754<DD>If set to <SAMP>`on'</SAMP>, Readline will display completions with matches
a44161c3
EZ
755sorted horizontally in alphabetical order, rather than down the screen.
756The default is <SAMP>`off'</SAMP>.
84041b4c 757<P>
a44161c3
EZ
758
759<DT><CODE>show-all-if-ambiguous</CODE>
b585a9fa 760<DD><A NAME="IDX25"></A>
a44161c3
EZ
761This alters the default behavior of the completion functions. If
762set to <SAMP>`on'</SAMP>,
763words which have more than one possible completion cause the
764matches to be listed immediately instead of ringing the bell.
765The default value is <SAMP>`off'</SAMP>.
84041b4c 766<P>
a44161c3 767
b585a9fa
EZ
768<DT><CODE>show-all-if-unmodified</CODE>
769<DD><A NAME="IDX26"></A>
770This alters the default behavior of the completion functions in
771a fashion similar to <VAR>show-all-if-ambiguous</VAR>.
772If set to <SAMP>`on'</SAMP>,
773words which have more than one possible completion without any
774possible partial completion (the possible completions don't share
775a common prefix) cause the matches to be listed immediately instead
776of ringing the bell.
777The default value is <SAMP>`off'</SAMP>.
778<P>
779
a44161c3 780<DT><CODE>visible-stats</CODE>
b585a9fa 781<DD><A NAME="IDX27"></A>
a44161c3
EZ
782If set to <SAMP>`on'</SAMP>, a character denoting a file's type
783is appended to the filename when listing possible
784completions. The default is <SAMP>`off'</SAMP>.
84041b4c 785<P>
a44161c3
EZ
786
787</DL>
84041b4c 788<P>
a44161c3
EZ
789
790<DT>Key Bindings
84041b4c 791<DD>The syntax for controlling key bindings in the init file is
f9267e15 792simple. First you need to find the name of the command that you
a44161c3
EZ
793want to change. The following sections contain tables of the command
794name, the default keybinding, if any, and a short description of what
795the command does.
84041b4c 796<P>
a44161c3 797
84041b4c
EZ
798Once you know the name of the command, simply place on a line
799in the init file the name of the key
a44161c3 800you wish to bind the command to, a colon, and then the name of the
84041b4c
EZ
801command. The name of the key
802can be expressed in different ways, depending on what you find most
803comfortable.
804</P><P>
a44161c3 805
84041b4c
EZ
806In addition to command names, readline allows keys to be bound
807to a string that is inserted when the key is pressed (a <VAR>macro</VAR>).
808</P><P>
a44161c3 809
84041b4c 810<DL COMPACT>
a44161c3 811<DT><VAR>keyname</VAR>: <VAR>function-name</VAR> or <VAR>macro</VAR>
84041b4c
EZ
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
a44161c3
EZ
814Meta-Rubout: backward-kill-word
815Control-o: "&#62; output"
84041b4c 816</pre></td></tr></table><P>
a44161c3
EZ
817
818In the above example, <KBD>C-u</KBD> is bound to the function
84041b4c
EZ
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
a44161c3
EZ
822expressed on the right hand side (that is, to insert the text
823<SAMP>`&#62; output'</SAMP> into the line).
84041b4c
EZ
824</P><P>
825
826A number of symbolic character names are recognized while
827processing 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>,
838and
839<VAR>TAB</VAR>.
840</P><P>
a44161c3
EZ
841
842<DT>"<VAR>keyseq</VAR>": <VAR>function-name</VAR> or <VAR>macro</VAR>
84041b4c 843<DD><VAR>keyseq</VAR> differs from <VAR>keyname</VAR> above in that strings
a44161c3
EZ
844denoting an entire key sequence can be specified, by placing
845the key sequence in double quotes. Some GNU Emacs style key
846escapes can be used, as in the following example, but the
847special character names are not recognized.
84041b4c 848<P>
a44161c3 849
84041b4c 850<TABLE><tr><td>&nbsp;</td><td class=example><pre>"\C-u": universal-argument
a44161c3
EZ
851"\C-x\C-r": re-read-init-file
852"\e[11~": "Function Key 1"
84041b4c 853</pre></td></tr></table></P><P>
a44161c3 854
84041b4c 855In the above example, <KBD>C-u</KBD> is again bound to the function
a44161c3
EZ
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>,
858and <SAMP>`<KBD>ESC</KBD> <KBD>[</KBD> <KBD>1</KBD> <KBD>1</KBD> <KBD>~</KBD>'</SAMP> is bound to insert
859the text <SAMP>`Function Key 1'</SAMP>.
84041b4c 860</P><P>
a44161c3
EZ
861
862</DL>
84041b4c 863<P>
a44161c3
EZ
864
865The following GNU Emacs style escape sequences are available when
866specifying key sequences:
84041b4c 867</P><P>
a44161c3
EZ
868
869<DL COMPACT>
a44161c3 870<DT><CODE><KBD>\C-</KBD></CODE>
84041b4c 871<DD>control prefix
a44161c3 872<DT><CODE><KBD>\M-</KBD></CODE>
84041b4c 873<DD>meta prefix
a44161c3 874<DT><CODE><KBD>\e</KBD></CODE>
84041b4c 875<DD>an escape character
a44161c3 876<DT><CODE><KBD>\\</KBD></CODE>
84041b4c 877<DD>backslash
a44161c3 878<DT><CODE><KBD>\"</KBD></CODE>
84041b4c 879<DD><KBD>"</KBD>, a double quotation mark
a44161c3 880<DT><CODE><KBD>\'</KBD></CODE>
84041b4c 881<DD><KBD>'</KBD>, a single quote or apostrophe
a44161c3 882</DL>
84041b4c 883<P>
a44161c3
EZ
884
885In addition to the GNU Emacs style escape sequences, a second
886set of backslash escapes is available:
84041b4c 887</P><P>
a44161c3
EZ
888
889<DL COMPACT>
a44161c3 890<DT><CODE>\a</CODE>
84041b4c 891<DD>alert (bell)
a44161c3 892<DT><CODE>\b</CODE>
84041b4c 893<DD>backspace
a44161c3 894<DT><CODE>\d</CODE>
84041b4c 895<DD>delete
a44161c3 896<DT><CODE>\f</CODE>
84041b4c 897<DD>form feed
a44161c3 898<DT><CODE>\n</CODE>
84041b4c 899<DD>newline
a44161c3 900<DT><CODE>\r</CODE>
84041b4c 901<DD>carriage return
a44161c3 902<DT><CODE>\t</CODE>
84041b4c 903<DD>horizontal tab
a44161c3 904<DT><CODE>\v</CODE>
84041b4c 905<DD>vertical tab
a44161c3 906<DT><CODE>\<VAR>nnn</VAR></CODE>
84041b4c 907<DD>the eight-bit character whose value is the octal value <VAR>nnn</VAR>
a44161c3 908(one to three digits)
84041b4c
EZ
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)
a44161c3 912</DL>
84041b4c 913<P>
a44161c3
EZ
914
915When entering the text of a macro, single or double quotes must
916be used to indicate a macro definition.
917Unquoted text is assumed to be a function name.
918In the macro body, the backslash escapes described above are expanded.
919Backslash will quote any other character in the macro text,
920including <SAMP>`"'</SAMP> and <SAMP>`''</SAMP>.
84041b4c 921For example, the following binding will make <SAMP>`<KBD>C-x</KBD> \'</SAMP>
a44161c3 922insert a single <SAMP>`\'</SAMP> into the line:
84041b4c
EZ
923<TABLE><tr><td>&nbsp;</td><td class=example><pre>"\C-x\\": "\\"
924</pre></td></tr></table></P><P>
a44161c3
EZ
925
926</DL>
84041b4c 927<P>
a44161c3 928
84041b4c
EZ
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>
b585a9fa 940<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 945<P>
84041b4c 946
a44161c3
EZ
947Readline implements a facility similar in spirit to the conditional
948compilation features of the C preprocessor which allows key
949bindings and variable settings to be performed as the result
950of tests. There are four parser directives used.
84041b4c 951</P><P>
a44161c3 952
a44161c3 953<DL COMPACT>
a44161c3 954<DT><CODE>$if</CODE>
84041b4c 955<DD>The <CODE>$if</CODE> construct allows bindings to be made based on the
a44161c3
EZ
956editing mode, the terminal being used, or the application using
957Readline. The text of the test extends to the end of the line;
958no characters are required to isolate it.
84041b4c 959<P>
a44161c3
EZ
960
961<DL COMPACT>
a44161c3 962<DT><CODE>mode</CODE>
84041b4c 963<DD>The <CODE>mode=</CODE> form of the <CODE>$if</CODE> directive is used to test
a44161c3
EZ
964whether Readline is in <CODE>emacs</CODE> or <CODE>vi</CODE> mode.
965This may be used in conjunction
966with the <SAMP>`set keymap'</SAMP> command, for instance, to set bindings in
967the <CODE>emacs-standard</CODE> and <CODE>emacs-ctlx</CODE> keymaps only if
968Readline is starting out in <CODE>emacs</CODE> mode.
84041b4c 969<P>
a44161c3
EZ
970
971<DT><CODE>term</CODE>
84041b4c 972<DD>The <CODE>term=</CODE> form may be used to include terminal-specific
a44161c3
EZ
973key bindings, perhaps to bind the key sequences output by the
974terminal'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
976the portion of the terminal name before the first <SAMP>`-'</SAMP>. This
977allows <CODE>sun</CODE> to match both <CODE>sun</CODE> and <CODE>sun-cmd</CODE>,
978for instance.
84041b4c 979<P>
a44161c3
EZ
980
981<DT><CODE>application</CODE>
84041b4c 982<DD>The <VAR>application</VAR> construct is used to include
a44161c3 983application-specific settings. Each program using the Readline
84041b4c
EZ
984library sets the <VAR>application name</VAR>, and you can test for
985a particular value.
a44161c3
EZ
986This could be used to bind key sequences to functions useful for
987a specific program. For instance, the following command adds a
988key sequence that quotes the current or previous word in Bash:
84041b4c 989<TABLE><tr><td>&nbsp;</td><td class=example><pre>$if Bash
a44161c3
EZ
990# Quote the current or previous word
991"\C-xq": "\eb\"\ef\""
992$endif
84041b4c
EZ
993</pre></td></tr></table></DL>
994<P>
a44161c3
EZ
995
996<DT><CODE>$endif</CODE>
84041b4c 997<DD>This command, as seen in the previous example, terminates an
a44161c3 998<CODE>$if</CODE> command.
84041b4c 999<P>
a44161c3
EZ
1000
1001<DT><CODE>$else</CODE>
84041b4c 1002<DD>Commands in this branch of the <CODE>$if</CODE> directive are executed if
a44161c3 1003the test fails.
84041b4c 1004<P>
a44161c3
EZ
1005
1006<DT><CODE>$include</CODE>
84041b4c 1007<DD>This directive takes a single filename as an argument and reads commands
a44161c3 1008and bindings from that file.
84041b4c
EZ
1009For 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>
b585a9fa 1025<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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
1032Here is an example of an <VAR>inputrc</VAR> file. This illustrates key
a44161c3 1033binding, variable assignment, and conditional syntax.
84041b4c 1034</P><P>
a44161c3 1035
84041b4c
EZ
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.
a44161c3
EZ
1039#
1040# You can re-read the inputrc file with C-x C-r.
1041# Lines beginning with '#' are comments.
1042#
84041b4c
EZ
1043# First, include any systemwide bindings and variable
1044# assignments from /etc/Inputrc
a44161c3
EZ
1045$include /etc/Inputrc
1046
1047#
1048# Set various bindings for emacs mode.
1049
1050set editing-mode emacs
1051
1052$if mode=emacs
1053
1054Meta-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
1085C-q: quoted-insert
1086
1087$endif
1088
1089# An old-style binding. This happens to be the default.
1090TAB: 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"
84041b4c
EZ
1096# prepare to type a quoted word --
1097# insert open and close double quotes
a44161c3
EZ
1098# and move to just after the open quote
1099"\C-x\"": "\"\"\C-b"
84041b4c
EZ
1100# insert a backslash (testing backslash escapes
1101# in sequences and macros)
a44161c3
EZ
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
1112set bell-style visible
1113
1114# don't strip characters to 7 bits when reading
1115set input-meta on
1116
84041b4c
EZ
1117# allow iso-latin1 characters to be inserted rather
1118# than converted to prefix-meta sequences
a44161c3
EZ
1119set convert-meta off
1120
84041b4c
EZ
1121# display characters with the eighth bit set directly
1122# rather than as meta-prefixed characters
a44161c3
EZ
1123set output-meta on
1124
84041b4c
EZ
1125# if there are more than 150 possible completions for
1126# a word, ask the user if he wants to see all of them
a44161c3
EZ
1127set 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
84041b4c
EZ
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>
b585a9fa 1148<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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>
a44161c3 1165<P>
84041b4c 1166
a44161c3
EZ
1167This section describes Readline commands that may be bound to key
1168sequences.
f9267e15 1169Command names without an accompanying key sequence are unbound by default.
84041b4c 1170</P><P>
a44161c3 1171
84041b4c
EZ
1172In the following descriptions, <EM>point</EM> refers to the current cursor
1173position, and <EM>mark</EM> refers to a cursor position saved by the
1174<CODE>set-mark</CODE> command.
1175The 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>
b585a9fa 1189<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 1194<DL COMPACT>
b585a9fa 1195<A NAME="IDX28"></A>
84041b4c 1196<DT><CODE>beginning-of-line (C-a)</CODE>
b585a9fa 1197<DD><A NAME="IDX29"></A>
a44161c3 1198Move to the start of the current line.
84041b4c 1199<P>
a44161c3 1200
b585a9fa 1201<A NAME="IDX30"></A>
a44161c3 1202<DT><CODE>end-of-line (C-e)</CODE>
b585a9fa 1203<DD><A NAME="IDX31"></A>
a44161c3 1204Move to the end of the line.
84041b4c 1205<P>
a44161c3 1206
b585a9fa 1207<A NAME="IDX32"></A>
a44161c3 1208<DT><CODE>forward-char (C-f)</CODE>
b585a9fa 1209<DD><A NAME="IDX33"></A>
a44161c3 1210Move forward a character.
84041b4c 1211<P>
a44161c3 1212
b585a9fa 1213<A NAME="IDX34"></A>
a44161c3 1214<DT><CODE>backward-char (C-b)</CODE>
b585a9fa 1215<DD><A NAME="IDX35"></A>
a44161c3 1216Move back a character.
84041b4c 1217<P>
a44161c3 1218
b585a9fa 1219<A NAME="IDX36"></A>
a44161c3 1220<DT><CODE>forward-word (M-f)</CODE>
b585a9fa 1221<DD><A NAME="IDX37"></A>
a44161c3
EZ
1222Move forward to the end of the next word. Words are composed of
1223letters and digits.
84041b4c 1224<P>
a44161c3 1225
b585a9fa 1226<A NAME="IDX38"></A>
a44161c3 1227<DT><CODE>backward-word (M-b)</CODE>
b585a9fa 1228<DD><A NAME="IDX39"></A>
f9267e15 1229Move back to the start of the current or previous word. Words are
a44161c3 1230composed of letters and digits.
84041b4c 1231<P>
a44161c3 1232
b585a9fa 1233<A NAME="IDX40"></A>
a44161c3 1234<DT><CODE>clear-screen (C-l)</CODE>
b585a9fa 1235<DD><A NAME="IDX41"></A>
a44161c3
EZ
1236Clear the screen and redraw the current line,
1237leaving the current line at the top of the screen.
84041b4c 1238<P>
a44161c3 1239
b585a9fa 1240<A NAME="IDX42"></A>
a44161c3 1241<DT><CODE>redraw-current-line ()</CODE>
b585a9fa 1242<DD><A NAME="IDX43"></A>
a44161c3 1243Refresh the current line. By default, this is unbound.
84041b4c 1244<P>
a44161c3
EZ
1245
1246</DL>
84041b4c 1247<P>
a44161c3 1248
84041b4c
EZ
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>
b585a9fa 1260<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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>
a44161c3
EZ
1266
1267<DL COMPACT>
b585a9fa 1268<A NAME="IDX44"></A>
84041b4c 1269<DT><CODE>accept-line (Newline or Return)</CODE>
b585a9fa 1270<DD><A NAME="IDX45"></A>
84041b4c
EZ
1271Accept the line regardless of where the cursor is.
1272If this line is
1273non-empty, it may be added to the history list for future recall with
1274<CODE>add_history()</CODE>.
1275If this line is a modified history line, the history line is restored
1276to its original state.
1277<P>
a44161c3 1278
b585a9fa 1279<A NAME="IDX46"></A>
a44161c3 1280<DT><CODE>previous-history (C-p)</CODE>
b585a9fa 1281<DD><A NAME="IDX47"></A>
84041b4c
EZ
1282Move `back' through the history list, fetching the previous command.
1283<P>
a44161c3 1284
b585a9fa 1285<A NAME="IDX48"></A>
a44161c3 1286<DT><CODE>next-history (C-n)</CODE>
b585a9fa 1287<DD><A NAME="IDX49"></A>
84041b4c
EZ
1288Move `forward' through the history list, fetching the next command.
1289<P>
a44161c3 1290
b585a9fa 1291<A NAME="IDX50"></A>
a44161c3 1292<DT><CODE>beginning-of-history (M-&#60;)</CODE>
b585a9fa 1293<DD><A NAME="IDX51"></A>
a44161c3 1294Move to the first line in the history.
84041b4c 1295<P>
a44161c3 1296
b585a9fa 1297<A NAME="IDX52"></A>
a44161c3 1298<DT><CODE>end-of-history (M-&#62;)</CODE>
b585a9fa 1299<DD><A NAME="IDX53"></A>
a44161c3
EZ
1300Move to the end of the input history, i.e., the line currently
1301being entered.
84041b4c 1302<P>
a44161c3 1303
b585a9fa 1304<A NAME="IDX54"></A>
a44161c3 1305<DT><CODE>reverse-search-history (C-r)</CODE>
b585a9fa 1306<DD><A NAME="IDX55"></A>
a44161c3
EZ
1307Search backward starting at the current line and moving `up' through
1308the history as necessary. This is an incremental search.
84041b4c 1309<P>
a44161c3 1310
b585a9fa 1311<A NAME="IDX56"></A>
a44161c3 1312<DT><CODE>forward-search-history (C-s)</CODE>
b585a9fa 1313<DD><A NAME="IDX57"></A>
a44161c3
EZ
1314Search forward starting at the current line and moving `down' through
1315the the history as necessary. This is an incremental search.
84041b4c 1316<P>
a44161c3 1317
b585a9fa 1318<A NAME="IDX58"></A>
a44161c3 1319<DT><CODE>non-incremental-reverse-search-history (M-p)</CODE>
b585a9fa 1320<DD><A NAME="IDX59"></A>
a44161c3
EZ
1321Search backward starting at the current line and moving `up'
1322through the history as necessary using a non-incremental search
1323for a string supplied by the user.
84041b4c 1324<P>
a44161c3 1325
b585a9fa 1326<A NAME="IDX60"></A>
a44161c3 1327<DT><CODE>non-incremental-forward-search-history (M-n)</CODE>
b585a9fa 1328<DD><A NAME="IDX61"></A>
a44161c3
EZ
1329Search forward starting at the current line and moving `down'
1330through the the history as necessary using a non-incremental search
1331for a string supplied by the user.
84041b4c 1332<P>
a44161c3 1333
b585a9fa 1334<A NAME="IDX62"></A>
a44161c3 1335<DT><CODE>history-search-forward ()</CODE>
b585a9fa 1336<DD><A NAME="IDX63"></A>
a44161c3 1337Search forward through the history for the string of characters
f9267e15
EZ
1338between the start of the current line and the point.
1339This is a non-incremental search.
1340By default, this command is unbound.
84041b4c 1341<P>
a44161c3 1342
b585a9fa 1343<A NAME="IDX64"></A>
a44161c3 1344<DT><CODE>history-search-backward ()</CODE>
b585a9fa 1345<DD><A NAME="IDX65"></A>
a44161c3
EZ
1346Search backward through the history for the string of characters
1347between the start of the current line and the point. This
1348is a non-incremental search. By default, this command is unbound.
84041b4c 1349<P>
a44161c3 1350
b585a9fa 1351<A NAME="IDX66"></A>
a44161c3 1352<DT><CODE>yank-nth-arg (M-C-y)</CODE>
b585a9fa 1353<DD><A NAME="IDX67"></A>
a44161c3 1354Insert the first argument to the previous command (usually
84041b4c
EZ
1355the second word on the previous line) at point.
1356With an argument <VAR>n</VAR>,
a44161c3
EZ
1357insert the <VAR>n</VAR>th word from the previous command (the words
1358in the previous command begin with word 0). A negative argument
1359inserts the <VAR>n</VAR>th word from the end of the previous command.
b585a9fa
EZ
1360Once the argument <VAR>n</VAR> is computed, the argument is extracted
1361as if the <SAMP>`!<VAR>n</VAR>'</SAMP> history expansion had been specified.
84041b4c 1362<P>
a44161c3 1363
b585a9fa 1364<A NAME="IDX68"></A>
84041b4c 1365<DT><CODE>yank-last-arg (M-. or M-_)</CODE>
b585a9fa 1366<DD><A NAME="IDX69"></A>
a44161c3
EZ
1367Insert last argument to the previous command (the last word of the
1368previous history entry). With an
1369argument, behave exactly like <CODE>yank-nth-arg</CODE>.
1370Successive calls to <CODE>yank-last-arg</CODE> move back through the history
1371list, inserting the last argument of each line in turn.
b585a9fa
EZ
1372The history expansion facilities are used to extract the last argument,
1373as if the <SAMP>`!$'</SAMP> history expansion had been specified.
84041b4c 1374<P>
a44161c3
EZ
1375
1376</DL>
84041b4c 1377<P>
a44161c3 1378
84041b4c
EZ
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>
b585a9fa 1390<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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>
a44161c3
EZ
1396
1397<DL COMPACT>
b585a9fa 1398<A NAME="IDX70"></A>
a44161c3 1399<DT><CODE>delete-char (C-d)</CODE>
b585a9fa 1400<DD><A NAME="IDX71"></A>
84041b4c 1401Delete the character at point. If point is at the
a44161c3
EZ
1402beginning of the line, there are no characters in the line, and
1403the last character typed was not bound to <CODE>delete-char</CODE>, then
84041b4c
EZ
1404return EOF.
1405<P>
a44161c3 1406
b585a9fa 1407<A NAME="IDX72"></A>
a44161c3 1408<DT><CODE>backward-delete-char (Rubout)</CODE>
b585a9fa 1409<DD><A NAME="IDX73"></A>
a44161c3
EZ
1410Delete the character behind the cursor. A numeric argument means
1411to kill the characters instead of deleting them.
84041b4c 1412<P>
a44161c3 1413
b585a9fa 1414<A NAME="IDX74"></A>
a44161c3 1415<DT><CODE>forward-backward-delete-char ()</CODE>
b585a9fa 1416<DD><A NAME="IDX75"></A>
a44161c3
EZ
1417Delete the character under the cursor, unless the cursor is at the
1418end of the line, in which case the character behind the cursor is
1419deleted. By default, this is not bound to a key.
84041b4c 1420<P>
a44161c3 1421
b585a9fa 1422<A NAME="IDX76"></A>
84041b4c 1423<DT><CODE>quoted-insert (C-q or C-v)</CODE>
b585a9fa 1424<DD><A NAME="IDX77"></A>
a44161c3
EZ
1425Add the next character typed to the line verbatim. This is
1426how to insert key sequences like <KBD>C-q</KBD>, for example.
84041b4c 1427<P>
a44161c3 1428
b585a9fa 1429<A NAME="IDX78"></A>
84041b4c 1430<DT><CODE>tab-insert (M-<KBD>TAB</KBD>)</CODE>
b585a9fa 1431<DD><A NAME="IDX79"></A>
a44161c3 1432Insert a tab character.
84041b4c 1433<P>
a44161c3 1434
b585a9fa 1435<A NAME="IDX80"></A>
84041b4c 1436<DT><CODE>self-insert (a, b, A, 1, !, <small>...</small>)</CODE>
b585a9fa 1437<DD><A NAME="IDX81"></A>
a44161c3 1438Insert yourself.
84041b4c 1439<P>
a44161c3 1440
b585a9fa 1441<A NAME="IDX82"></A>
a44161c3 1442<DT><CODE>transpose-chars (C-t)</CODE>
b585a9fa 1443<DD><A NAME="IDX83"></A>
a44161c3
EZ
1444Drag the character before the cursor forward over
1445the character at the cursor, moving the
1446cursor forward as well. If the insertion point
1447is at the end of the line, then this
1448transposes the last two characters of the line.
f9267e15 1449Negative arguments have no effect.
84041b4c 1450<P>
a44161c3 1451
b585a9fa 1452<A NAME="IDX84"></A>
a44161c3 1453<DT><CODE>transpose-words (M-t)</CODE>
b585a9fa 1454<DD><A NAME="IDX85"></A>
f9267e15
EZ
1455Drag the word before point past the word after point,
1456moving point past that word as well.
84041b4c
EZ
1457If the insertion point is at the end of the line, this transposes
1458the last two words on the line.
1459<P>
a44161c3 1460
b585a9fa 1461<A NAME="IDX86"></A>
a44161c3 1462<DT><CODE>upcase-word (M-u)</CODE>
b585a9fa 1463<DD><A NAME="IDX87"></A>
a44161c3
EZ
1464Uppercase the current (or following) word. With a negative argument,
1465uppercase the previous word, but do not move the cursor.
84041b4c 1466<P>
a44161c3 1467
b585a9fa 1468<A NAME="IDX88"></A>
a44161c3 1469<DT><CODE>downcase-word (M-l)</CODE>
b585a9fa 1470<DD><A NAME="IDX89"></A>
a44161c3
EZ
1471Lowercase the current (or following) word. With a negative argument,
1472lowercase the previous word, but do not move the cursor.
84041b4c 1473<P>
a44161c3 1474
b585a9fa 1475<A NAME="IDX90"></A>
a44161c3 1476<DT><CODE>capitalize-word (M-c)</CODE>
b585a9fa 1477<DD><A NAME="IDX91"></A>
a44161c3
EZ
1478Capitalize the current (or following) word. With a negative argument,
1479capitalize the previous word, but do not move the cursor.
84041b4c 1480<P>
a44161c3 1481
b585a9fa 1482<A NAME="IDX92"></A>
84041b4c 1483<DT><CODE>overwrite-mode ()</CODE>
b585a9fa 1484<DD><A NAME="IDX93"></A>
84041b4c
EZ
1485Toggle overwrite mode. With an explicit positive numeric argument,
1486switches to overwrite mode. With an explicit non-positive numeric
1487argument, switches to insert mode. This command affects only
1488<CODE>emacs</CODE> mode; <CODE>vi</CODE> mode does overwrite differently.
1489Each call to <CODE>readline()</CODE> starts in insert mode.
1490<P>
a44161c3 1491
84041b4c
EZ
1492In overwrite mode, characters bound to <CODE>self-insert</CODE> replace
1493the text at point rather than pushing the text to the right.
1494Characters bound to <CODE>backward-delete-char</CODE> replace the character
1495before point with a space.
1496</P><P>
a44161c3 1497
84041b4c
EZ
1498By default, this command is unbound.
1499</P><P>
a44161c3 1500
84041b4c
EZ
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>
b585a9fa 1515<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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>
a44161c3
EZ
1521
1522<DL COMPACT>
1523
b585a9fa 1524<A NAME="IDX94"></A>
a44161c3 1525<DT><CODE>kill-line (C-k)</CODE>
b585a9fa 1526<DD><A NAME="IDX95"></A>
f9267e15 1527Kill the text from point to the end of the line.
84041b4c 1528<P>
a44161c3 1529
b585a9fa 1530<A NAME="IDX96"></A>
a44161c3 1531<DT><CODE>backward-kill-line (C-x Rubout)</CODE>
b585a9fa 1532<DD><A NAME="IDX97"></A>
a44161c3 1533Kill backward to the beginning of the line.
84041b4c 1534<P>
a44161c3 1535
b585a9fa 1536<A NAME="IDX98"></A>
a44161c3 1537<DT><CODE>unix-line-discard (C-u)</CODE>
b585a9fa 1538<DD><A NAME="IDX99"></A>
a44161c3 1539Kill backward from the cursor to the beginning of the current line.
84041b4c 1540<P>
a44161c3 1541
b585a9fa 1542<A NAME="IDX100"></A>
a44161c3 1543<DT><CODE>kill-whole-line ()</CODE>
b585a9fa 1544<DD><A NAME="IDX101"></A>
84041b4c 1545Kill all characters on the current line, no matter where point is.
f9267e15 1546By default, this is unbound.
84041b4c 1547<P>
a44161c3 1548
b585a9fa 1549<A NAME="IDX102"></A>
a44161c3 1550<DT><CODE>kill-word (M-d)</CODE>
b585a9fa 1551<DD><A NAME="IDX103"></A>
f9267e15
EZ
1552Kill from point to the end of the current word, or if between
1553words, to the end of the next word.
1554Word boundaries are the same as <CODE>forward-word</CODE>.
84041b4c 1555<P>
a44161c3 1556
b585a9fa 1557<A NAME="IDX104"></A>
84041b4c 1558<DT><CODE>backward-kill-word (M-<KBD>DEL</KBD>)</CODE>
b585a9fa 1559<DD><A NAME="IDX105"></A>
f9267e15
EZ
1560Kill the word behind point.
1561Word boundaries are the same as <CODE>backward-word</CODE>.
84041b4c 1562<P>
a44161c3 1563
b585a9fa 1564<A NAME="IDX106"></A>
a44161c3 1565<DT><CODE>unix-word-rubout (C-w)</CODE>
b585a9fa 1566<DD><A NAME="IDX107"></A>
f9267e15
EZ
1567Kill the word behind point, using white space as a word boundary.
1568The killed text is saved on the kill-ring.
84041b4c 1569<P>
a44161c3 1570
b585a9fa
EZ
1571<A NAME="IDX108"></A>
1572<DT><CODE>unix-filename-rubout ()</CODE>
1573<DD><A NAME="IDX109"></A>
1574Kill the word behind point, using white space and the slash character
1575as the word boundaries.
1576The killed text is saved on the kill-ring.
1577<P>
1578
1579<A NAME="IDX110"></A>
a44161c3 1580<DT><CODE>delete-horizontal-space ()</CODE>
b585a9fa 1581<DD><A NAME="IDX111"></A>
a44161c3 1582Delete all spaces and tabs around point. By default, this is unbound.
84041b4c 1583<P>
a44161c3 1584
b585a9fa 1585<A NAME="IDX112"></A>
a44161c3 1586<DT><CODE>kill-region ()</CODE>
b585a9fa 1587<DD><A NAME="IDX113"></A>
f9267e15 1588Kill the text in the current region.
a44161c3 1589By default, this command is unbound.
84041b4c 1590<P>
a44161c3 1591
b585a9fa 1592<A NAME="IDX114"></A>
a44161c3 1593<DT><CODE>copy-region-as-kill ()</CODE>
b585a9fa 1594<DD><A NAME="IDX115"></A>
a44161c3
EZ
1595Copy the text in the region to the kill buffer, so it can be yanked
1596right away. By default, this command is unbound.
84041b4c 1597<P>
a44161c3 1598
b585a9fa 1599<A NAME="IDX116"></A>
a44161c3 1600<DT><CODE>copy-backward-word ()</CODE>
b585a9fa 1601<DD><A NAME="IDX117"></A>
a44161c3
EZ
1602Copy the word before point to the kill buffer.
1603The word boundaries are the same as <CODE>backward-word</CODE>.
1604By default, this command is unbound.
84041b4c 1605<P>
a44161c3 1606
b585a9fa 1607<A NAME="IDX118"></A>
a44161c3 1608<DT><CODE>copy-forward-word ()</CODE>
b585a9fa 1609<DD><A NAME="IDX119"></A>
a44161c3
EZ
1610Copy the word following point to the kill buffer.
1611The word boundaries are the same as <CODE>forward-word</CODE>.
1612By default, this command is unbound.
84041b4c 1613<P>
a44161c3 1614
b585a9fa 1615<A NAME="IDX120"></A>
a44161c3 1616<DT><CODE>yank (C-y)</CODE>
b585a9fa 1617<DD><A NAME="IDX121"></A>
84041b4c
EZ
1618Yank the top of the kill ring into the buffer at point.
1619<P>
a44161c3 1620
b585a9fa 1621<A NAME="IDX122"></A>
a44161c3 1622<DT><CODE>yank-pop (M-y)</CODE>
b585a9fa 1623<DD><A NAME="IDX123"></A>
a44161c3 1624Rotate the kill-ring, and yank the new top. You can only do this if
84041b4c
EZ
1625the 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>
b585a9fa 1640<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3
EZ
1645<DL COMPACT>
1646
b585a9fa 1647<A NAME="IDX124"></A>
84041b4c 1648<DT><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, <small>...</small> <KBD>M--</KBD>)</CODE>
b585a9fa 1649<DD><A NAME="IDX125"></A>
a44161c3
EZ
1650Add this digit to the argument already accumulating, or start a new
1651argument. <KBD>M--</KBD> starts a negative argument.
84041b4c 1652<P>
a44161c3 1653
b585a9fa 1654<A NAME="IDX126"></A>
a44161c3 1655<DT><CODE>universal-argument ()</CODE>
b585a9fa 1656<DD><A NAME="IDX127"></A>
a44161c3
EZ
1657This is another way to specify an argument.
1658If this command is followed by one or more digits, optionally with a
1659leading minus sign, those digits define the argument.
1660If the command is followed by digits, executing <CODE>universal-argument</CODE>
1661again ends the numeric argument, but is otherwise ignored.
1662As a special case, if this command is immediately followed by a
1663character that is neither a digit or minus sign, the argument count
1664for the next command is multiplied by four.
1665The argument count is initially one, so executing this function the
1666first time makes the argument count four, a second time makes the
1667argument count sixteen, and so on.
1668By default, this is not bound to a key.
1669</DL>
84041b4c 1670<P>
a44161c3 1671
84041b4c
EZ
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>
b585a9fa 1683<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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>
a44161c3
EZ
1689
1690<DL COMPACT>
b585a9fa 1691<A NAME="IDX128"></A>
84041b4c 1692<DT><CODE>complete (<KBD>TAB</KBD>)</CODE>
b585a9fa 1693<DD><A NAME="IDX129"></A>
84041b4c
EZ
1694Attempt to perform completion on the text before point.
1695The actual completion performed is application-specific.
1696The default is filename completion.
1697<P>
a44161c3 1698
b585a9fa 1699<A NAME="IDX130"></A>
a44161c3 1700<DT><CODE>possible-completions (M-?)</CODE>
b585a9fa 1701<DD><A NAME="IDX131"></A>
84041b4c
EZ
1702List the possible completions of the text before point.
1703<P>
a44161c3 1704
b585a9fa 1705<A NAME="IDX132"></A>
a44161c3 1706<DT><CODE>insert-completions (M-*)</CODE>
b585a9fa 1707<DD><A NAME="IDX133"></A>
a44161c3
EZ
1708Insert all completions of the text before point that would have
1709been generated by <CODE>possible-completions</CODE>.
84041b4c 1710<P>
a44161c3 1711
b585a9fa 1712<A NAME="IDX134"></A>
a44161c3 1713<DT><CODE>menu-complete ()</CODE>
b585a9fa 1714<DD><A NAME="IDX135"></A>
a44161c3
EZ
1715Similar to <CODE>complete</CODE>, but replaces the word to be completed
1716with a single match from the list of possible completions.
1717Repeated execution of <CODE>menu-complete</CODE> steps through the list
1718of possible completions, inserting each match in turn.
84041b4c
EZ
1719At the end of the list of completions, the bell is rung
1720(subject to the setting of <CODE>bell-style</CODE>)
1721and the original text is restored.
a44161c3
EZ
1722An argument of <VAR>n</VAR> moves <VAR>n</VAR> positions forward in the list
1723of matches; a negative argument may be used to move backward
1724through the list.
84041b4c 1725This command is intended to be bound to <KBD>TAB</KBD>, but is unbound
a44161c3 1726by default.
84041b4c 1727<P>
a44161c3 1728
b585a9fa 1729<A NAME="IDX136"></A>
a44161c3 1730<DT><CODE>delete-char-or-list ()</CODE>
b585a9fa 1731<DD><A NAME="IDX137"></A>
a44161c3
EZ
1732Deletes the character under the cursor if not at the beginning or
1733end of the line (like <CODE>delete-char</CODE>).
1734If at the end of the line, behaves identically to
1735<CODE>possible-completions</CODE>.
1736This command is unbound by default.
84041b4c 1737<P>
a44161c3
EZ
1738
1739</DL>
84041b4c 1740<P>
a44161c3 1741
84041b4c
EZ
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>
b585a9fa 1753<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3
EZ
1758<DL COMPACT>
1759
b585a9fa 1760<A NAME="IDX138"></A>
a44161c3 1761<DT><CODE>start-kbd-macro (C-x ()</CODE>
b585a9fa 1762<DD><A NAME="IDX139"></A>
a44161c3 1763Begin saving the characters typed into the current keyboard macro.
84041b4c 1764<P>
a44161c3 1765
b585a9fa 1766<A NAME="IDX140"></A>
a44161c3 1767<DT><CODE>end-kbd-macro (C-x ))</CODE>
b585a9fa 1768<DD><A NAME="IDX141"></A>
a44161c3
EZ
1769Stop saving the characters typed into the current keyboard macro
1770and save the definition.
84041b4c 1771<P>
a44161c3 1772
b585a9fa 1773<A NAME="IDX142"></A>
a44161c3 1774<DT><CODE>call-last-kbd-macro (C-x e)</CODE>
b585a9fa 1775<DD><A NAME="IDX143"></A>
a44161c3
EZ
1776Re-execute the last keyboard macro defined, by making the characters
1777in the macro appear as if typed at the keyboard.
84041b4c 1778<P>
a44161c3
EZ
1779
1780</DL>
84041b4c 1781<P>
a44161c3 1782
84041b4c
EZ
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>
b585a9fa 1794<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3
EZ
1799<DL COMPACT>
1800
b585a9fa 1801<A NAME="IDX144"></A>
a44161c3 1802<DT><CODE>re-read-init-file (C-x C-r)</CODE>
b585a9fa 1803<DD><A NAME="IDX145"></A>
f9267e15 1804Read in the contents of the <VAR>inputrc</VAR> file, and incorporate
a44161c3 1805any bindings or variable assignments found there.
84041b4c 1806<P>
a44161c3 1807
b585a9fa 1808<A NAME="IDX146"></A>
a44161c3 1809<DT><CODE>abort (C-g)</CODE>
b585a9fa 1810<DD><A NAME="IDX147"></A>
a44161c3
EZ
1811Abort the current editing command and
1812ring the terminal's bell (subject to the setting of
1813<CODE>bell-style</CODE>).
84041b4c 1814<P>
a44161c3 1815
b585a9fa 1816<A NAME="IDX148"></A>
84041b4c 1817<DT><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, <small>...</small>)</CODE>
b585a9fa 1818<DD><A NAME="IDX149"></A>
a44161c3
EZ
1819If the metafied character <VAR>x</VAR> is lowercase, run the command
1820that is bound to the corresponding uppercase character.
84041b4c 1821<P>
a44161c3 1822
b585a9fa 1823<A NAME="IDX150"></A>
84041b4c 1824<DT><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE>
b585a9fa 1825<DD><A NAME="IDX151"></A>
84041b4c
EZ
1826Metafy the next character typed. This is for keyboards
1827without a meta key. Typing <SAMP>`<KBD>ESC</KBD> f'</SAMP> is equivalent to typing
1828<KBD>M-f</KBD>.
1829<P>
a44161c3 1830
b585a9fa 1831<A NAME="IDX152"></A>
84041b4c 1832<DT><CODE>undo (C-_ or C-x C-u)</CODE>
b585a9fa 1833<DD><A NAME="IDX153"></A>
a44161c3 1834Incremental undo, separately remembered for each line.
84041b4c 1835<P>
a44161c3 1836
b585a9fa 1837<A NAME="IDX154"></A>
a44161c3 1838<DT><CODE>revert-line (M-r)</CODE>
b585a9fa 1839<DD><A NAME="IDX155"></A>
a44161c3
EZ
1840Undo all changes made to this line. This is like executing the <CODE>undo</CODE>
1841command enough times to get back to the beginning.
84041b4c 1842<P>
a44161c3 1843
b585a9fa 1844<A NAME="IDX156"></A>
a44161c3 1845<DT><CODE>tilde-expand (M-~)</CODE>
b585a9fa 1846<DD><A NAME="IDX157"></A>
a44161c3 1847Perform tilde expansion on the current word.
84041b4c 1848<P>
a44161c3 1849
b585a9fa 1850<A NAME="IDX158"></A>
a44161c3 1851<DT><CODE>set-mark (C-@)</CODE>
b585a9fa 1852<DD><A NAME="IDX159"></A>
84041b4c 1853Set the mark to the point. If a
a44161c3 1854numeric argument is supplied, the mark is set to that position.
84041b4c 1855<P>
a44161c3 1856
b585a9fa 1857<A NAME="IDX160"></A>
a44161c3 1858<DT><CODE>exchange-point-and-mark (C-x C-x)</CODE>
b585a9fa 1859<DD><A NAME="IDX161"></A>
a44161c3
EZ
1860Swap the point with the mark. The current cursor position is set to
1861the saved position, and the old cursor position is saved as the mark.
84041b4c 1862<P>
a44161c3 1863
b585a9fa 1864<A NAME="IDX162"></A>
a44161c3 1865<DT><CODE>character-search (C-])</CODE>
b585a9fa 1866<DD><A NAME="IDX163"></A>
a44161c3
EZ
1867A character is read and point is moved to the next occurrence of that
1868character. A negative count searches for previous occurrences.
84041b4c 1869<P>
a44161c3 1870
b585a9fa 1871<A NAME="IDX164"></A>
a44161c3 1872<DT><CODE>character-search-backward (M-C-])</CODE>
b585a9fa 1873<DD><A NAME="IDX165"></A>
a44161c3
EZ
1874A character is read and point is moved to the previous occurrence
1875of that character. A negative count searches for subsequent
1876occurrences.
84041b4c 1877<P>
a44161c3 1878
b585a9fa 1879<A NAME="IDX166"></A>
a44161c3 1880<DT><CODE>insert-comment (M-#)</CODE>
b585a9fa 1881<DD><A NAME="IDX167"></A>
84041b4c
EZ
1882Without a numeric argument, the value of the <CODE>comment-begin</CODE>
1883variable is inserted at the beginning of the current line.
1884If a numeric argument is supplied, this command acts as a toggle: if
1885the characters at the beginning of the line do not match the value
1886of <CODE>comment-begin</CODE>, the value is inserted, otherwise
1887the characters in <CODE>comment-begin</CODE> are deleted from the beginning of
1888the line.
1889In either case, the line is accepted as if a newline had been typed.
1890<P>
a44161c3 1891
b585a9fa 1892<A NAME="IDX168"></A>
a44161c3 1893<DT><CODE>dump-functions ()</CODE>
b585a9fa 1894<DD><A NAME="IDX169"></A>
a44161c3
EZ
1895Print all of the functions and their key bindings to the
1896Readline output stream. If a numeric argument is supplied,
1897the output is formatted in such a way that it can be made part
1898of an <VAR>inputrc</VAR> file. This command is unbound by default.
84041b4c 1899<P>
a44161c3 1900
b585a9fa 1901<A NAME="IDX170"></A>
a44161c3 1902<DT><CODE>dump-variables ()</CODE>
b585a9fa 1903<DD><A NAME="IDX171"></A>
a44161c3
EZ
1904Print all of the settable variables and their values to the
1905Readline output stream. If a numeric argument is supplied,
1906the output is formatted in such a way that it can be made part
1907of an <VAR>inputrc</VAR> file. This command is unbound by default.
84041b4c 1908<P>
a44161c3 1909
b585a9fa 1910<A NAME="IDX172"></A>
a44161c3 1911<DT><CODE>dump-macros ()</CODE>
b585a9fa 1912<DD><A NAME="IDX173"></A>
a44161c3 1913Print all of the Readline key sequences bound to macros and the
84041b4c 1914strings they output. If a numeric argument is supplied,
a44161c3
EZ
1915the output is formatted in such a way that it can be made part
1916of an <VAR>inputrc</VAR> file. This command is unbound by default.
84041b4c 1917<P>
a44161c3 1918
b585a9fa 1919<A NAME="IDX174"></A>
84041b4c 1920<DT><CODE>emacs-editing-mode (C-e)</CODE>
b585a9fa 1921<DD><A NAME="IDX175"></A>
84041b4c
EZ
1922When in <CODE>vi</CODE> command mode, this causes a switch to <CODE>emacs</CODE>
1923editing mode.
1924<P>
a44161c3 1925
b585a9fa 1926<A NAME="IDX176"></A>
84041b4c 1927<DT><CODE>vi-editing-mode (M-C-j)</CODE>
b585a9fa 1928<DD><A NAME="IDX177"></A>
84041b4c
EZ
1929When in <CODE>emacs</CODE> editing mode, this causes a switch to <CODE>vi</CODE>
1930editing mode.
1931<P>
a44161c3 1932
84041b4c
EZ
1933</DL>
1934<P>
a44161c3 1935
84041b4c
EZ
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>
b585a9fa 1947<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 1952<P>
84041b4c 1953
a44161c3
EZ
1954While the Readline library does not have a full set of <CODE>vi</CODE>
1955editing functions, it does contain enough to allow simple editing
1956of the line. The Readline <CODE>vi</CODE> mode behaves as specified in
1957the POSIX 1003.2 standard.
84041b4c 1958</P><P>
a44161c3 1959
a44161c3 1960In order to switch interactively between <CODE>emacs</CODE> and <CODE>vi</CODE>
84041b4c
EZ
1961editing modes, use the command <KBD>M-C-j</KBD> (bound to emacs-editing-mode
1962when in <CODE>vi</CODE> mode and to vi-editing-mode in <CODE>emacs</CODE> mode).
a44161c3 1963The Readline default is <CODE>emacs</CODE> mode.
84041b4c 1964</P><P>
a44161c3 1965
a44161c3
EZ
1966When 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>
1968switches you into `command' mode, where you can edit the text of the
1969line with the standard <CODE>vi</CODE> movement keys, move to previous
1970history lines with <SAMP>`k'</SAMP> and subsequent lines with <SAMP>`j'</SAMP>, and
1971so forth.
84041b4c 1972</P><P>
a44161c3 1973
84041b4c 1974This document describes the GNU Readline Library, a utility for aiding
b585a9fa 1975in the consistency of user interface across discrete programs that need
84041b4c
EZ
1976to provide a command line interface.
1977</P><P>
a44161c3 1978
b585a9fa 1979Copyright (C) 1988-2005 Free Software Foundation, Inc.
84041b4c 1980</P><P>
a44161c3 1981
84041b4c
EZ
1982Permission is granted to make and distribute verbatim copies of
1983this manual provided the copyright notice and this permission notice
1984pare preserved on all copies.
1985</P><P>
a44161c3 1986
84041b4c
EZ
1987Permission is granted to copy and distribute modified versions of this
1988manual under the conditions for verbatim copying, provided that the entire
1989resulting derived work is distributed under the terms of a permission
1990notice identical to this one.
1991</P><P>
a44161c3 1992
84041b4c
EZ
1993Permission is granted to copy and distribute translations of this manual
1994into another language, under the above conditions for modified versions,
1995except that this permission notice may be stated in a translation approved
1996by 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>
b585a9fa 2007<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
84041b4c
EZ
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>
b585a9fa 2010<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 2015<P>
84041b4c 2016
a44161c3
EZ
2017This chapter describes the interface between the GNU Readline Library and
2018other programs. If you are a programmer, and you wish to include the
2019features found in GNU Readline
2020such as completion, line editing, and interactive history manipulation
2021in your own programs, this section is for you.
84041b4c
EZ
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
a44161c3 2030 aid in writing your own custom
84041b4c
EZ
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>
b585a9fa 2046<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
84041b4c
EZ
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>
b585a9fa 2049<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 2054<P>
84041b4c 2055
a44161c3
EZ
2056Many 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
2058Readline is sufficient. This section describes how to use Readline in
2059the simplest way possible, perhaps to replace calls in your code to
84041b4c
EZ
2060<CODE>gets()</CODE> or <CODE>fgets()</CODE>.
2061</P><P>
a44161c3 2062
b585a9fa
EZ
2063<A NAME="IDX178"></A>
2064<A NAME="IDX179"></A>
84041b4c 2065</P><P>
a44161c3 2066
84041b4c
EZ
2067The function <CODE>readline()</CODE> prints a prompt <VAR>prompt</VAR>
2068and then reads and returns a single line of text from the user.
2069If <VAR>prompt</VAR> is <CODE>NULL</CODE> or the empty string, no prompt is displayed.
2070The line <CODE>readline</CODE> returns is allocated with <CODE>malloc()</CODE>;
2071the caller should <CODE>free()</CODE> the line when it has finished with it.
2072The declaration for <CODE>readline</CODE> in ANSI C is
2073</P><P>
a44161c3 2074
84041b4c
EZ
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>
a44161c3 2077
a44161c3 2078So, one might say
84041b4c
EZ
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.
a44161c3
EZ
2081The line returned has the final newline removed, so only the
2082text remains.
84041b4c 2083</P><P>
a44161c3 2084
a44161c3
EZ
2085If <CODE>readline</CODE> encounters an <CODE>EOF</CODE> while reading the line, and the
2086line is empty at that point, then <CODE>(char *)NULL</CODE> is returned.
2087Otherwise, the line is ended just as if a newline had been typed.
84041b4c 2088</P><P>
a44161c3 2089
a44161c3 2090If you want the user to be able to get at the line later, (with
84041b4c 2091<KBD>C-p</KBD> for example), you must call <CODE>add_history()</CODE> to save the
a44161c3 2092line away in a <EM>history</EM> list of such lines.
84041b4c 2093</P><P>
a44161c3 2094
84041b4c
EZ
2095<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>add_history (line)</CODE>;
2096</pre></td></tr></table></P><P>
a44161c3 2097
a44161c3 2098For full details on the GNU History Library, see the associated manual.
84041b4c 2099</P><P>
a44161c3 2100
a44161c3
EZ
2101It is preferable to avoid saving empty lines on the history list, since
2102users rarely have a burning need to reuse a blank line. Here is
84041b4c 2103a function which usefully replaces the standard <CODE>gets()</CODE> library
a44161c3 2104function, and has the advantage of no static buffer to overflow:
84041b4c 2105</P><P>
a44161c3 2106
84041b4c 2107<TABLE><tr><td>&nbsp;</td><td class=example><pre>/* A static variable for holding the line. */
a44161c3
EZ
2108static char *line_read = (char *)NULL;
2109
84041b4c
EZ
2110/* Read a string, and return a pointer to it.
2111 Returns NULL on EOF. */
a44161c3
EZ
2112char *
2113rl_gets ()
2114{
84041b4c
EZ
2115 /* If the buffer has already been allocated,
2116 return the memory to the free pool. */
a44161c3
EZ
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
84041b4c
EZ
2126 /* If the line has any text in it,
2127 save it on the history. */
a44161c3
EZ
2128 if (line_read &#38;&#38; *line_read)
2129 add_history (line_read);
2130
2131 return (line_read);
2132}
84041b4c 2133</pre></td></tr></table></P><P>
a44161c3 2134
a44161c3
EZ
2135This function gives the user the default behaviour of <KBD>TAB</KBD>
2136completion: completion on file names. If you do not want Readline to
2137complete on filenames, you can change the binding of the <KBD>TAB</KBD> key
84041b4c
EZ
2138with <CODE>rl_bind_key()</CODE>.
2139</P><P>
a44161c3 2140
84041b4c
EZ
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>
a44161c3 2143
84041b4c 2144<CODE>rl_bind_key()</CODE> takes two arguments: <VAR>key</VAR> is the character that
a44161c3 2145you want to bind, and <VAR>function</VAR> is the address of the function to
84041b4c 2146call when <VAR>key</VAR> is pressed. Binding <KBD>TAB</KBD> to <CODE>rl_insert()</CODE>
a44161c3 2147makes <KBD>TAB</KBD> insert itself.
84041b4c 2148<CODE>rl_bind_key()</CODE> returns non-zero if <VAR>key</VAR> is not a valid
a44161c3 2149ASCII character code (between 0 and 255).
84041b4c 2150</P><P>
a44161c3 2151
a44161c3 2152Thus, to disable the default <KBD>TAB</KBD> behavior, the following suffices:
84041b4c
EZ
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>
a44161c3 2155
a44161c3 2156This code should be executed once at the start of your program; you
84041b4c 2157might write a function called <CODE>initialize_readline()</CODE> which
a44161c3 2158performs this and other desired initializations, such as installing
84041b4c
EZ
2159custom 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>
b585a9fa 2173<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 2178<P>
84041b4c 2179
a44161c3
EZ
2180Readline provides many functions for manipulating the text of
2181the line, but it isn't possible to anticipate the needs of all
2182programs. This section describes the various functions and variables
2183defined within the Readline library which allow a user program to add
2184customized functionality to Readline.
84041b4c 2185</P><P>
a44161c3 2186
f9267e15
EZ
2187Before declaring any functions that customize Readline's behavior, or
2188using any functionality Readline provides in other code, an
2189application writer should include the file <CODE>&#60;readline/readline.h&#62;</CODE>
2190in any file that uses Readline's features. Since some of the definitions
2191in <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>.
84041b4c
EZ
2193</P><P>
2194
2195<CODE>readline.h</CODE> defines a C preprocessor variable that should
2196be treated as an integer, <CODE>RL_READLINE_VERSION</CODE>, which may
2197be used to conditionally compile application code depending on
2198the installed Readline version. The value is a hexadecimal
2199encoding of the major and minor version numbers of the library,
2200of the form 0x<VAR>MMmm</VAR>. <VAR>MM</VAR> is the two-digit major
2201version number; <VAR>mm</VAR> is the two-digit minor version number.
2202For 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>
b585a9fa 2223<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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
2230For readabilty, we declare a number of new object types, all pointers
2231to functions.
2232</P><P>
2233
2234The reason for declaring these new types is to make it easier to write
2235code describing pointers to C functions with appropriately prototyped
2236arguments and return values.
2237</P><P>
2238
2239For instance, say we want to declare a variable <VAR>func</VAR> as a pointer
2240to 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).
2242Instead of the classic C declaration
2243</P><P>
2244
2245<CODE>int (*func)();</CODE>
2246</P><P>
2247
2248or the ANSI-C style declaration
2249</P><P>
2250
2251<CODE>int (*func)(int, int);</CODE>
2252</P><P>
f9267e15 2253
84041b4c
EZ
2254we may write
2255</P><P>
a44161c3 2256
84041b4c
EZ
2257<CODE>rl_command_func_t *func;</CODE>
2258</P><P>
a44161c3 2259
84041b4c
EZ
2260The full list of function pointer types available is
2261</P><P>
a44161c3 2262
84041b4c
EZ
2263<DL COMPACT>
2264<DT><CODE>typedef int rl_command_func_t (int, int);</CODE>
2265<DD><P>
a44161c3 2266
84041b4c
EZ
2267<DT><CODE>typedef char *rl_compentry_func_t (const char *, int);</CODE>
2268<DD><P>
a44161c3 2269
84041b4c
EZ
2270<DT><CODE>typedef char **rl_completion_func_t (const char *, int, int);</CODE>
2271<DD><P>
a44161c3 2272
84041b4c
EZ
2273<DT><CODE>typedef char *rl_quote_func_t (char *, int, char *);</CODE>
2274<DD><P>
a44161c3 2275
84041b4c
EZ
2276<DT><CODE>typedef char *rl_dequote_func_t (char *, int);</CODE>
2277<DD><P>
a44161c3 2278
84041b4c
EZ
2279<DT><CODE>typedef int rl_compignore_func_t (char **);</CODE>
2280<DD><P>
a44161c3 2281
84041b4c
EZ
2282<DT><CODE>typedef void rl_compdisp_func_t (char **, int, int);</CODE>
2283<DD><P>
a44161c3 2284
84041b4c
EZ
2285<DT><CODE>typedef int rl_hook_func_t (void);</CODE>
2286<DD><P>
a44161c3 2287
84041b4c
EZ
2288<DT><CODE>typedef int rl_getc_func_t (FILE *);</CODE>
2289<DD><P>
a44161c3 2290
84041b4c
EZ
2291<DT><CODE>typedef int rl_linebuf_func_t (char *, int);</CODE>
2292<DD><P>
a44161c3 2293
84041b4c
EZ
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>
a44161c3 2299
84041b4c
EZ
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>
a44161c3 2305
84041b4c
EZ
2306</DL>
2307<P>
a44161c3 2308
84041b4c
EZ
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>
b585a9fa 2320<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 2325<P>
84041b4c 2326
a44161c3
EZ
2327In order to write new functions for Readline, you need to know the
2328calling conventions for keyboard-invoked functions, and the names of the
2329variables that describe the current state of the line read so far.
84041b4c 2330</P><P>
a44161c3 2331
a44161c3 2332The calling sequence for a command <CODE>foo</CODE> looks like
84041b4c 2333</P><P>
a44161c3 2334
84041b4c
EZ
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>
a44161c3 2337
a44161c3
EZ
2338where <VAR>count</VAR> is the numeric argument (or 1 if defaulted) and
2339<VAR>key</VAR> is the key that invoked this function.
84041b4c 2340</P><P>
a44161c3 2341
a44161c3
EZ
2342It is completely up to the function as to what should be done with the
2343numeric argument. Some functions use it as a repeat count, some
2344as a flag, and others to choose alternate behavior (refreshing the current
2345line as opposed to refreshing the screen, for example). Some choose to
2346ignore it. In general, if a
2347function uses the numeric argument as a repeat count, it should be able
2348to do something useful with both negative and positive arguments.
2349At the very least, it should be aware that it can be passed a
2350negative argument.
84041b4c
EZ
2351</P><P>
2352
2353A command function should return 0 if its action completes successfully,
2354and a non-zero value if some error occurs.
b585a9fa
EZ
2355This is the convention obeyed by all of the builtin Readline bindable
2356command functions.
84041b4c
EZ
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>
b585a9fa 2367<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
84041b4c
EZ
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>
b585a9fa 2370<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 2375<P>
84041b4c 2376
a44161c3 2377These variables are available to function writers.
84041b4c 2378</P><P>
a44161c3 2379
b585a9fa 2380<A NAME="IDX180"></A>
a44161c3
EZ
2381<DL>
2382<DT><U>Variable:</U> char * <B>rl_line_buffer</B>
84041b4c
EZ
2383<DD>This is the line gathered so far. You are welcome to modify the
2384contents of the line, but see <A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A>. The
f9267e15
EZ
2385function <CODE>rl_extend_line_buffer</CODE> is available to increase
2386the memory allocated to <CODE>rl_line_buffer</CODE>.
a44161c3 2387</DL>
84041b4c 2388</P><P>
a44161c3 2389
b585a9fa 2390<A NAME="IDX181"></A>
a44161c3
EZ
2391<DL>
2392<DT><U>Variable:</U> int <B>rl_point</B>
84041b4c 2393<DD>The offset of the current cursor position in <CODE>rl_line_buffer</CODE>
a44161c3
EZ
2394(the <EM>point</EM>).
2395</DL>
84041b4c 2396</P><P>
a44161c3 2397
b585a9fa 2398<A NAME="IDX182"></A>
a44161c3
EZ
2399<DL>
2400<DT><U>Variable:</U> int <B>rl_end</B>
84041b4c 2401<DD>The number of characters present in <CODE>rl_line_buffer</CODE>. When
a44161c3
EZ
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>
84041b4c 2405</P><P>
a44161c3 2406
b585a9fa 2407<A NAME="IDX183"></A>
a44161c3
EZ
2408<DL>
2409<DT><U>Variable:</U> int <B>rl_mark</B>
84041b4c 2410<DD>The <VAR>mark</VAR> (saved position) in the current line. If set, the mark
a44161c3
EZ
2411and point define a <EM>region</EM>.
2412</DL>
84041b4c 2413</P><P>
a44161c3 2414
b585a9fa 2415<A NAME="IDX184"></A>
a44161c3
EZ
2416<DL>
2417<DT><U>Variable:</U> int <B>rl_done</B>
84041b4c 2418<DD>Setting this to a non-zero value causes Readline to return the current
a44161c3
EZ
2419line immediately.
2420</DL>
84041b4c 2421</P><P>
a44161c3 2422
b585a9fa 2423<A NAME="IDX185"></A>
84041b4c
EZ
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
2427Readline to return after accepting that many characters, rather
2428than reading up to a character bound to <CODE>accept-line</CODE>.
2429</DL>
2430</P><P>
2431
b585a9fa 2432<A NAME="IDX186"></A>
a44161c3
EZ
2433<DL>
2434<DT><U>Variable:</U> int <B>rl_pending_input</B>
84041b4c 2435<DD>Setting this to a value makes it the next keystroke read. This is a
a44161c3
EZ
2436way to stuff a single character into the input stream.
2437</DL>
84041b4c 2438</P><P>
a44161c3 2439
b585a9fa 2440<A NAME="IDX187"></A>
84041b4c
EZ
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;
2444zero otherwise. Application functions can test this to discover whether
2445they were called directly or by Readline's dispatching mechanism.
2446</DL>
2447</P><P>
2448
b585a9fa 2449<A NAME="IDX188"></A>
a44161c3
EZ
2450<DL>
2451<DT><U>Variable:</U> int <B>rl_erase_empty_line</B>
84041b4c 2452<DD>Setting this to a non-zero value causes Readline to completely erase
a44161c3
EZ
2453the current line, including any prompt, any time a newline is typed as
2454the only character on an otherwise-empty line. The cursor is moved to
2455the beginning of the newly-blank line.
2456</DL>
84041b4c 2457</P><P>
a44161c3 2458
b585a9fa 2459<A NAME="IDX189"></A>
a44161c3
EZ
2460<DL>
2461<DT><U>Variable:</U> char * <B>rl_prompt</B>
84041b4c
EZ
2462<DD>The prompt Readline uses. This is set from the argument to
2463<CODE>readline()</CODE>, and should not be assigned to directly.
2464The <CODE>rl_set_prompt()</CODE> function (see section <A HREF="readline.html#SEC35">2.4.6 Redisplay</A>) may
2465be used to modify the prompt string after calling <CODE>readline()</CODE>.
a44161c3 2466</DL>
84041b4c 2467</P><P>
a44161c3 2468
b585a9fa 2469<A NAME="IDX190"></A>
a44161c3 2470<DL>
f9267e15 2471<DT><U>Variable:</U> int <B>rl_already_prompted</B>
84041b4c 2472<DD>If an application wishes to display the prompt itself, rather than have
f9267e15
EZ
2473Readline do it the first time <CODE>readline()</CODE> is called, it should set
2474this variable to a non-zero value after displaying the prompt.
2475The prompt must also be passed as the argument to <CODE>readline()</CODE> so
2476the redisplay functions can update the display properly.
2477The calling application is responsible for managing the value; Readline
2478never sets it.
2479</DL>
84041b4c 2480</P><P>
f9267e15 2481
b585a9fa 2482<A NAME="IDX191"></A>
f9267e15 2483<DL>
84041b4c
EZ
2484<DT><U>Variable:</U> const char * <B>rl_library_version</B>
2485<DD>The version number of this revision of the library.
a44161c3 2486</DL>
84041b4c 2487</P><P>
a44161c3 2488
b585a9fa 2489<A NAME="IDX192"></A>
a44161c3 2490<DL>
84041b4c
EZ
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
2493of the form 0x<VAR>MMmm</VAR>, where <VAR>MM</VAR> is the two-digit major version
2494number, and <VAR>mm</VAR> is the two-digit minor version number.
2495For example, for Readline-4.2, <CODE>rl_readline_version</CODE> would have the
2496value 0x0402.
a44161c3 2497</DL>
84041b4c 2498</P><P>
a44161c3 2499
b585a9fa 2500<A NAME="IDX193"></A>
a44161c3 2501<DL>
84041b4c
EZ
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
2504emulation.
2505</DL>
2506</P><P>
2507
b585a9fa 2508<A NAME="IDX194"></A>
84041b4c
EZ
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,
2512Readline sets this to the value of the <CODE>TERM</CODE> environment variable
2513the first time it is called.
2514</DL>
2515</P><P>
2516
b585a9fa 2517<A NAME="IDX195"></A>
84041b4c
EZ
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.
a44161c3 2521The value allows conditional parsing of the inputrc file
84041b4c 2522(see section <A HREF="readline.html#SEC11">1.3.2 Conditional Init Constructs</A>).
a44161c3 2523</DL>
84041b4c 2524</P><P>
a44161c3 2525
b585a9fa 2526<A NAME="IDX196"></A>
a44161c3
EZ
2527<DL>
2528<DT><U>Variable:</U> FILE * <B>rl_instream</B>
84041b4c
EZ
2529<DD>The stdio stream from which Readline reads input.
2530If <CODE>NULL</CODE>, Readline defaults to <VAR>stdin</VAR>.
a44161c3 2531</DL>
84041b4c 2532</P><P>
a44161c3 2533
b585a9fa 2534<A NAME="IDX197"></A>
a44161c3
EZ
2535<DL>
2536<DT><U>Variable:</U> FILE * <B>rl_outstream</B>
84041b4c
EZ
2537<DD>The stdio stream to which Readline performs output.
2538If <CODE>NULL</CODE>, Readline defaults to <VAR>stdout</VAR>.
a44161c3 2539</DL>
84041b4c 2540</P><P>
a44161c3 2541
b585a9fa
EZ
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
2547from the kernel when computing the screen dimensions.
2548</DL>
2549</P><P>
2550
2551<A NAME="IDX199"></A>
a44161c3 2552<DL>
84041b4c
EZ
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
2555test whether or not a function is being executed twice in succession, for
2556example.
2557</DL>
2558</P><P>
2559
b585a9fa 2560<A NAME="IDX200"></A>
84041b4c
EZ
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
a44161c3
EZ
2564before <CODE>readline</CODE> prints the first prompt.
2565</DL>
84041b4c 2566</P><P>
a44161c3 2567
b585a9fa 2568<A NAME="IDX201"></A>
a44161c3 2569<DL>
84041b4c
EZ
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
a44161c3
EZ
2572the first prompt has been printed and just before <CODE>readline</CODE>
2573starts reading input characters.
2574</DL>
84041b4c 2575</P><P>
a44161c3 2576
b585a9fa 2577<A NAME="IDX202"></A>
a44161c3 2578<DL>
84041b4c
EZ
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
2581when Readline is waiting for terminal input.
2582By default, this will be called at most ten times a second if there
2583is no keyboard input.
a44161c3 2584</DL>
84041b4c 2585</P><P>
a44161c3 2586
b585a9fa 2587<A NAME="IDX203"></A>
a44161c3 2588<DL>
84041b4c
EZ
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
a44161c3 2591to get a character from the input stream. By default, it is set to
84041b4c
EZ
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>).
a44161c3 2594</DL>
84041b4c 2595</P><P>
a44161c3 2596
b585a9fa 2597<A NAME="IDX204"></A>
a44161c3 2598<DL>
84041b4c
EZ
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
a44161c3 2601to update the display with the current contents of the editing buffer.
84041b4c
EZ
2602By default, it is set to <CODE>rl_redisplay</CODE>, the default Readline
2603redisplay function (see section <A HREF="readline.html#SEC35">2.4.6 Redisplay</A>).
a44161c3 2604</DL>
84041b4c 2605</P><P>
a44161c3 2606
b585a9fa 2607<A NAME="IDX205"></A>
84041b4c
EZ
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
2611to 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.
2613By 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
b585a9fa 2618<A NAME="IDX206"></A>
84041b4c
EZ
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
2622to reset the terminal. This function should undo the effects of
2623<CODE>rl_prep_term_function</CODE>.
2624By 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
b585a9fa 2629<A NAME="IDX207"></A>
a44161c3
EZ
2630<DL>
2631<DT><U>Variable:</U> Keymap <B>rl_executing_keymap</B>
84041b4c 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
a44161c3
EZ
2633currently executing readline function was found.
2634</DL>
84041b4c 2635</P><P>
a44161c3 2636
b585a9fa 2637<A NAME="IDX208"></A>
a44161c3
EZ
2638<DL>
2639<DT><U>Variable:</U> Keymap <B>rl_binding_keymap</B>
84041b4c 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
a44161c3
EZ
2641last key binding occurred.
2642</DL>
84041b4c 2643</P><P>
a44161c3 2644
b585a9fa 2645<A NAME="IDX209"></A>
84041b4c
EZ
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>
a44161c3 2651
b585a9fa 2652<A NAME="IDX210"></A>
84041b4c
EZ
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.
2656A 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
2658whether a particular state bit is set. Current state bits include:
2659</P><P>
a44161c3 2660
84041b4c
EZ
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
2688macro.
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>
2701and is about to return the line to the caller.
2702</DL>
2703<P>
2704
2705</DL>
2706</P><P>
2707
b585a9fa 2708<A NAME="IDX211"></A>
84041b4c
EZ
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
2712the user. Only valid in a bindable command function.
2713</DL>
2714</P><P>
a44161c3 2715
b585a9fa 2716<A NAME="IDX212"></A>
84041b4c
EZ
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
2720before executing the current Readline function. Only valid in a bindable
2721command function.
2722</DL>
2723</P><P>
a44161c3 2724
b585a9fa 2725<A NAME="IDX213"></A>
84041b4c
EZ
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>
2730means 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>
b585a9fa 2745<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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>
b585a9fa 2781<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 2786<P>
84041b4c 2787
a44161c3
EZ
2788The user can dynamically change the bindings of keys while using
2789Readline. This is done by representing the function with a descriptive
2790name. The user is able to type the descriptive name when referring to
2791the function. Thus, in an init file, one might find
84041b4c 2792</P><P>
a44161c3 2793
84041b4c
EZ
2794<TABLE><tr><td>&nbsp;</td><td class=example><pre>Meta-Rubout: backward-kill-word
2795</pre></td></tr></table></P><P>
a44161c3 2796
a44161c3
EZ
2797This binds the keystroke <KBD>Meta-Rubout</KBD> to the function
2798<EM>descriptively</EM> named <CODE>backward-kill-word</CODE>. You, as the
2799programmer, should bind the functions you write to descriptive names as
2800well. Readline provides a function for doing that:
84041b4c 2801</P><P>
a44161c3 2802
b585a9fa 2803<A NAME="IDX214"></A>
a44161c3 2804<DL>
84041b4c
EZ
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
a44161c3 2807the function that gets called. If <VAR>key</VAR> is not -1, then bind it to
84041b4c 2808<VAR>function</VAR> using <CODE>rl_bind_key()</CODE>.
a44161c3 2809</DL>
84041b4c 2810</P><P>
a44161c3 2811
b585a9fa
EZ
2812Using this function alone is sufficient for most applications.
2813It is the recommended way to add a few functions to the default
2814functions that Readline has built in.
2815If you need to do something other than adding a function to Readline,
2816you may need to use the underlying functions described below.
84041b4c
EZ
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>
b585a9fa 2830<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 2835<P>
84041b4c 2836
a44161c3
EZ
2837Key bindings take place on a <EM>keymap</EM>. The keymap is the
2838association between the keys that the user types and the functions that
2839get run. You can make your own keymaps, copy existing keymaps, and tell
2840Readline which keymap to use.
84041b4c 2841</P><P>
a44161c3 2842
b585a9fa 2843<A NAME="IDX215"></A>
a44161c3 2844<DL>
84041b4c
EZ
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.
a44161c3 2849</DL>
84041b4c 2850</P><P>
a44161c3 2851
b585a9fa 2852<A NAME="IDX216"></A>
a44161c3
EZ
2853<DL>
2854<DT><U>Function:</U> Keymap <B>rl_copy_keymap</B> <I>(Keymap map)</I>
84041b4c 2855<DD>Return a new keymap which is a copy of <VAR>map</VAR>.
a44161c3 2856</DL>
84041b4c 2857</P><P>
a44161c3 2858
b585a9fa 2859<A NAME="IDX217"></A>
a44161c3 2860<DL>
84041b4c
EZ
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,
a44161c3
EZ
2863the lowercase Meta characters bound to run their equivalents, and
2864the Meta digits bound to produce numeric arguments.
2865</DL>
84041b4c 2866</P><P>
a44161c3 2867
b585a9fa 2868<A NAME="IDX218"></A>
a44161c3
EZ
2869<DL>
2870<DT><U>Function:</U> void <B>rl_discard_keymap</B> <I>(Keymap keymap)</I>
84041b4c 2871<DD>Free the storage associated with <VAR>keymap</VAR>.
a44161c3 2872</DL>
84041b4c 2873</P><P>
a44161c3 2874
a44161c3
EZ
2875Readline has several internal keymaps. These functions allow you to
2876change which keymap is active.
84041b4c 2877</P><P>
a44161c3 2878
b585a9fa 2879<A NAME="IDX219"></A>
a44161c3 2880<DL>
84041b4c
EZ
2881<DT><U>Function:</U> Keymap <B>rl_get_keymap</B> <I>(void)</I>
2882<DD>Returns the currently active keymap.
a44161c3 2883</DL>
84041b4c 2884</P><P>
a44161c3 2885
b585a9fa 2886<A NAME="IDX220"></A>
a44161c3
EZ
2887<DL>
2888<DT><U>Function:</U> void <B>rl_set_keymap</B> <I>(Keymap keymap)</I>
84041b4c 2889<DD>Makes <VAR>keymap</VAR> the currently active keymap.
a44161c3 2890</DL>
84041b4c 2891</P><P>
a44161c3 2892
b585a9fa 2893<A NAME="IDX221"></A>
a44161c3 2894<DL>
84041b4c
EZ
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
2897be supplied in a <CODE>set keymap</CODE> inputrc line (see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
a44161c3 2898</DL>
84041b4c 2899</P><P>
a44161c3 2900
b585a9fa 2901<A NAME="IDX222"></A>
a44161c3
EZ
2902<DL>
2903<DT><U>Function:</U> char * <B>rl_get_keymap_name</B> <I>(Keymap keymap)</I>
84041b4c
EZ
2904<DD>Return the name matching <VAR>keymap</VAR>. <VAR>name</VAR> is one which would
2905be 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>
b585a9fa 2920<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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
2927Key sequences are associate with functions through the keymap.
2928Readline has several internal keymaps: <CODE>emacs_standard_keymap</CODE>,
a44161c3
EZ
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
2932this manual assume that.
84041b4c 2933</P><P>
a44161c3 2934
84041b4c 2935Since <CODE>readline()</CODE> installs a set of default key bindings the first
f9267e15 2936time it is called, there is always the danger that a custom binding
84041b4c 2937installed before the first call to <CODE>readline()</CODE> will be overridden.
f9267e15
EZ
2938An alternate mechanism is to install custom key bindings in an
2939initialization function assigned to the <CODE>rl_startup_hook</CODE> variable
84041b4c
EZ
2940(see section <A HREF="readline.html#SEC28">2.3 Readline Variables</A>).
2941</P><P>
f9267e15 2942
a44161c3 2943These functions manage key bindings.
84041b4c 2944</P><P>
a44161c3 2945
b585a9fa 2946<A NAME="IDX223"></A>
a44161c3 2947<DL>
84041b4c
EZ
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.
a44161c3
EZ
2950Returns non-zero in the case of an invalid <VAR>key</VAR>.
2951</DL>
84041b4c 2952</P><P>
a44161c3 2953
b585a9fa 2954<A NAME="IDX224"></A>
a44161c3 2955<DL>
84041b4c 2956<DT><U>Function:</U> int <B>rl_bind_key_in_map</B> <I>(int key, rl_command_func_t *function, Keymap map)</I>
b585a9fa
EZ
2957<DD>Bind <VAR>key</VAR> to <VAR>function</VAR> in <VAR>map</VAR>.
2958Returns non-zero in the case of an invalid <VAR>key</VAR>.
a44161c3 2959</DL>
84041b4c 2960</P><P>
a44161c3 2961
b585a9fa
EZ
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
2966currently active keymap.
2967Returns non-zero in the case of an invalid <VAR>key</VAR> or if <VAR>key</VAR> is
2968already 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>.
2976Returns non-zero in the case of an invalid <VAR>key</VAR> or if <VAR>key</VAR> is
2977already bound.
2978</DL>
2979</P><P>
2980
2981<A NAME="IDX227"></A>
a44161c3
EZ
2982<DL>
2983<DT><U>Function:</U> int <B>rl_unbind_key</B> <I>(int key)</I>
84041b4c 2984<DD>Bind <VAR>key</VAR> to the null function in the currently active keymap.
a44161c3
EZ
2985Returns non-zero in case of error.
2986</DL>
84041b4c 2987</P><P>
a44161c3 2988
b585a9fa 2989<A NAME="IDX228"></A>
a44161c3
EZ
2990<DL>
2991<DT><U>Function:</U> int <B>rl_unbind_key_in_map</B> <I>(int key, Keymap map)</I>
84041b4c 2992<DD>Bind <VAR>key</VAR> to the null function in <VAR>map</VAR>.
a44161c3
EZ
2993Returns non-zero in case of error.
2994</DL>
84041b4c 2995</P><P>
a44161c3 2996
b585a9fa 2997<A NAME="IDX229"></A>
a44161c3 2998<DL>
84041b4c
EZ
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>.
a44161c3 3001</DL>
84041b4c 3002</P><P>
a44161c3 3003
b585a9fa 3004<A NAME="IDX230"></A>
a44161c3 3005<DL>
84041b4c
EZ
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>.
a44161c3 3008</DL>
84041b4c 3009</P><P>
a44161c3 3010
b585a9fa 3011<A NAME="IDX231"></A>
a44161c3 3012<DL>
b585a9fa 3013<DT><U>Function:</U> int <B>rl_bind_keyseq</B> <I>(const char *keyseq, rl_command_func_t *function)</I>
84041b4c 3014<DD>Bind the key sequence represented by the string <VAR>keyseq</VAR> to the function
b585a9fa
EZ
3015<VAR>function</VAR>, beginning in the current keymap.
3016This makes new keymaps as necessary.
3017The return value is non-zero if <VAR>keyseq</VAR> is invalid.
84041b4c
EZ
3018</DL>
3019</P><P>
3020
b585a9fa
EZ
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.
3026Initial bindings are performed in <VAR>map</VAR>.
3027The 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
3042currently active keymap.
3043Returns non-zero in the case of an invalid <VAR>keyseq</VAR> or if <VAR>keyseq</VAR> is
3044already 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>.
3052Returns non-zero in the case of an invalid <VAR>keyseq</VAR> or if <VAR>keyseq</VAR> is
3053already bound.
3054</DL>
3055</P><P>
3056
3057<A NAME="IDX236"></A>
84041b4c
EZ
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
a44161c3
EZ
3061pointer <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
3064necessary. The initial keymap in which to do bindings is <VAR>map</VAR>.
3065</DL>
84041b4c 3066</P><P>
a44161c3 3067
b585a9fa 3068<A NAME="IDX237"></A>
a44161c3
EZ
3069<DL>
3070<DT><U>Function:</U> int <B>rl_parse_and_bind</B> <I>(char *line)</I>
84041b4c 3071<DD>Parse <VAR>line</VAR> as if it had been read from the <CODE>inputrc</CODE> file and
a44161c3 3072perform any key bindings and variable assignments found
84041b4c 3073(see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
a44161c3 3074</DL>
84041b4c 3075</P><P>
a44161c3 3076
b585a9fa 3077<A NAME="IDX238"></A>
a44161c3 3078<DL>
84041b4c
EZ
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>
b585a9fa 3096<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 3101<P>
84041b4c 3102
a44161c3 3103These functions allow you to find out what keys invoke named functions
84041b4c
EZ
3104and the functions invoked by a particular key sequence. You may also
3105associate a new function name with an arbitrary function.
3106</P><P>
a44161c3 3107
b585a9fa 3108<A NAME="IDX239"></A>
a44161c3 3109<DL>
84041b4c
EZ
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>.
a44161c3 3112</DL>
84041b4c 3113</P><P>
a44161c3 3114
b585a9fa 3115<A NAME="IDX240"></A>
a44161c3 3116<DL>
84041b4c
EZ
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>.
3119If <VAR>map</VAR> is <CODE>NULL</CODE>, the current keymap is used. If <VAR>type</VAR> is
3120not <CODE>NULL</CODE>, the type of the object is returned in the <CODE>int</CODE> variable
3121it points to (one of <CODE>ISFUNC</CODE>, <CODE>ISKMAP</CODE>, or <CODE>ISMACR</CODE>).
a44161c3 3122</DL>
84041b4c 3123</P><P>
a44161c3 3124
b585a9fa 3125<A NAME="IDX241"></A>
a44161c3 3126<DL>
84041b4c
EZ
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
a44161c3
EZ
3129invoke <VAR>function</VAR> in the current keymap.
3130</DL>
84041b4c 3131</P><P>
a44161c3 3132
b585a9fa 3133<A NAME="IDX242"></A>
a44161c3 3134<DL>
84041b4c
EZ
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
a44161c3
EZ
3137invoke <VAR>function</VAR> in the keymap <VAR>map</VAR>.
3138</DL>
84041b4c 3139</P><P>
a44161c3 3140
b585a9fa 3141<A NAME="IDX243"></A>
a44161c3
EZ
3142<DL>
3143<DT><U>Function:</U> void <B>rl_function_dumper</B> <I>(int readable)</I>
84041b4c 3144<DD>Print the readline function names and the key sequences currently
a44161c3
EZ
3145bound to them to <CODE>rl_outstream</CODE>. If <VAR>readable</VAR> is non-zero,
3146the 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>
84041b4c 3149</P><P>
a44161c3 3150
b585a9fa 3151<A NAME="IDX244"></A>
a44161c3 3152<DL>
84041b4c
EZ
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>.
a44161c3 3155</DL>
84041b4c 3156</P><P>
a44161c3 3157
b585a9fa 3158<A NAME="IDX245"></A>
f9267e15 3159<DL>
84041b4c
EZ
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
f9267e15 3162sorted. The array itself is allocated, but not the strings inside. You
84041b4c 3163should <CODE>free()</CODE> the array when you are done, but not the pointers.
f9267e15 3164</DL>
84041b4c 3165</P><P>
f9267e15 3166
b585a9fa 3167<A NAME="IDX246"></A>
84041b4c
EZ
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>
b585a9fa 3186<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 3191<P>
84041b4c 3192
a44161c3
EZ
3193Supporting the undo command is a painless thing, and makes your
3194functions much more useful. It is certainly easy to try
84041b4c
EZ
3195something if you know you can undo it.
3196</P><P>
a44161c3 3197
a44161c3 3198If your function simply inserts text once, or deletes text once, and
84041b4c 3199uses <CODE>rl_insert_text()</CODE> or <CODE>rl_delete_text()</CODE> to do it, then
a44161c3 3200undoing is already done for you automatically.
84041b4c 3201</P><P>
a44161c3 3202
a44161c3
EZ
3203If you do multiple insertions or multiple deletions, or any combination
3204of these operations, you should group them together into one operation.
84041b4c
EZ
3205This is done with <CODE>rl_begin_undo_group()</CODE> and
3206<CODE>rl_end_undo_group()</CODE>.
3207</P><P>
a44161c3 3208
a44161c3 3209The types of events that can be undone are:
84041b4c 3210</P><P>
a44161c3 3211
84041b4c
EZ
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>
a44161c3 3214
a44161c3
EZ
3215Notice 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
84041b4c
EZ
3217tells 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>
a44161c3 3221
b585a9fa 3222<A NAME="IDX247"></A>
a44161c3 3223<DL>
84041b4c
EZ
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
3226information 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>.
a44161c3 3229</DL>
84041b4c 3230</P><P>
a44161c3 3231
b585a9fa 3232<A NAME="IDX248"></A>
a44161c3 3233<DL>
84041b4c
EZ
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>
3237for each call to <CODE>rl_begin_undo_group()</CODE>.
a44161c3 3238</DL>
84041b4c 3239</P><P>
a44161c3 3240
b585a9fa 3241<A NAME="IDX249"></A>
a44161c3
EZ
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>
84041b4c 3244<DD>Remember how to undo an event (according to <VAR>what</VAR>). The affected
a44161c3
EZ
3245text runs from <VAR>start</VAR> to <VAR>end</VAR>, and encompasses <VAR>text</VAR>.
3246</DL>
84041b4c 3247</P><P>
a44161c3 3248
b585a9fa 3249<A NAME="IDX250"></A>
a44161c3 3250<DL>
84041b4c
EZ
3251<DT><U>Function:</U> void <B>rl_free_undo_list</B> <I>(void)</I>
3252<DD>Free the existing undo list.
a44161c3 3253</DL>
84041b4c 3254</P><P>
a44161c3 3255
b585a9fa 3256<A NAME="IDX251"></A>
a44161c3 3257<DL>
84041b4c
EZ
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
a44161c3
EZ
3260nothing to undo, non-zero if something was undone.
3261</DL>
84041b4c 3262</P><P>
a44161c3 3263
a44161c3 3264Finally, if you neither insert nor delete text, but directly modify the
84041b4c 3265existing text (e.g., change its case), call <CODE>rl_modifying()</CODE>
a44161c3
EZ
3266once, just before you modify the text. You must supply the indices of
3267the text range that you are going to modify.
84041b4c 3268</P><P>
a44161c3 3269
b585a9fa 3270<A NAME="IDX252"></A>
a44161c3
EZ
3271<DL>
3272<DT><U>Function:</U> int <B>rl_modifying</B> <I>(int start, int end)</I>
84041b4c 3273<DD>Tell Readline to save the text between <VAR>start</VAR> and <VAR>end</VAR> as a
a44161c3
EZ
3274single undo unit. It is assumed that you will subsequently modify
3275that text.
3276</DL>
84041b4c
EZ
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>
b585a9fa 3290<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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
b585a9fa 3297<A NAME="IDX253"></A>
a44161c3 3298<DL>
84041b4c
EZ
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
a44161c3
EZ
3301of <CODE>rl_line_buffer</CODE>.
3302</DL>
84041b4c 3303</P><P>
a44161c3 3304
b585a9fa 3305<A NAME="IDX254"></A>
a44161c3 3306<DL>
84041b4c
EZ
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
a44161c3
EZ
3309Readline thinks the screen display is correct.
3310</DL>
84041b4c 3311</P><P>
a44161c3 3312
b585a9fa 3313<A NAME="IDX255"></A>
a44161c3 3314<DL>
84041b4c
EZ
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,
a44161c3
EZ
3317usually after ouputting a newline.
3318</DL>
84041b4c 3319</P><P>
a44161c3 3320
b585a9fa 3321<A NAME="IDX256"></A>
f9267e15 3322<DL>
84041b4c
EZ
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
f9267e15
EZ
3325<VAR>rl_prompt</VAR> already displayed.
3326This could be used by applications that want to output the prompt string
3327themselves, but still need Readline to know the prompt string length for
3328redisplay.
3329It should be used after setting <VAR>rl_already_prompted</VAR>.
3330</DL>
84041b4c 3331</P><P>
f9267e15 3332
b585a9fa 3333<A NAME="IDX257"></A>
a44161c3 3334<DL>
84041b4c
EZ
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
a44161c3
EZ
3337starting on a new line.
3338</DL>
84041b4c 3339</P><P>
a44161c3 3340
b585a9fa 3341<A NAME="IDX258"></A>
a44161c3 3342<DL>
84041b4c
EZ
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.
a44161c3 3345</DL>
84041b4c 3346</P><P>
a44161c3 3347
b585a9fa 3348<A NAME="IDX259"></A>
a44161c3 3349<DL>
84041b4c
EZ
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>.
3352If Readline has not been set to display meta characters directly, this
3353will convert meta characters to a meta-prefixed key sequence.
3354This is intended for use by applications which wish to do their own
3355redisplay.
a44161c3 3356</DL>
84041b4c 3357</P><P>
a44161c3 3358
b585a9fa 3359<A NAME="IDX260"></A>
a44161c3 3360<DL>
84041b4c
EZ
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>,
3363possibly containing conversion specifications such as <SAMP>`%d'</SAMP>, and
3364any additional arguments necessary to satisfy the conversion specifications.
3365The resulting string is displayed in the <EM>echo area</EM>. The echo area
3366is also used to display numeric arguments and search strings.
b585a9fa
EZ
3367You should call <CODE>rl_save_prompt</CODE> to save the prompt information
3368before calling this function.
a44161c3 3369</DL>
84041b4c 3370</P><P>
a44161c3 3371
b585a9fa 3372<A NAME="IDX261"></A>
a44161c3 3373<DL>
84041b4c 3374<DT><U>Function:</U> int <B>rl_clear_message</B> <I>(void)</I>
b585a9fa
EZ
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>,
3377call <CODE>rl_restore_prompt</CODE> before calling this function.
a44161c3 3378</DL>
84041b4c 3379</P><P>
a44161c3 3380
b585a9fa 3381<A NAME="IDX262"></A>
84041b4c
EZ
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
3385displaying a new message in the message area with <CODE>rl_message()</CODE>.
3386</DL>
3387</P><P>
a44161c3 3388
b585a9fa 3389<A NAME="IDX263"></A>
84041b4c
EZ
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
3393recent call to <CODE>rl_save_prompt</CODE>.
b585a9fa
EZ
3394if <CODE>rl_save_prompt</CODE> was called to save the prompt before a call
3395to <CODE>rl_message</CODE>, this function should be called before the
3396corresponding call to <CODE>rl_clear_message</CODE>.
84041b4c
EZ
3397</DL>
3398</P><P>
a44161c3 3399
b585a9fa 3400<A NAME="IDX264"></A>
a44161c3 3401<DL>
84041b4c
EZ
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
3404local Readline prompt redisplay variables.
3405This function is called by <CODE>readline()</CODE>. It may also be called to
3406expand the primary prompt if the <CODE>rl_on_new_line_with_prompt()</CODE>
3407function or <CODE>rl_already_prompted</CODE> variable is used.
3408It returns the number of visible characters on the last line of the
3409(possibly multi-line) prompt.
b585a9fa
EZ
3410Applications may indicate that the prompt contains characters that take
3411up no physical screen space when displayed by bracketing a sequence of
3412such characters with the special markers <CODE>RL_PROMPT_START_IGNORE</CODE>
3413and <CODE>RL_PROMPT_END_IGNORE</CODE> (declared in <TT>`readline.h'</TT>. This may
3414be used to embed terminal-specific escape sequences in prompts.
84041b4c
EZ
3415</DL>
3416</P><P>
3417
b585a9fa 3418<A NAME="IDX265"></A>
84041b4c
EZ
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>
3423to 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>
b585a9fa 3438<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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
b585a9fa 3445<A NAME="IDX266"></A>
84041b4c
EZ
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.
3449Returns the number of characters inserted.
a44161c3 3450</DL>
84041b4c 3451</P><P>
a44161c3 3452
b585a9fa 3453<A NAME="IDX267"></A>
a44161c3
EZ
3454<DL>
3455<DT><U>Function:</U> int <B>rl_delete_text</B> <I>(int start, int end)</I>
84041b4c
EZ
3456<DD>Delete the text between <VAR>start</VAR> and <VAR>end</VAR> in the current line.
3457Returns the number of characters deleted.
a44161c3 3458</DL>
84041b4c 3459</P><P>
a44161c3 3460
b585a9fa 3461<A NAME="IDX268"></A>
a44161c3
EZ
3462<DL>
3463<DT><U>Function:</U> char * <B>rl_copy_text</B> <I>(int start, int end)</I>
84041b4c 3464<DD>Return a copy of the text between <VAR>start</VAR> and <VAR>end</VAR> in
a44161c3
EZ
3465the current line.
3466</DL>
84041b4c 3467</P><P>
a44161c3 3468
b585a9fa 3469<A NAME="IDX269"></A>
a44161c3
EZ
3470<DL>
3471<DT><U>Function:</U> int <B>rl_kill_text</B> <I>(int start, int end)</I>
84041b4c 3472<DD>Copy the text between <VAR>start</VAR> and <VAR>end</VAR> in the current line
a44161c3
EZ
3473to the kill ring, appending or prepending to the last kill if the
3474last command was a kill command. The text is deleted.
3475If <VAR>start</VAR> is less than <VAR>end</VAR>,
3476the text is appended, otherwise prepended. If the last command was
3477not a kill, a new kill ring slot is used.
3478</DL>
84041b4c 3479</P><P>
a44161c3 3480
b585a9fa 3481<A NAME="IDX270"></A>
84041b4c
EZ
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
3485by 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>
b585a9fa 3501<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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
b585a9fa 3508<A NAME="IDX271"></A>
84041b4c
EZ
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.
3512This handles input inserted into
3513the input stream via <VAR>rl_pending_input</VAR> (see section <A HREF="readline.html#SEC28">2.3 Readline Variables</A>)
3514and <CODE>rl_stuff_char()</CODE>, macros, and characters read from the keyboard.
3515While waiting for input, this function will call any function assigned to
3516the <CODE>rl_event_hook</CODE> variable.
3517</DL>
3518</P><P>
a44161c3 3519
b585a9fa 3520<A NAME="IDX272"></A>
84041b4c
EZ
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
3524be the keyboard.
3525</DL>
3526</P><P>
a44161c3 3527
b585a9fa 3528<A NAME="IDX273"></A>
84041b4c
EZ
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"
3532before 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;
35350 otherwise.
3536</DL>
3537</P><P>
a44161c3 3538
b585a9fa 3539<A NAME="IDX274"></A>
a44161c3 3540<DL>
84041b4c
EZ
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>
3543is called. This sets <VAR>rl_pending_input</VAR>.
a44161c3 3544</DL>
84041b4c 3545</P><P>
a44161c3 3546
b585a9fa 3547<A NAME="IDX275"></A>
a44161c3 3548<DL>
84041b4c
EZ
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
3551previous call to <CODE>rl_execute_next()</CODE>. This works only if the
3552pending input has not already been read with <CODE>rl_read_key()</CODE>.
a44161c3 3553</DL>
84041b4c 3554</P><P>
a44161c3 3555
b585a9fa 3556<A NAME="IDX276"></A>
a44161c3 3557<DL>
84041b4c
EZ
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
3560wait for <VAR>u</VAR> microseconds for input before calling any function
3561assigned to <CODE>rl_event_hook</CODE>. The default waiting period is
3562one-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>
b585a9fa 3577<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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
b585a9fa 3584<A NAME="IDX277"></A>
84041b4c
EZ
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>
3588can read a single character at a time from the keyboard.
3589The <VAR>meta_flag</VAR> argument should be non-zero if Readline should
3590read eight-bit input.
a44161c3 3591</DL>
84041b4c 3592</P><P>
a44161c3 3593
b585a9fa 3594<A NAME="IDX278"></A>
a44161c3 3595<DL>
84041b4c
EZ
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
3598the state in which it was before the most recent call to
3599<CODE>rl_prep_terminal()</CODE>.
a44161c3 3600</DL>
84041b4c 3601</P><P>
a44161c3 3602
b585a9fa 3603<A NAME="IDX279"></A>
a44161c3 3604<DL>
84041b4c 3605<DT><U>Function:</U> void <B>rl_tty_set_default_bindings</B> <I>(Keymap kmap)</I>
b585a9fa
EZ
3606<DD>Read the operating system's terminal editing characters (as would be
3607displayed by <CODE>stty</CODE>) to their Readline equivalents.
3608The bindings are performed in <VAR>kmap</VAR>.
a44161c3 3609</DL>
84041b4c 3610</P><P>
a44161c3 3611
b585a9fa
EZ
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
3616that the terminal editing characters are bound to <CODE>rl_insert</CODE>.
3617The bindings are performed in <VAR>kmap</VAR>.
3618</DL>
3619</P><P>
3620
3621<A NAME="IDX281"></A>
a44161c3 3622<DL>
84041b4c
EZ
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
a44161c3 3625<VAR>terminal_name</VAR> as the terminal type (e.g., <CODE>vt100</CODE>).
84041b4c 3626If <VAR>terminal_name</VAR> is <CODE>NULL</CODE>, the value of the <CODE>TERM</CODE>
f9267e15 3627environment variable is used.
a44161c3 3628</DL>
84041b4c
EZ
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>
b585a9fa 3642<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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
b585a9fa 3649<A NAME="IDX282"></A>
84041b4c
EZ
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>.
3653The point and mark are preserved, if possible.
3654If <VAR>clear_undo</VAR> is non-zero, the undo list associated with the
3655current line is cleared.
3656</DL>
3657</P><P>
a44161c3 3658
b585a9fa 3659<A NAME="IDX283"></A>
84041b4c
EZ
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>
3663characters, possibly reallocating it if necessary.
3664</DL>
3665</P><P>
3666
b585a9fa 3667<A NAME="IDX284"></A>
a44161c3 3668<DL>
84041b4c
EZ
3669<DT><U>Function:</U> int <B>rl_initialize</B> <I>(void)</I>
3670<DD>Initialize or re-initialize Readline's internal state.
3671It's not strictly necessary to call this; <CODE>readline()</CODE> calls it before
3672reading any input.
a44161c3 3673</DL>
84041b4c 3674</P><P>
a44161c3 3675
b585a9fa 3676<A NAME="IDX285"></A>
a44161c3 3677<DL>
84041b4c
EZ
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>.
a44161c3 3680</DL>
84041b4c 3681</P><P>
a44161c3 3682
b585a9fa 3683<A NAME="IDX286"></A>
a44161c3 3684<DL>
84041b4c
EZ
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.
a44161c3 3687</DL>
84041b4c 3688</P><P>
a44161c3 3689
b585a9fa 3690<A NAME="IDX287"></A>
a44161c3
EZ
3691<DL>
3692<DT><U>Function:</U> void <B>rl_display_match_list</B> <I>(char **matches, int len, int max)</I>
84041b4c 3693<DD>A convenience function for displaying a list of strings in
a44161c3
EZ
3694columnar format on Readline's output stream. <CODE>matches</CODE> is the list
3695of 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>
3697is the length of the longest string in <CODE>matches</CODE>. This function uses
3698the setting of <CODE>print-completions-horizontally</CODE> to select how the
84041b4c 3699matches are displayed (see section <A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A>).
a44161c3 3700</DL>
84041b4c 3701</P><P>
a44161c3 3702
84041b4c
EZ
3703The following are implemented as macros, defined in <CODE>chardefs.h</CODE>.
3704Applications should refrain from using them.
3705</P><P>
a44161c3 3706
b585a9fa 3707<A NAME="IDX288"></A>
a44161c3 3708<DL>
84041b4c
EZ
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.
a44161c3 3711</DL>
84041b4c 3712</P><P>
a44161c3 3713
b585a9fa 3714<A NAME="IDX289"></A>
a44161c3 3715<DL>
84041b4c
EZ
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.
a44161c3 3718</DL>
84041b4c 3719</P><P>
a44161c3 3720
b585a9fa 3721<A NAME="IDX290"></A>
a44161c3 3722<DL>
84041b4c
EZ
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.
a44161c3 3725</DL>
84041b4c 3726</P><P>
a44161c3 3727
b585a9fa 3728<A NAME="IDX291"></A>
a44161c3 3729<DL>
84041b4c
EZ
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
a44161c3
EZ
3732uppercase character.
3733</DL>
84041b4c 3734</P><P>
a44161c3 3735
b585a9fa 3736<A NAME="IDX292"></A>
a44161c3 3737<DL>
84041b4c
EZ
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
a44161c3
EZ
3740lowercase character.
3741</DL>
84041b4c 3742</P><P>
a44161c3 3743
b585a9fa 3744<A NAME="IDX293"></A>
84041b4c
EZ
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>
b585a9fa 3762<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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
b585a9fa 3769<A NAME="IDX294"></A>
a44161c3 3770<DL>
84041b4c
EZ
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>.
3773The 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;
3775use <CODE>rl_generic_bind()</CODE> instead.
a44161c3 3776</DL>
84041b4c 3777</P><P>
a44161c3 3778
b585a9fa 3779<A NAME="IDX295"></A>
84041b4c
EZ
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
3783the current keymap, to <CODE>rl_outstream</CODE>.
3784If <VAR>readable</VAR> is non-zero, the list is formatted in such a way
3785that it can be made part of an <CODE>inputrc</CODE> file and re-read.
3786</DL>
3787</P><P>
3788
b585a9fa 3789<A NAME="IDX296"></A>
84041b4c
EZ
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>.
3793This behaves as if the readline command
3794<SAMP>`set <VAR>variable</VAR> <VAR>value</VAR>'</SAMP> had been executed in an <CODE>inputrc</CODE>
3795file (see section <A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A>).
3796</DL>
3797</P><P>
a44161c3 3798
b585a9fa
EZ
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>.
3803For boolean variables, this string is either <SAMP>`on'</SAMP> or <SAMP>`off'</SAMP>.
3804</DL>
3805</P><P>
3806
3807<A NAME="IDX298"></A>
84041b4c
EZ
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
3811to <CODE>rl_outstream</CODE>.
3812If <VAR>readable</VAR> is non-zero, the list is formatted in such a way
3813that it can be made part of an <CODE>inputrc</CODE> file and re-read.
3814</DL>
3815</P><P>
a44161c3 3816
b585a9fa 3817<A NAME="IDX299"></A>
84041b4c
EZ
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
3821a balancing character when <CODE>blink-matching-paren</CODE> has been enabled.
3822</DL>
3823</P><P>
a44161c3 3824
b585a9fa 3825<A NAME="IDX300"></A>
84041b4c
EZ
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>.
3829Readline fetches the termcap entry for the current terminal name and
3830uses those capabilities to move around the screen line and perform other
3831terminal-specific operations, like erasing a line. Readline does not
3832use all of a terminal's capabilities, and this function will return
3833values 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>
b585a9fa 3848<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 3853<P>
84041b4c 3854
a44161c3
EZ
3855An alternate interface is available to plain <CODE>readline()</CODE>. Some
3856applications need to interleave keyboard I/O with file, device, or
3857window system I/O, typically by using a main loop to <CODE>select()</CODE>
3858on various file descriptors. To accomodate this need, readline can
3859also be invoked as a `callback' function from an event loop. There
3860are functions available to make this easy.
84041b4c 3861</P><P>
a44161c3 3862
b585a9fa 3863<A NAME="IDX301"></A>
a44161c3 3864<DL>
84041b4c
EZ
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
a44161c3 3867expanded value of <VAR>prompt</VAR>. Save the value of <VAR>lhandler</VAR> to
84041b4c
EZ
3868use as a function to call when a complete line of input has been entered.
3869The function takes the text of the line as an argument.
a44161c3 3870</DL>
84041b4c 3871</P><P>
a44161c3 3872
b585a9fa 3873<A NAME="IDX302"></A>
a44161c3 3874<DL>
84041b4c
EZ
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
a44161c3 3877should call <CODE>rl_callback_read_char()</CODE>, which will read the next
84041b4c
EZ
3878character from the current input source.
3879If that character completes the line, <CODE>rl_callback_read_char</CODE> will
3880invoke the <VAR>lhandler</VAR> function saved by <CODE>rl_callback_handler_install</CODE>
3881to process the line.
3882Before calling the <VAR>lhandler</VAR> function, the terminal settings are
3883reset to the values they had before calling
3884<CODE>rl_callback_handler_install</CODE>.
3885If the <VAR>lhandler</VAR> function returns,
3886the terminal settings are modified for Readline's use again.
3887<CODE>EOF</CODE> is indicated by calling <VAR>lhandler</VAR> with a
a44161c3
EZ
3888<CODE>NULL</CODE> line.
3889</DL>
84041b4c 3890</P><P>
a44161c3 3891
b585a9fa 3892<A NAME="IDX303"></A>
a44161c3 3893<DL>
84041b4c
EZ
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.
a44161c3 3896This may be called from within a callback as well as independently.
84041b4c
EZ
3897If the <VAR>lhandler</VAR> installed by <CODE>rl_callback_handler_install</CODE>
3898does not exit the program, either this function or the function referred
3899to by the value of <CODE>rl_deprep_term_function</CODE> should be called before
3900the 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>
b585a9fa 3915<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 3920<P>
84041b4c 3921
a44161c3
EZ
3922Here is a function which changes lowercase characters to their uppercase
3923equivalents, and uppercase characters to lowercase. If
3924this function was bound to <SAMP>`M-c'</SAMP>, then typing <SAMP>`M-c'</SAMP> would
3925change the case of the character under point. Typing <SAMP>`M-1 0 M-c'</SAMP>
3926would change the case of the following 10 characters, leaving the cursor on
3927the last character changed.
84041b4c 3928</P><P>
a44161c3 3929
84041b4c 3930<TABLE><tr><td>&nbsp;</td><td class=example><pre>/* Invert the case of the COUNT following characters. */
a44161c3
EZ
3931int
3932invert_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
84041b4c
EZ
3969 /* Tell readline that we are modifying the line,
3970 so it will save the undo information. */
a44161c3
EZ
3971 rl_modifying (start, end);
3972
3973 for (i = start; i != end; i++)
3974 {
84041b4c
EZ
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]);
a44161c3
EZ
3979 }
3980 /* Move point to on top of the last character changed. */
3981 rl_point = (direction == 1) ? end - 1 : start;
3982 return (0);
3983}
84041b4c
EZ
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>
b585a9fa 3994<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
84041b4c
EZ
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>
b585a9fa 3997<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 4002<P>
84041b4c 4003
a44161c3
EZ
4004Signals are asynchronous events sent to a process by the Unix kernel,
4005sometimes on behalf of another process. They are intended to indicate
84041b4c
EZ
4006exceptional events, like a user pressing the interrupt key on his terminal,
4007or a network connection being broken. There is a class of signals that can
4008be sent to the process currently reading input from the keyboard. Since
4009Readline changes the terminal attributes when it is called, it needs to
4010perform special processing when such a signal is received in order to
4011restore the terminal to a sane state, or provide application writers with
4012functions to do so manually.
4013</P><P>
a44161c3 4014
a44161c3
EZ
4015Readline contains an internal signal handler that is installed for a
4016number 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>).
4018When one of these signals is received, the signal handler
4019will reset the terminal attributes to those that were in effect before
84041b4c
EZ
4020<CODE>readline()</CODE> was called, reset the signal handling to what it was
4021before <CODE>readline()</CODE> was called, and resend the signal to the calling
a44161c3
EZ
4022application.
4023If and when the calling application's signal handler returns, Readline
4024will reinitialize the terminal and continue to accept input.
4025When a <CODE>SIGINT</CODE> is received, the Readline signal handler performs
4026some additional work, which will cause any partially-entered line to be
84041b4c
EZ
4027aborted (see the description of <CODE>rl_free_line_state()</CODE> below).
4028</P><P>
a44161c3 4029
a44161c3
EZ
4030There is an additional Readline signal handler, for <CODE>SIGWINCH</CODE>, which
4031the kernel sends to a process whenever the terminal's size changes (for
4032example, if a user resizes an <CODE>xterm</CODE>). The Readline <CODE>SIGWINCH</CODE>
84041b4c
EZ
4033handler updates Readline's internal screen size information, and then calls
4034any <CODE>SIGWINCH</CODE> signal handler the calling application has installed.
a44161c3
EZ
4035Readline calls the application's <CODE>SIGWINCH</CODE> signal handler without
4036resetting the terminal to its original state. If the application's signal
4037handler does more than update its idea of the terminal size and return (for
4038example, a <CODE>longjmp</CODE> back to a main processing loop), it <EM>must</EM>
84041b4c 4039call <CODE>rl_cleanup_after_signal()</CODE> (described below), to restore the
a44161c3 4040terminal state.
84041b4c 4041</P><P>
a44161c3 4042
a44161c3
EZ
4043Readline provides two variables that allow application writers to
4044control whether or not it will catch certain signals and act on them
4045when they are received. It is important that applications change the
84041b4c 4046values of these variables only when calling <CODE>readline()</CODE>, not in
a44161c3 4047a signal handler, so Readline's internal signal state is not corrupted.
84041b4c 4048</P><P>
a44161c3 4049
b585a9fa 4050<A NAME="IDX304"></A>
a44161c3
EZ
4051<DL>
4052<DT><U>Variable:</U> int <B>rl_catch_signals</B>
84041b4c 4053<DD>If this variable is non-zero, Readline will install signal handlers for
a44161c3
EZ
4054<CODE>SIGINT</CODE>, <CODE>SIGQUIT</CODE>, <CODE>SIGTERM</CODE>, <CODE>SIGALRM</CODE>,
4055<CODE>SIGTSTP</CODE>, <CODE>SIGTTIN</CODE>, and <CODE>SIGTTOU</CODE>.
84041b4c 4056</P><P>
a44161c3 4057
a44161c3
EZ
4058The default value of <CODE>rl_catch_signals</CODE> is 1.
4059</DL>
84041b4c 4060</P><P>
a44161c3 4061
b585a9fa 4062<A NAME="IDX305"></A>
a44161c3
EZ
4063<DL>
4064<DT><U>Variable:</U> int <B>rl_catch_sigwinch</B>
84041b4c 4065<DD>If this variable is non-zero, Readline will install a signal handler for
a44161c3 4066<CODE>SIGWINCH</CODE>.
84041b4c 4067</P><P>
a44161c3 4068
a44161c3
EZ
4069The default value of <CODE>rl_catch_sigwinch</CODE> is 1.
4070</DL>
84041b4c 4071</P><P>
a44161c3 4072
a44161c3
EZ
4073If an application does not wish to have Readline catch any signals, or
4074to handle signals other than those Readline catches (<CODE>SIGHUP</CODE>,
4075for example),
4076Readline provides convenience functions to do the necessary terminal
4077and internal state cleanup upon receipt of a signal.
84041b4c 4078</P><P>
a44161c3 4079
b585a9fa 4080<A NAME="IDX306"></A>
a44161c3
EZ
4081<DL>
4082<DT><U>Function:</U> void <B>rl_cleanup_after_signal</B> <I>(void)</I>
84041b4c
EZ
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
a44161c3
EZ
4085all signals, depending on the values of <CODE>rl_catch_signals</CODE> and
4086<CODE>rl_catch_sigwinch</CODE>.
4087</DL>
84041b4c 4088</P><P>
a44161c3 4089
b585a9fa 4090<A NAME="IDX307"></A>
a44161c3
EZ
4091<DL>
4092<DT><U>Function:</U> void <B>rl_free_line_state</B> <I>(void)</I>
84041b4c 4093<DD>This will free any partial state associated with the current input line
a44161c3
EZ
4094(undo information, any partial history entry, any partially-entered
4095keyboard macro, and any partially-entered numeric argument). This
84041b4c 4096should be called before <CODE>rl_cleanup_after_signal()</CODE>. The
a44161c3
EZ
4097Readline signal handler for <CODE>SIGINT</CODE> calls this to abort the
4098current input line.
4099</DL>
84041b4c 4100</P><P>
a44161c3 4101
b585a9fa 4102<A NAME="IDX308"></A>
a44161c3
EZ
4103<DL>
4104<DT><U>Function:</U> void <B>rl_reset_after_signal</B> <I>(void)</I>
84041b4c 4105<DD>This will reinitialize the terminal and reinstall any Readline signal
a44161c3
EZ
4106handlers, depending on the values of <CODE>rl_catch_signals</CODE> and
4107<CODE>rl_catch_sigwinch</CODE>.
4108</DL>
84041b4c 4109</P><P>
a44161c3 4110
a44161c3 4111If an application does not wish Readline to catch <CODE>SIGWINCH</CODE>, it may
84041b4c
EZ
4112call <CODE>rl_resize_terminal()</CODE> or <CODE>rl_set_screen_size()</CODE> to force
4113Readline to update its idea of the terminal size when a <CODE>SIGWINCH</CODE>
4114is received.
4115</P><P>
a44161c3 4116
b585a9fa 4117<A NAME="IDX309"></A>
a44161c3
EZ
4118<DL>
4119<DT><U>Function:</U> void <B>rl_resize_terminal</B> <I>(void)</I>
84041b4c 4120<DD>Update Readline's internal screen size by reading values from the kernel.
a44161c3 4121</DL>
84041b4c
EZ
4122</P><P>
4123
b585a9fa 4124<A NAME="IDX310"></A>
84041b4c
EZ
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
b585a9fa
EZ
4128<VAR>cols</VAR> columns. If either <VAR>rows</VAR> or <VAR>columns</VAR> is less than
4129or equal to 0, Readline's idea of that terminal dimension is unchanged.
84041b4c
EZ
4130</DL>
4131</P><P>
4132
4133If an application does not want to install a <CODE>SIGWINCH</CODE> handler, but
4134is still interested in the screen dimensions, Readline's idea of the screen
4135size may be queried.
4136</P><P>
4137
b585a9fa 4138<A NAME="IDX311"></A>
84041b4c
EZ
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
4142variables pointed to by the arguments.
4143</DL>
4144</P><P>
a44161c3 4145
b585a9fa
EZ
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
a44161c3 4153The following functions install and remove Readline's signal handlers.
84041b4c 4154</P><P>
a44161c3 4155
b585a9fa 4156<A NAME="IDX313"></A>
a44161c3
EZ
4157<DL>
4158<DT><U>Function:</U> int <B>rl_set_signals</B> <I>(void)</I>
84041b4c 4159<DD>Install Readline's signal handler for <CODE>SIGINT</CODE>, <CODE>SIGQUIT</CODE>,
a44161c3
EZ
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>
84041b4c 4164</P><P>
a44161c3 4165
b585a9fa 4166<A NAME="IDX314"></A>
a44161c3
EZ
4167<DL>
4168<DT><U>Function:</U> int <B>rl_clear_signals</B> <I>(void)</I>
84041b4c
EZ
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>
b585a9fa 4182<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
84041b4c
EZ
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>
b585a9fa 4185<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 4190<P>
84041b4c 4191
a44161c3
EZ
4192Typically, a program that reads commands from the user has a way of
4193disambiguating commands and data. If your program is one of these, then
4194it can provide completion for commands, data, or both.
4195The following sections describe how your program and Readline
4196cooperate to provide this service.
84041b4c
EZ
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>
b585a9fa 4215<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
84041b4c
EZ
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>
b585a9fa 4218<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 4223<P>
84041b4c 4224
a44161c3
EZ
4225In order to complete some text, the full list of possible completions
4226must be available. That is, it is not possible to accurately
4227expand a partial word without knowing all of the possible words
4228which make sense in that context. The Readline library provides
4229the user interface to completion, and two of the most common
4230completion functions: filename and username. For completing other types
4231of text, you must write your own completion function. This section
4232describes exactly what such functions must do, and provides an example.
84041b4c 4233</P><P>
a44161c3 4234
a44161c3 4235There are three major functions used to perform completion:
84041b4c 4236</P><P>
a44161c3
EZ
4237
4238<OL>
4239<LI>
84041b4c
EZ
4240The user-interface function <CODE>rl_complete()</CODE>. This function is
4241called with the same arguments as other bindable Readline functions:
4242<VAR>count</VAR> and <VAR>invoking_key</VAR>.
4243It isolates the word to be completed and calls
4244<CODE>rl_completion_matches()</CODE> to generate a list of possible completions.
a44161c3
EZ
4245It then either lists the possible completions, inserts the possible
4246completions, or actually performs the
4247completion, depending on which behavior is desired.
84041b4c 4248<P>
a44161c3
EZ
4249
4250<LI>
84041b4c
EZ
4251The internal function <CODE>rl_completion_matches()</CODE> uses an
4252application-supplied <EM>generator</EM> function to generate the list of
4253possible matches, and then returns the array of these matches.
4254The caller should place the address of its generator function in
4255<CODE>rl_completion_entry_function</CODE>.
4256<P>
a44161c3
EZ
4257
4258<LI>
a44161c3 4259The generator function is called repeatedly from
84041b4c 4260<CODE>rl_completion_matches()</CODE>, returning a string each time. The
a44161c3
EZ
4261arguments 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
4263first time the function is called, allowing the generator to perform
4264any necessary initialization, and a positive non-zero integer for
84041b4c
EZ
4265each subsequent call. The generator function returns
4266<CODE>(char *)NULL</CODE> to inform <CODE>rl_completion_matches()</CODE> that there are
a44161c3
EZ
4267no more possibilities left. Usually the generator function computes the
4268list of possible completions when <VAR>state</VAR> is zero, and returns them
4269one at a time on subsequent calls. Each string the generator function
4270returns as a match must be allocated with <CODE>malloc()</CODE>; Readline
4271frees the strings when it has finished with them.
b585a9fa
EZ
4272Such a generator function is referred to as an
4273<EM>application-specific completion function</EM>.
84041b4c 4274<P>
a44161c3
EZ
4275
4276</OL>
a44161c3 4277<P>
84041b4c 4278
b585a9fa 4279<A NAME="IDX315"></A>
a44161c3
EZ
4280<DL>
4281<DT><U>Function:</U> int <B>rl_complete</B> <I>(int ignore, int invoking_key)</I>
84041b4c 4282<DD>Complete the word at or before point. You have supplied the function
a44161c3 4283that does the initial simple matching selection algorithm (see
84041b4c 4284<CODE>rl_completion_matches()</CODE>). The default is to do filename completion.
a44161c3 4285</DL>
84041b4c 4286</P><P>
a44161c3 4287
b585a9fa 4288<A NAME="IDX316"></A>
a44161c3 4289<DL>
84041b4c
EZ
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>.
4293If the value of <CODE>rl_completion_entry_function</CODE> is
4294<CODE>NULL</CODE> then the default filename generator
4295function, <CODE>rl_filename_completion_function()</CODE>, is used.
b585a9fa
EZ
4296An <EM>application-specific completion function</EM> is a function whose
4297address is assigned to <CODE>rl_completion_entry_function</CODE> and whose
4298return values are used to generate possible completions.
84041b4c
EZ
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>
b585a9fa 4310<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
84041b4c
EZ
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>
b585a9fa 4313<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 4318<P>
84041b4c 4319
a44161c3
EZ
4320Here is the complete list of callable completion functions present in
4321Readline.
84041b4c 4322</P><P>
a44161c3 4323
b585a9fa 4324<A NAME="IDX317"></A>
a44161c3
EZ
4325<DL>
4326<DT><U>Function:</U> int <B>rl_complete_internal</B> <I>(int what_to_do)</I>
84041b4c 4327<DD>Complete the word at or before point. <VAR>what_to_do</VAR> says what to do
a44161c3
EZ
4328with the completion. A value of <SAMP>`?'</SAMP> means list the possible
4329completions. <SAMP>`TAB'</SAMP> means do standard completion. <SAMP>`*'</SAMP> means
4330insert all of the possible completions. <SAMP>`!'</SAMP> means to display
4331all of the possible completions, if there is more than one, as well as
b585a9fa
EZ
4332performing partial completion. <SAMP>`@'</SAMP> is similar to <SAMP>`!'</SAMP>, but
4333possible completions are not listed if the possible completions share
4334a common prefix.
a44161c3 4335</DL>
84041b4c 4336</P><P>
a44161c3 4337
b585a9fa 4338<A NAME="IDX318"></A>
a44161c3
EZ
4339<DL>
4340<DT><U>Function:</U> int <B>rl_complete</B> <I>(int ignore, int invoking_key)</I>
84041b4c 4341<DD>Complete the word at or before point. You have supplied the function
a44161c3 4342that does the initial simple matching selection algorithm (see
84041b4c 4343<CODE>rl_completion_matches()</CODE> and <CODE>rl_completion_entry_function</CODE>).
a44161c3 4344The default is to do filename
84041b4c 4345completion. This calls <CODE>rl_complete_internal()</CODE> with an
a44161c3
EZ
4346argument depending on <VAR>invoking_key</VAR>.
4347</DL>
84041b4c 4348</P><P>
a44161c3 4349
b585a9fa 4350<A NAME="IDX319"></A>
a44161c3 4351<DL>
84041b4c
EZ
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
a44161c3
EZ
4355<SAMP>`?'</SAMP>.
4356</DL>
84041b4c 4357</P><P>
a44161c3 4358
b585a9fa 4359<A NAME="IDX320"></A>
a44161c3 4360<DL>
84041b4c
EZ
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
4363partially-completed word. See description of <CODE>rl_complete()</CODE>.
4364This calls <CODE>rl_complete_internal()</CODE> with an argument of <SAMP>`*'</SAMP>.
a44161c3 4365</DL>
84041b4c 4366</P><P>
a44161c3 4367
b585a9fa 4368<A NAME="IDX321"></A>
84041b4c
EZ
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>
4372depending on whether <VAR>cfunc</VAR> was called twice in succession and
b585a9fa
EZ
4373the values of the <CODE>show-all-if-ambiguous</CODE> and
4374<CODE>show-all-if-unmodified</CODE> variables.
84041b4c
EZ
4375Application-specific completion functions may use this function to present
4376the same interface as <CODE>rl_complete()</CODE>.
4377</DL>
4378</P><P>
4379
b585a9fa 4380<A NAME="IDX322"></A>
a44161c3 4381<DL>
84041b4c
EZ
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>.
a44161c3
EZ
4385The first entry in the returned array is the substitution for <VAR>text</VAR>.
4386The remaining entries are the possible completions. The array is
4387terminated with a <CODE>NULL</CODE> pointer.
84041b4c 4388</P><P>
a44161c3 4389
a44161c3 4390<VAR>entry_func</VAR> is a function of two args, and returns a
84041b4c 4391<CODE>char *</CODE>. The first argument is <VAR>text</VAR>. The second is a
a44161c3
EZ
4392state argument; it is zero on the first call, and non-zero on subsequent
4393calls. <VAR>entry_func</VAR> returns a <CODE>NULL</CODE> pointer to the caller
4394when there are no more matches.
4395</DL>
84041b4c 4396</P><P>
a44161c3 4397
b585a9fa 4398<A NAME="IDX323"></A>
a44161c3 4399<DL>
84041b4c
EZ
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.
b585a9fa 4403The Bash source is a useful reference for writing application-specific
84041b4c
EZ
4404completion functions (the Bash completion functions call this and other
4405Readline functions).
a44161c3 4406</DL>
84041b4c 4407</P><P>
a44161c3 4408
b585a9fa 4409<A NAME="IDX324"></A>
a44161c3 4410<DL>
84041b4c
EZ
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
a44161c3
EZ
4413username preceded by a random character (usually <SAMP>`~'</SAMP>). As with all
4414completion generators, <VAR>state</VAR> is zero on the first call and non-zero
4415for subsequent calls.
4416</DL>
84041b4c
EZ
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>
b585a9fa 4427<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
84041b4c
EZ
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>
b585a9fa 4430<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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
b585a9fa 4437<A NAME="IDX325"></A>
a44161c3 4438<DL>
84041b4c
EZ
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>.
b585a9fa
EZ
4441<CODE>NULL</CODE> means to use <CODE>rl_filename_completion_function()</CODE>,
4442the default filename completer.
a44161c3 4443</DL>
84041b4c 4444</P><P>
a44161c3 4445
b585a9fa 4446<A NAME="IDX326"></A>
a44161c3 4447<DL>
84041b4c
EZ
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.
a44161c3 4450The function is called with <VAR>text</VAR>, <VAR>start</VAR>, and <VAR>end</VAR>.
84041b4c
EZ
4451<VAR>start</VAR> and <VAR>end</VAR> are indices in <CODE>rl_line_buffer</CODE> defining
4452the boundaries of <VAR>text</VAR>, which is a character string.
4453If this function exists and returns <CODE>NULL</CODE>, or if this variable is
4454set to <CODE>NULL</CODE>, then <CODE>rl_complete()</CODE> will call the value of
a44161c3
EZ
4455<CODE>rl_completion_entry_function</CODE> to generate matches, otherwise the
4456array of strings returned will be used.
84041b4c
EZ
4457If this function sets the <CODE>rl_attempted_completion_over</CODE>
4458variable to a non-zero value, Readline will not perform its default
4459completion even if this function returns no matches.
a44161c3 4460</DL>
84041b4c 4461</P><P>
a44161c3 4462
b585a9fa 4463<A NAME="IDX327"></A>
a44161c3 4464<DL>
84041b4c
EZ
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
4467application-specific fashion. This is called if filename completion is being
a44161c3
EZ
4468attempted and one of the characters in <CODE>rl_filename_quote_characters</CODE>
4469appears 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>
4471is 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
4474insert a closing quote character. The <VAR>quote_pointer</VAR> is a pointer
4475to any opening quote character the user typed. Some functions choose
4476to reset this character.
4477</DL>
84041b4c 4478</P><P>
a44161c3 4479
b585a9fa 4480<A NAME="IDX328"></A>
a44161c3 4481<DL>
84041b4c
EZ
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
a44161c3
EZ
4484characters from a filename before completion is attempted, so those
4485characters do not interfere with matching the text against names in
4486the filesystem. It is called with <VAR>text</VAR>, the text of the word
4487to be dequoted, and <VAR>quote_char</VAR>, which is the quoting character
4488that 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>
84041b4c 4491</P><P>
a44161c3 4492
b585a9fa 4493<A NAME="IDX329"></A>
a44161c3 4494<DL>
84041b4c
EZ
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
a44161c3 4497character in the line buffer is quoted, according to whatever quoting
84041b4c 4498mechanism the program calling Readline uses. The function is called with
a44161c3
EZ
4499two arguments: <VAR>text</VAR>, the text of the line, and <VAR>index</VAR>, the
4500index of the character in the line. It is used to decide whether a
4501character found in <CODE>rl_completer_word_break_characters</CODE> should be
4502used to break words for the completer.
4503</DL>
84041b4c 4504</P><P>
a44161c3 4505
b585a9fa 4506<A NAME="IDX330"></A>
a44161c3 4507<DL>
84041b4c
EZ
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
4510completion is done, after all the matching names have been generated.
4511It is passed a <CODE>NULL</CODE> terminated array of matches.
4512The first element (<CODE>matches[0]</CODE>) is the
4513maximal substring common to all matches. This function can
4514re-arrange the list of matches as required, but each element deleted
4515from the array must be freed.
a44161c3 4516</DL>
84041b4c 4517</P><P>
a44161c3 4518
b585a9fa 4519<A NAME="IDX331"></A>
a44161c3 4520<DL>
84041b4c
EZ
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
4523of filenames Readline completes. It is called with the address of a
4524string (the current directory name) as an argument, and may modify that string.
4525If the string is replaced with a new string, the old value should be freed.
4526Any modified directory name should have a trailing slash.
4527The modified value will be displayed as part of the completion, replacing
4528the directory portion of the pathname the user typed.
4529It returns an integer that should be non-zero if the function modifies
4530its directory argument.
4531It could be used to expand symbolic links or shell variables in pathnames.
4532</DL>
4533</P><P>
4534
b585a9fa 4535<A NAME="IDX332"></A>
84041b4c
EZ
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
4539completing a word would normally display the list of possible matches.
4540This function is called in lieu of Readline displaying the list.
4541It takes three arguments:
4542(<CODE>char **</CODE><VAR>matches</VAR>, <CODE>int</CODE> <VAR>num_matches</VAR>, <CODE>int</CODE> <VAR>max_length</VAR>)
4543where <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.
4546Readline provides a convenience function, <CODE>rl_display_match_list</CODE>,
4547that takes care of doing the display to Readline's output stream. That
4548function may be called from this hook.
4549</DL>
4550</P><P>
4551
b585a9fa 4552<A NAME="IDX333"></A>
84041b4c
EZ
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
a44161c3 4556completer routine. The default value of this variable is the characters
84041b4c
EZ
4557which break words for completion in Bash:
4558<CODE>" \t\n\"\\'`@$>&#60;=;|&#38;{("</CODE>.
a44161c3 4559</DL>
84041b4c 4560</P><P>
a44161c3 4561
b585a9fa 4562<A NAME="IDX334"></A>
a44161c3 4563<DL>
84041b4c
EZ
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.
a44161c3 4566</DL>
84041b4c 4567</P><P>
a44161c3 4568
b585a9fa 4569<A NAME="IDX335"></A>
a44161c3 4570<DL>
84041b4c
EZ
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
a44161c3
EZ
4574<CODE>rl_basic_word_break_characters</CODE>.
4575</DL>
84041b4c 4576</P><P>
a44161c3 4577
b585a9fa
EZ
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
4582deciding where to separate words for word completion. It should return
4583a character string like <CODE>rl_completer_word_break_characters</CODE> to be
4584used to perform the current completion. The function may choose to set
4585<CODE>rl_completer_word_break_characters</CODE> itself. If the function
4586returns <CODE>NULL</CODE>, <CODE>rl_completer_word_break_characters</CODE> is used.
4587</DL>
4588</P><P>
4589
4590<A NAME="IDX337"></A>
a44161c3 4591<DL>
84041b4c
EZ
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.
a44161c3
EZ
4594Completion occurs on the entire substring, and within the substring
4595<CODE>rl_completer_word_break_characters</CODE> are treated as any other character,
4596unless they also appear within this list.
4597</DL>
84041b4c 4598</P><P>
a44161c3 4599
b585a9fa 4600<A NAME="IDX338"></A>
a44161c3 4601<DL>
84041b4c
EZ
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
a44161c3
EZ
4604when they appear in a completed filename. The default is the null string.
4605</DL>
84041b4c 4606</P><P>
a44161c3 4607
b585a9fa 4608<A NAME="IDX339"></A>
a44161c3 4609<DL>
84041b4c
EZ
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
a44161c3
EZ
4612left in <VAR>text</VAR> when it is passed to the completion function.
4613Programs can use this to help determine what kind of completing to do.
4614For instance, Bash sets this variable to "$@" so that it can complete
4615shell variables and hostnames.
4616</DL>
84041b4c 4617</P><P>
a44161c3 4618
b585a9fa 4619<A NAME="IDX340"></A>
84041b4c
EZ
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
b585a9fa
EZ
4623possible-completions call. After that, readline asks the user if she is sure
4624she wants to see them all. The default value is 100. A negative value
4625indicates that Readline should never ask the user.
84041b4c
EZ
4626</DL>
4627</P><P>
4628
b585a9fa 4629<A NAME="IDX341"></A>
a44161c3
EZ
4630<DL>
4631<DT><U>Variable:</U> int <B>rl_completion_append_character</B>
84041b4c 4632<DD>When a single completion alternative matches at the end of the command
a44161c3
EZ
4633line, this character is appended to the inserted completion text. The
4634default is a space character (<SAMP>` '</SAMP>). Setting this to the null
4635character (<SAMP>`\0'</SAMP>) prevents anything being appended automatically.
b585a9fa 4636This can be changed in application-specific completion functions to
a44161c3
EZ
4637provide the "most sensible word separator character" according to
4638an application-specific command line syntax specification.
4639</DL>
84041b4c 4640</P><P>
a44161c3 4641
b585a9fa 4642<A NAME="IDX342"></A>
84041b4c
EZ
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
b585a9fa
EZ
4646matches at the end of the command line, as described above.
4647It is set to 0 before any application-specific completion function
4648is called, and may only be changed within such a function.
84041b4c
EZ
4649</DL>
4650</P><P>
4651
b585a9fa
EZ
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
4656characters in <VAR>rl_completer_quote_characters</VAR>, it sets this variable
4657to the quoting character found.
4658This 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
4666performing completion on a quoted string.
4667It is set to 0 before any application-specific completion function
4668is 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
4676to a non-zero value if the word being completed contains or is delimited
4677by any quoting characters, including backslashes.
4678This is set before any application-specific completion function is called.
4679</DL>
4680</P><P>
4681
4682<A NAME="IDX346"></A>
84041b4c
EZ
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
4686symbolic links to directory names, subject to the value of the
4687user-settable <VAR>mark-directories</VAR> variable.
b585a9fa
EZ
4688This variable exists so that application-specific completion functions
4689can override the user's global preference (set via the
84041b4c
EZ
4690<VAR>mark-symlinked-directories</VAR> Readline variable) if appropriate.
4691This variable is set to the user's preference before any
b585a9fa
EZ
4692application-specific completion function is called, so unless that
4693function modifies the value, the user's preferences are honored.
84041b4c
EZ
4694</DL>
4695</P><P>
4696
b585a9fa 4697<A NAME="IDX347"></A>
a44161c3
EZ
4698<DL>
4699<DT><U>Variable:</U> int <B>rl_ignore_completion_duplicates</B>
84041b4c
EZ
4700<DD>If non-zero, then duplicates in the matches are removed.
4701The default is 1.
a44161c3 4702</DL>
84041b4c 4703</P><P>
a44161c3 4704
b585a9fa 4705<A NAME="IDX348"></A>
a44161c3
EZ
4706<DL>
4707<DT><U>Variable:</U> int <B>rl_filename_completion_desired</B>
84041b4c 4708<DD>Non-zero means that the results of the matches are to be treated as
b585a9fa
EZ
4709filenames. This is <EM>always</EM> zero when completion is attempted,
4710and can only be changed
4711within an application-specific completion function. If it is set to a
4712non-zero value by such a function, directory names have a slash appended
4713and Readline attempts to quote completed filenames if they contain any
4714characters in <CODE>rl_filename_quote_characters</CODE> and
4715<CODE>rl_filename_quoting_desired</CODE> is set to a non-zero value.
a44161c3 4716</DL>
84041b4c 4717</P><P>
a44161c3 4718
b585a9fa 4719<A NAME="IDX349"></A>
a44161c3
EZ
4720<DL>
4721<DT><U>Variable:</U> int <B>rl_filename_quoting_desired</B>
84041b4c 4722<DD>Non-zero means that the results of the matches are to be quoted using
a44161c3
EZ
4723double quotes (or an application-specific quoting mechanism) if the
4724completed filename contains any characters in
4725<CODE>rl_filename_quote_chars</CODE>. This is <EM>always</EM> non-zero
b585a9fa
EZ
4726when completion is attempted, and can only be changed within an
4727application-specific completion function.
4728The quoting is effected via a call to the function pointed to
a44161c3
EZ
4729by <CODE>rl_filename_quoting_function</CODE>.
4730</DL>
84041b4c 4731</P><P>
a44161c3 4732
b585a9fa 4733<A NAME="IDX350"></A>
a44161c3 4734<DL>
84041b4c
EZ
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
4738value, Readline will not perform its default filename completion even
4739if the application's completion function returns no matches.
4740It should be set only by an application's completion function.
a44161c3 4741</DL>
84041b4c 4742</P><P>
a44161c3 4743
b585a9fa 4744<A NAME="IDX351"></A>
a44161c3 4745<DL>
84041b4c
EZ
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
4748attempting; 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.
b585a9fa
EZ
4750This is set to the appropriate value before any application-specific
4751completion function is called, allowing such functions to present
4752the same interface as <CODE>rl_complete()</CODE>.
a44161c3 4753</DL>
84041b4c 4754</P><P>
a44161c3 4755
b585a9fa 4756<A NAME="IDX352"></A>
a44161c3 4757<DL>
84041b4c
EZ
4758<DT><U>Variable:</U> int <B>rl_inhibit_completion</B>
4759<DD>If this variable is non-zero, completion is inhibited. The completion
4760character will be inserted as any other bound to <CODE>self-insert</CODE>.
a44161c3 4761</DL>
84041b4c
EZ
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>
b585a9fa 4772<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> &gt;&gt; </A>]</TD>
84041b4c
EZ
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>
b585a9fa 4775<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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::-->
a44161c3 4780<P>
a44161c3 4781
a44161c3
EZ
4782Here is a small application demonstrating the use of the GNU Readline
4783library. It is called <CODE>fileman</CODE>, and the source code resides in
4784<TT>`examples/fileman.c'</TT>. This sample application provides
4785completion of command names, line editing features, and access to the
4786history list.
84041b4c 4787</P><P>
a44161c3 4788
84041b4c 4789<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>/* fileman.c -- A tiny application which demonstrates how to use the
a44161c3
EZ
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
a44161c3
EZ
4802extern char *xmalloc ();
4803
4804/* The names of functions that actually do the manipulation. */
84041b4c
EZ
4805int com_list __P((char *));
4806int com_view __P((char *));
4807int com_rename __P((char *));
4808int com_stat __P((char *));
4809int com_pwd __P((char *));
4810int com_delete __P((char *));
4811int com_help __P((char *));
4812int com_cd __P((char *));
4813int com_quit __P((char *));
a44161c3
EZ
4814
4815/* A structure which contains information on the commands this program
4816 can understand. */
4817
4818typedef struct {
4819 char *name; /* User printable name of the function. */
84041b4c 4820 rl_icpfunc_t *func; /* Function to call to do the job. */
a44161c3
EZ
4821 char *doc; /* Documentation for this function. */
4822} COMMAND;
4823
4824COMMAND 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" },
84041b4c 4836 { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL }
a44161c3
EZ
4837};
4838
4839/* Forward declarations. */
4840char *stripwhite ();
4841COMMAND *find_command ();
4842
4843/* The name of this program, as taken from argv[0]. */
4844char *progname;
4845
84041b4c 4846/* When non-zero, this means the user is done using this program. */
a44161c3
EZ
4847int done;
4848
4849char *
4850dupstr (s)
4851 int s;
4852{
4853 char *r;
4854
4855 r = xmalloc (strlen (s) + 1);
4856 strcpy (r, s);
4857 return (r);
4858}
4859
4860main (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. */
4895int
4896execute_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. */
4935COMMAND *
4936find_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. */
4950char *
4951stripwhite (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
84041b4c
EZ
4976char *command_generator __P((const char *, int));
4977char **fileman_completion __P((const char *, int, int));
a44161c3 4978
84041b4c
EZ
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. */
a44161c3
EZ
4982initialize_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. */
84041b4c 4988 rl_attempted_completion_function = fileman_completion;
a44161c3
EZ
4989}
4990
84041b4c
EZ
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. */
a44161c3
EZ
4996char **
4997fileman_completion (text, start, end)
84041b4c 4998 const char *text;
a44161c3
EZ
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)
84041b4c 5009 matches = rl_completion_matches (text, command_generator);
a44161c3
EZ
5010
5011 return (matches);
5012}
5013
84041b4c
EZ
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. */
a44161c3
EZ
5017char *
5018command_generator (text, state)
84041b4c 5019 const char *text;
a44161c3
EZ
5020 int state;
5021{
5022 static int list_index, len;
5023 char *name;
5024
84041b4c
EZ
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. */
a44161c3
EZ
5028 if (!state)
5029 {
5030 list_index = 0;
5031 len = strlen (text);
5032 }
5033
84041b4c
EZ
5034 /* Return the next name which partially matches from the
5035 command list. */
a44161c3
EZ
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. */
5056static char syscom[1024];
5057
5058/* List the file(s) named in arg. */
5059com_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
5069com_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
5079com_rename (arg)
5080 char *arg;
5081{
5082 too_dangerous ("rename");
5083 return (1);
5084}
5085
5086com_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
5113com_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. */
5122com_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. */
5161com_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. */
5175com_pwd (ignore)
5176 char *ignore;
5177{
5178 char dir[1024], *s;
5179
84041b4c 5180 s = getcwd (dir, sizeof(dir) - 1);
a44161c3
EZ
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
84041b4c
EZ
5191/* The user wishes to quit using this program. Just set DONE
5192 non-zero. */
a44161c3
EZ
5193com_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. */
5201too_dangerous (caller)
5202 char *caller;
5203{
5204 fprintf (stderr,
b585a9fa 5205 "%s: Too dangerous for me to distribute.\n",
a44161c3 5206 caller);
84041b4c 5207 fprintf (stderr, "Write it yourself.\n");
a44161c3
EZ
5208}
5209
84041b4c
EZ
5210/* Return non-zero if ARG is a valid argument for CALLER,
5211 else print an error message and return zero. */
a44161c3
EZ
5212int
5213valid_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}
84041b4c
EZ
5224</FONT></pre></td></tr></table></P><P>
5225
b585a9fa 5226<A NAME="Copying This Manual"></A>
84041b4c
EZ
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>
b585a9fa
EZ
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.
527459 Temple Place, Suite 330, Boston, MA 02111-1307, USA
5275
5276Everyone is permitted to copy and distribute verbatim copies
5277of this license document, but changing it is not allowed.
5278</pre></td></tr></table></P><P>
5279
5280<OL>
5281<LI>
5282PREAMBLE
5283<P>
5284
5285The purpose of this License is to make a manual, textbook, or other
5286functional and useful document <EM>free</EM> in the sense of freedom: to
5287assure everyone the effective freedom to copy and redistribute it,
5288with or without modifying it, either commercially or noncommercially.
5289Secondarily, this License preserves for the author and publisher a way
5290to get credit for their work, while not being considered responsible
5291for modifications made by others.
5292</P><P>
5293
5294This License is a kind of "copyleft", which means that derivative
5295works of the document must themselves be free in the same sense. It
5296complements the GNU General Public License, which is a copyleft
5297license designed for free software.
5298</P><P>
5299
5300We have designed this License in order to use it for manuals for free
5301software, because free software needs free documentation: a free
5302program should come with manuals providing the same freedoms that the
5303software does. But this License is not limited to software manuals;
5304it can be used for any textual work, regardless of subject matter or
5305whether it is published as a printed book. We recommend this License
5306principally for works whose purpose is instruction or reference.
5307</P><P>
5308
5309<LI>
5310APPLICABILITY AND DEFINITIONS
5311<P>
5312
5313This License applies to any manual or other work, in any medium, that
5314contains a notice placed by the copyright holder saying it can be
5315distributed under the terms of this License. Such a notice grants a
5316world-wide, royalty-free license, unlimited in duration, to use that
5317work under the conditions stated herein. The "Document", below,
5318refers to any such manual or work. Any member of the public is a
5319licensee, and is addressed as "you". You accept the license if you
5320copy, modify or distribute the work in a way requiring permission
5321under copyright law.
5322</P><P>
5323
5324A "Modified Version" of the Document means any work containing the
5325Document or a portion of it, either copied verbatim, or with
5326modifications and/or translated into another language.
5327</P><P>
5328
5329A "Secondary Section" is a named appendix or a front-matter section
5330of the Document that deals exclusively with the relationship of the
5331publishers or authors of the Document to the Document's overall
5332subject (or to related matters) and contains nothing that could fall
5333directly within that overall subject. (Thus, if the Document is in
5334part a textbook of mathematics, a Secondary Section may not explain
5335any mathematics.) The relationship could be a matter of historical
5336connection with the subject or with related matters, or of legal,
5337commercial, philosophical, ethical or political position regarding
5338them.
5339</P><P>
5340
5341The "Invariant Sections" are certain Secondary Sections whose titles
5342are designated, as being those of Invariant Sections, in the notice
5343that says that the Document is released under this License. If a
5344section does not fit the above definition of Secondary then it is not
5345allowed to be designated as Invariant. The Document may contain zero
5346Invariant Sections. If the Document does not identify any Invariant
5347Sections then there are none.
5348</P><P>
5349
5350The "Cover Texts" are certain short passages of text that are listed,
5351as Front-Cover Texts or Back-Cover Texts, in the notice that says that
5352the Document is released under this License. A Front-Cover Text may
5353be at most 5 words, and a Back-Cover Text may be at most 25 words.
5354</P><P>
5355
5356A "Transparent" copy of the Document means a machine-readable copy,
5357represented in a format whose specification is available to the
5358general public, that is suitable for revising the document
5359straightforwardly with generic text editors or (for images composed of
5360pixels) generic paint programs or (for drawings) some widely available
5361drawing editor, and that is suitable for input to text formatters or
5362for automatic translation to a variety of formats suitable for input
5363to text formatters. A copy made in an otherwise Transparent file
5364format whose markup, or absence of markup, has been arranged to thwart
5365or discourage subsequent modification by readers is not Transparent.
5366An image format is not Transparent if used for any substantial amount
5367of text. A copy that is not "Transparent" is called "Opaque".
5368</P><P>
5369
5370Examples of suitable formats for Transparent copies include plain
5371ASCII without markup, Texinfo input format, LaTeX input
5372format, <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>,
5374PostScript or <FONT SIZE="-1">PDF</FONT> designed for human modification. Examples
5375of 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
5377read 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
5379not generally available, and the machine-generated <FONT SIZE="-1">HTML</FONT>,
5380PostScript or <FONT SIZE="-1">PDF</FONT> produced by some word processors for
5381output purposes only.
5382</P><P>
5383
5384The "Title Page" means, for a printed book, the title page itself,
5385plus such following pages as are needed to hold, legibly, the material
5386this License requires to appear in the title page. For works in
5387formats which do not have any title page as such, "Title Page" means
5388the text near the most prominent appearance of the work's title,
5389preceding the beginning of the body of the text.
5390</P><P>
5391
5392A section "Entitled XYZ" means a named subunit of the Document whose
5393title either is precisely XYZ or contains XYZ in parentheses following
5394text that translates XYZ in another language. (Here XYZ stands for a
5395specific section name mentioned below, such as "Acknowledgements",
5396"Dedications", "Endorsements", or "History".) To "Preserve the Title"
5397of such a section when you modify the Document means that it remains a
5398section "Entitled XYZ" according to this definition.
5399</P><P>
5400
5401The Document may include Warranty Disclaimers next to the notice which
5402states that this License applies to the Document. These Warranty
5403Disclaimers are considered to be included by reference in this
5404License, but only as regards disclaiming warranties: any other
5405implication that these Warranty Disclaimers may have is void and has
5406no effect on the meaning of this License.
5407</P><P>
5408
5409<LI>
5410VERBATIM COPYING
5411<P>
5412
5413You may copy and distribute the Document in any medium, either
5414commercially or noncommercially, provided that this License, the
5415copyright notices, and the license notice saying this License applies
5416to the Document are reproduced in all copies, and that you add no other
5417conditions whatsoever to those of this License. You may not use
5418technical measures to obstruct or control the reading or further
5419copying of the copies you make or distribute. However, you may accept
5420compensation in exchange for copies. If you distribute a large enough
5421number of copies you must also follow the conditions in section 3.
5422</P><P>
5423
5424You may also lend copies, under the same conditions stated above, and
5425you may publicly display copies.
5426</P><P>
5427
5428<LI>
5429COPYING IN QUANTITY
5430<P>
5431
5432If you publish printed copies (or copies in media that commonly have
5433printed covers) of the Document, numbering more than 100, and the
5434Document's license notice requires Cover Texts, you must enclose the
5435copies in covers that carry, clearly and legibly, all these Cover
5436Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
5437the back cover. Both covers must also clearly and legibly identify
5438you as the publisher of these copies. The front cover must present
5439the full title with all words of the title equally prominent and
5440visible. You may add other material on the covers in addition.
5441Copying with changes limited to the covers, as long as they preserve
5442the title of the Document and satisfy these conditions, can be treated
5443as verbatim copying in other respects.
5444</P><P>
5445
5446If the required texts for either cover are too voluminous to fit
5447legibly, you should put the first ones listed (as many as fit
5448reasonably) on the actual cover, and continue the rest onto adjacent
5449pages.
5450</P><P>
5451
5452If you publish or distribute Opaque copies of the Document numbering
5453more than 100, you must either include a machine-readable Transparent
5454copy along with each Opaque copy, or state in or with each Opaque copy
5455a computer-network location from which the general network-using
5456public has access to download using public-standard network protocols
5457a complete Transparent copy of the Document, free of added material.
5458If you use the latter option, you must take reasonably prudent steps,
5459when you begin distribution of Opaque copies in quantity, to ensure
5460that this Transparent copy will remain thus accessible at the stated
5461location until at least one year after the last time you distribute an
5462Opaque copy (directly or through your agents or retailers) of that
5463edition to the public.
5464</P><P>
5465
5466It is requested, but not required, that you contact the authors of the
5467Document well before redistributing any large number of copies, to give
5468them a chance to provide you with an updated version of the Document.
5469</P><P>
5470
5471<LI>
5472MODIFICATIONS
5473<P>
5474
5475You may copy and distribute a Modified Version of the Document under
5476the conditions of sections 2 and 3 above, provided that you release
5477the Modified Version under precisely this License, with the Modified
5478Version filling the role of the Document, thus licensing distribution
5479and modification of the Modified Version to whoever possesses a copy
5480of it. In addition, you must do these things in the Modified Version:
5481</P><P>
5482
5483<OL>
5484<LI>
5485Use in the Title Page (and on the covers, if any) a title distinct
5486from that of the Document, and from those of previous versions
5487(which should, if there were any, be listed in the History section
5488of the Document). You may use the same title as a previous version
5489if the original publisher of that version gives permission.
5490<P>
5491
5492<LI>
5493List on the Title Page, as authors, one or more persons or entities
5494responsible for authorship of the modifications in the Modified
5495Version, together with at least five of the principal authors of the
5496Document (all of its principal authors, if it has fewer than five),
5497unless they release you from this requirement.
5498<P>
5499
5500<LI>
5501State on the Title page the name of the publisher of the
5502Modified Version, as the publisher.
5503<P>
5504
5505<LI>
5506Preserve all the copyright notices of the Document.
5507<P>
5508
5509<LI>
5510Add an appropriate copyright notice for your modifications
5511adjacent to the other copyright notices.
5512<P>
5513
5514<LI>
5515Include, immediately after the copyright notices, a license notice
5516giving the public permission to use the Modified Version under the
5517terms of this License, in the form shown in the Addendum below.
5518<P>
5519
5520<LI>
5521Preserve in that license notice the full lists of Invariant Sections
5522and required Cover Texts given in the Document's license notice.
5523<P>
5524
5525<LI>
5526Include an unaltered copy of this License.
5527<P>
5528
5529<LI>
5530Preserve the section Entitled "History", Preserve its Title, and add
5531to it an item stating at least the title, year, new authors, and
5532publisher of the Modified Version as given on the Title Page. If
5533there is no section Entitled "History" in the Document, create one
5534stating the title, year, authors, and publisher of the Document as
5535given on its Title Page, then add an item describing the Modified
5536Version as stated in the previous sentence.
5537<P>
5538
5539<LI>
5540Preserve the network location, if any, given in the Document for
5541public access to a Transparent copy of the Document, and likewise
5542the network locations given in the Document for previous versions
5543it was based on. These may be placed in the "History" section.
5544You may omit a network location for a work that was published at
5545least four years before the Document itself, or if the original
5546publisher of the version it refers to gives permission.
5547<P>
5548
5549<LI>
5550For any section Entitled "Acknowledgements" or "Dedications", Preserve
5551the Title of the section, and preserve in the section all the
5552substance and tone of each of the contributor acknowledgements and/or
5553dedications given therein.
5554<P>
5555
5556<LI>
5557Preserve all the Invariant Sections of the Document,
5558unaltered in their text and in their titles. Section numbers
5559or the equivalent are not considered part of the section titles.
5560<P>
5561
5562<LI>
5563Delete any section Entitled "Endorsements". Such a section
5564may not be included in the Modified Version.
5565<P>
5566
5567<LI>
5568Do not retitle any existing section to be Entitled "Endorsements" or
5569to conflict in title with any Invariant Section.
5570<P>
5571
5572<LI>
5573Preserve any Warranty Disclaimers.
5574</OL>
5575<P>
5576
5577If the Modified Version includes new front-matter sections or
5578appendices that qualify as Secondary Sections and contain no material
5579copied from the Document, you may at your option designate some or all
5580of these sections as invariant. To do this, add their titles to the
5581list of Invariant Sections in the Modified Version's license notice.
5582These titles must be distinct from any other section titles.
5583</P><P>
5584
5585You may add a section Entitled "Endorsements", provided it contains
5586nothing but endorsements of your Modified Version by various
5587parties--for example, statements of peer review or that the text has
5588been approved by an organization as the authoritative definition of a
5589standard.
5590</P><P>
5591
5592You may add a passage of up to five words as a Front-Cover Text, and a
5593passage of up to 25 words as a Back-Cover Text, to the end of the list
5594of Cover Texts in the Modified Version. Only one passage of
5595Front-Cover Text and one of Back-Cover Text may be added by (or
5596through arrangements made by) any one entity. If the Document already
5597includes a cover text for the same cover, previously added by you or
5598by arrangement made by the same entity you are acting on behalf of,
5599you may not add another; but you may replace the old one, on explicit
5600permission from the previous publisher that added the old one.
5601</P><P>
5602
5603The author(s) and publisher(s) of the Document do not by this License
5604give permission to use their names for publicity for or to assert or
5605imply endorsement of any Modified Version.
5606</P><P>
5607
5608<LI>
5609COMBINING DOCUMENTS
5610<P>
5611
5612You may combine the Document with other documents released under this
5613License, under the terms defined in section 4 above for modified
5614versions, provided that you include in the combination all of the
5615Invariant Sections of all of the original documents, unmodified, and
5616list them all as Invariant Sections of your combined work in its
5617license notice, and that you preserve all their Warranty Disclaimers.
5618</P><P>
5619
5620The combined work need only contain one copy of this License, and
5621multiple identical Invariant Sections may be replaced with a single
5622copy. If there are multiple Invariant Sections with the same name but
5623different contents, make the title of each such section unique by
5624adding at the end of it, in parentheses, the name of the original
5625author or publisher of that section if known, or else a unique number.
5626Make the same adjustment to the section titles in the list of
5627Invariant Sections in the license notice of the combined work.
5628</P><P>
5629
5630In the combination, you must combine any sections Entitled "History"
5631in the various original documents, forming one section Entitled
5632"History"; likewise combine any sections Entitled "Acknowledgements",
5633and any sections Entitled "Dedications". You must delete all
5634sections Entitled "Endorsements."
5635</P><P>
5636
5637<LI>
5638COLLECTIONS OF DOCUMENTS
5639<P>
5640
5641You may make a collection consisting of the Document and other documents
5642released under this License, and replace the individual copies of this
5643License in the various documents with a single copy that is included in
5644the collection, provided that you follow the rules of this License for
5645verbatim copying of each of the documents in all other respects.
5646</P><P>
5647
5648You may extract a single document from such a collection, and distribute
5649it individually under this License, provided you insert a copy of this
5650License into the extracted document, and follow this License in all
5651other respects regarding verbatim copying of that document.
5652</P><P>
5653
5654<LI>
5655AGGREGATION WITH INDEPENDENT WORKS
5656<P>
5657
5658A compilation of the Document or its derivatives with other separate
5659and independent documents or works, in or on a volume of a storage or
5660distribution medium, is called an "aggregate" if the copyright
5661resulting from the compilation is not used to limit the legal rights
5662of the compilation's users beyond what the individual works permit.
5663When the Document is included an aggregate, this License does not
5664apply to the other works in the aggregate which are not themselves
5665derivative works of the Document.
5666</P><P>
5667
5668If the Cover Text requirement of section 3 is applicable to these
5669copies of the Document, then if the Document is less than one half of
5670the entire aggregate, the Document's Cover Texts may be placed on
5671covers that bracket the Document within the aggregate, or the
5672electronic equivalent of covers if the Document is in electronic form.
5673Otherwise they must appear on printed covers that bracket the whole
5674aggregate.
5675</P><P>
5676
5677<LI>
5678TRANSLATION
5679<P>
5680
5681Translation is considered a kind of modification, so you may
5682distribute translations of the Document under the terms of section 4.
5683Replacing Invariant Sections with translations requires special
5684permission from their copyright holders, but you may include
5685translations of some or all Invariant Sections in addition to the
5686original versions of these Invariant Sections. You may include a
5687translation of this License, and all the license notices in the
5688Document, and any Warranty Disclaimers, provided that you also include
5689the original English version of this License and the original versions
5690of those notices and disclaimers. In case of a disagreement between
5691the translation and the original version of this License or a notice
5692or disclaimer, the original version will prevail.
5693</P><P>
5694
5695If a section in the Document is Entitled "Acknowledgements",
5696"Dedications", or "History", the requirement (section 4) to Preserve
5697its Title (section 1) will typically require changing the actual
5698title.
5699</P><P>
5700
5701<LI>
5702TERMINATION
5703<P>
5704
5705You may not copy, modify, sublicense, or distribute the Document except
5706as expressly provided for under this License. Any other attempt to
5707copy, modify, sublicense or distribute the Document is void, and will
5708automatically terminate your rights under this License. However,
5709parties who have received copies, or rights, from you under this
5710License will not have their licenses terminated so long as such
5711parties remain in full compliance.
5712</P><P>
5713
5714<LI>
5715FUTURE REVISIONS OF THIS LICENSE
5716<P>
5717
5718The Free Software Foundation may publish new, revised versions
5719of the GNU Free Documentation License from time to time. Such new
5720versions will be similar in spirit to the present version, but may
5721differ 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
5725Each version of the License is given a distinguishing version number.
5726If the Document specifies that a particular numbered version of this
5727License "or any later version" applies to it, you have the option of
5728following the terms and conditions either of that specified version or
5729of any later version that has been published (not as a draft) by the
5730Free Software Foundation. If the Document does not specify a version
5731number of this License, you may choose any version ever published (not
5732as 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
5753To use this License in a document you have written, include a copy of
5754the License in the document and put the following copyright and
5755license 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
5767If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
5768replace 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
5776If you have Invariant Sections without Cover Texts, or some other
5777combination of the three, merge those two alternatives to suit the
5778situation.
5779</P><P>
5780
5781If your document contains nontrivial examples of program code, we
5782recommend releasing these examples in parallel under your choice of
5783free software license, such as the GNU General Public License,
5784to 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>
84041b4c
EZ
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>
b585a9fa 5798<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
5799<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5800</TR></TABLE>
5801<H1> Concept Index </H1>
b585a9fa
EZ
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>
84041b4c
EZ
5806 &nbsp;
5807<A HREF="readline.html#cp_E" style="text-decoration:none"><b>E</b></A>
5808 &nbsp;
b585a9fa
EZ
5809<A HREF="readline.html#cp_F" style="text-decoration:none"><b>F</b></A>
5810 &nbsp;
84041b4c
EZ
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>
b585a9fa
EZ
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="readline.html#SEC44">2.6 Custom Completers</A></TD></TR>
5829<TR><TD COLSPAN=3> <HR></TD></TR>
84041b4c
EZ
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="readline.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="readline.html#SEC4">1.2.1 Readline Bare Essentials</A></TD></TR>
5835<TR><TD COLSPAN=3> <HR></TD></TR>
b585a9fa
EZ
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="readline.html#SEC50">A.1 GNU Free Documentation License</A></TD></TR>
5838<TR><TD COLSPAN=3> <HR></TD></TR>
84041b4c
EZ
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="readline.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="readline.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="readline.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="readline.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="readline.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>
b585a9fa 5851<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX179">readline, function</A></TD><TD valign=top><A HREF="readline.html#SEC24">2.1 Basic Behavior</A></TD></TR>
84041b4c
EZ
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="readline.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="readline.html#SEC6">1.2.3 Readline Killing Commands</A></TD></TR>
5858<TR><TD COLSPAN=3> <HR></TD></TR>
b585a9fa
EZ
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>
84041b4c
EZ
5862 &nbsp;
5863<A HREF="readline.html#cp_E" style="text-decoration:none"><b>E</b></A>
5864 &nbsp;
b585a9fa
EZ
5865<A HREF="readline.html#cp_F" style="text-decoration:none"><b>F</b></A>
5866 &nbsp;
84041b4c
EZ
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">
b585a9fa 5883<A NAME="SEC53"></A>
84041b4c 5884<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
b585a9fa 5885<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52"> &lt; </A>]</TD>
84041b4c
EZ
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>
b585a9fa 5892<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
5893<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5894</TR></TABLE>
5895<H1> Function and Variable Index </H1>
b585a9fa 5896<!--docid::SEC53::-->
84041b4c
EZ
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>
b585a9fa
EZ
5945<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX290"><CODE>_rl_digit_p</CODE></A></TD><TD valign=top><A HREF="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
84041b4c
EZ
5951<TR><TD COLSPAN=3> <HR></TD></TR>
5952<TR><TH><A NAME="fn_A"></A>A</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
5953<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX146"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
5954<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX147"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="readline.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="readline.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="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
84041b4c
EZ
5957<TR><TD COLSPAN=3> <HR></TD></TR>
5958<TR><TH><A NAME="fn_B"></A>B</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
84041b4c 5973<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX5">bell-style</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
b585a9fa 5974<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX6">bind-tty-special-chars</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
84041b4c
EZ
5975<TR><TD COLSPAN=3> <HR></TD></TR>
5976<TR><TH><A NAME="fn_C"></A>C</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
84041b4c
EZ
5998<TR><TD COLSPAN=3> <HR></TD></TR>
5999<TR><TH><A NAME="fn_D"></A>D</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
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="readline.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="readline.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="readline.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="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
6004<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX110"><CODE>delete-horizontal-space ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6005<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX111"><CODE>delete-horizontal-space ()</CODE></A></TD><TD valign=top><A HREF="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
84041b4c
EZ
6019<TR><TD COLSPAN=3> <HR></TD></TR>
6020<TR><TH><A NAME="fn_E"></A>E</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
6021<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX11">editing-mode</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
6022<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX174"><CODE>emacs-editing-mode (C-e)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
6028<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX53"><CODE>end-of-history (M-&#38;#62;)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
84041b4c
EZ
6034<TR><TD COLSPAN=3> <HR></TD></TR>
6035<TR><TH><A NAME="fn_F"></A>F</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
84041b4c
EZ
6044<TR><TD COLSPAN=3> <HR></TD></TR>
6045<TR><TH><A NAME="fn_H"></A>H</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
6046<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX14">history-preserve-point</A></TD><TD valign=top><A HREF="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
84041b4c
EZ
6052<TR><TD COLSPAN=3> <HR></TD></TR>
6053<TR><TH><A NAME="fn_I"></A>I</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
6054<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX16">input-meta</A></TD><TD valign=top><A HREF="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
84041b4c
EZ
6060<TR><TD COLSPAN=3> <HR></TD></TR>
6061<TR><TH><A NAME="fn_K"></A>K</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
6062<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX19">keymap</A></TD><TD valign=top><A HREF="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
84041b4c
EZ
6071<TR><TD COLSPAN=3> <HR></TD></TR>
6072<TR><TH><A NAME="fn_M"></A>M</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
6073<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX20">mark-modified-lines</A></TD><TD valign=top><A HREF="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
84041b4c
EZ
6079<TR><TD COLSPAN=3> <HR></TD></TR>
6080<TR><TH><A NAME="fn_N"></A>N</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
84041b4c
EZ
6087<TR><TD COLSPAN=3> <HR></TD></TR>
6088<TR><TH><A NAME="fn_O"></A>O</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
6089<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX23">output-meta</A></TD><TD valign=top><A HREF="readline.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="readline.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="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
84041b4c
EZ
6092<TR><TD COLSPAN=3> <HR></TD></TR>
6093<TR><TH><A NAME="fn_P"></A>P</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
6094<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX24">page-completions</A></TD><TD valign=top><A HREF="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
84041b4c
EZ
6101<TR><TD COLSPAN=3> <HR></TD></TR>
6102<TR><TH><A NAME="fn_Q"></A>Q</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
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="readline.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="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
84041b4c
EZ
6105<TR><TD COLSPAN=3> <HR></TD></TR>
6106<TR><TH><A NAME="fn_R"></A>R</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
84041b4c
EZ
6283<TR><TD COLSPAN=3> <HR></TD></TR>
6284<TR><TH><A NAME="fn_S"></A>S</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
84041b4c
EZ
6293<TR><TD COLSPAN=3> <HR></TD></TR>
6294<TR><TH><A NAME="fn_T"></A>T</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
84041b4c
EZ
6303<TR><TD COLSPAN=3> <HR></TD></TR>
6304<TR><TH><A NAME="fn_U"></A>U</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
84041b4c
EZ
6317<TR><TD COLSPAN=3> <HR></TD></TR>
6318<TR><TH><A NAME="fn_V"></A>V</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
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="readline.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="readline.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="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
84041b4c
EZ
6322<TR><TD COLSPAN=3> <HR></TD></TR>
6323<TR><TH><A NAME="fn_Y"></A>Y</TH><TD></TD><TD></TD></TR>
b585a9fa
EZ
6324<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX120"><CODE>yank (C-y)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
6325<TR><TD></TD><TD valign=top><A HREF="readline.html#IDX121"><CODE>yank (C-y)</CODE></A></TD><TD valign=top><A HREF="readline.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="readline.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="readline.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="readline.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="readline.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="readline.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="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
84041b4c
EZ
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>
b585a9fa 6383<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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>
b585a9fa 6500<A NAME="TOC49" HREF="readline.html#SEC49">A. Copying This Manual</A>
84041b4c 6501<BR>
b585a9fa
EZ
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>
84041b4c
EZ
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>
b585a9fa 6520<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
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>
b585a9fa
EZ
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>
84041b4c 6532<BR>
b585a9fa 6533<A NAME="TOC53" HREF="readline.html#SEC53">Function and Variable Index</A>
84041b4c
EZ
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>
b585a9fa 6542<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
84041b4c
EZ
6543<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
6544</TR></TABLE>
6545<H1>About this document</H1>
b585a9fa 6546This document was generated by <I>Chet Ramey</I> on <I>December, 6 2005</I>
84041b4c
EZ
6547using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
6548"><I>texi2html</I></A>
6549<P></P>
6550The 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">
6563Back
6564</TD>
6565<TD>
6566previous section in reading order
6567</TD>
6568<TD>
65691.2.2
6570</TD>
6571</TR>
6572<TR>
6573<TD ALIGN="CENTER">
6574 [ &gt; ] </TD>
6575<TD ALIGN="CENTER">
6576Forward
6577</TD>
6578<TD>
6579next section in reading order
6580</TD>
6581<TD>
65821.2.4
6583</TD>
6584</TR>
6585<TR>
6586<TD ALIGN="CENTER">
6587 [ &lt;&lt; ] </TD>
6588<TD ALIGN="CENTER">
6589FastBack
6590</TD>
6591<TD>
6592previous or up-and-previous section
6593</TD>
6594<TD>
65951.1
6596</TD>
6597</TR>
6598<TR>
6599<TD ALIGN="CENTER">
6600 [ Up ] </TD>
6601<TD ALIGN="CENTER">
6602Up
6603</TD>
6604<TD>
6605up section
6606</TD>
6607<TD>
66081.2
6609</TD>
6610</TR>
6611<TR>
6612<TD ALIGN="CENTER">
6613 [ &gt;&gt; ] </TD>
6614<TD ALIGN="CENTER">
6615FastForward
6616</TD>
6617<TD>
6618next or up-and-next section
6619</TD>
6620<TD>
66211.3
6622</TD>
6623</TR>
6624<TR>
6625<TD ALIGN="CENTER">
6626 [Top] </TD>
6627<TD ALIGN="CENTER">
6628Top
6629</TD>
6630<TD>
6631cover (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">
6641Contents
6642</TD>
6643<TD>
6644table 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">
6654Index
6655</TD>
6656<TD>
6657concept index
6658</TD>
6659<TD>
6660 &nbsp;
6661</TD>
6662</TR>
6663<TR>
6664<TD ALIGN="CENTER">
6665 [ ? ] </TD>
6666<TD ALIGN="CENTER">
6667About
6668</TD>
6669<TD>
6670this page
6671</TD>
6672<TD>
6673 &nbsp;
6674</TD>
6675</TR>
6676</TABLE>
6677<P></P>
6678where the <STRONG> Example </STRONG> assumes that the current position
6679is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of
6680the 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">
6707This document was generated
b585a9fa 6708by <I>Chet Ramey</I> on <I>December, 6 2005</I>
84041b4c
EZ
6709using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
6710"><I>texi2html</I></A>
6711
a44161c3
EZ
6712</BODY>
6713</HTML>
This page took 0.444671 seconds and 4 git commands to generate.