Annotation of embedaddon/readline/doc/readline.html, revision 1.1.1.2
1.1 misho 1: <HTML>
2: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
1.1.1.2 ! misho 3: <!-- Created on October, 30 2020 by texi2html 1.64 -->
1.1 misho 4: <!--
5: Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
6: Karl Berry <karl@freefriends.org>
7: Olaf Bachmann <obachman@mathematik.uni-kl.de>
8: and many others.
9: Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
10: Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
11:
12: -->
13: <HEAD>
14: <TITLE>GNU Readline Library: </TITLE>
15:
16: <META NAME="description" CONTENT="GNU Readline Library: ">
17: <META NAME="keywords" CONTENT="GNU Readline Library: ">
18: <META NAME="resource-type" CONTENT="document">
19: <META NAME="distribution" CONTENT="global">
20: <META NAME="Generator" CONTENT="texi2html 1.64">
21:
22: </HEAD>
23:
24: <BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
25:
26: <A NAME="SEC_Top"></A>
27: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
28: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
29: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
30: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
31: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
32: </TR></TABLE>
33: <H1>GNU Readline Library</H1></P><P>
34:
35: This document describes the GNU Readline Library, a utility which aids
36: in the consistency of user interface across discrete programs which
37: provide a command line interface.
38: The Readline home page is <A HREF="http://www.gnu.org/software/readline/">http://www.gnu.org/software/readline/</A>.
39: </P><P>
40:
41: <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
42: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC1">1. Command Line Editing</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">GNU Readline User's Manual.</TD></TR>
43: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC23">2. Programming with GNU Readline</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">GNU Readline Programmer's Manual.</TD></TR>
44: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC50">A. GNU Free Documentation License</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">License for copying this manual.</TD></TR>
45: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC52">Concept Index</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Index of concepts described in this manual.</TD></TR>
46: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC53">Function and Variable Index</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Index of externally visible functions
47: and variables.</TD></TR>
48: </TABLE></BLOCKQUOTE>
49: <P>
50:
51: <HR SIZE=1>
52: <A NAME="SEC1"></A>
53: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
54: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> < </A>]</TD>
55: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC2"> > </A>]</TD>
56: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
57: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> Up </A>]</TD>
58: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> >> </A>]</TD>
59: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
60: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
61: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
62: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
63: </TR></TABLE>
64: <A NAME="Command Line Editing"></A>
65: <H1> 1. Command Line Editing </H1>
66: <!--docid::SEC1::-->
67: <P>
68:
69: This chapter describes the basic features of the GNU
70: command line editing interface.
71: </P><P>
72:
73: <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
74: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC2">1.1 Introduction to Line Editing</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Notation used in this text.</TD></TR>
75: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC3">1.2 Readline Interaction</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">The minimum set of commands for editing a line.</TD></TR>
76: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC9">1.3 Readline Init File</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Customizing Readline from a user's view.</TD></TR>
77: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC13">1.4 Bindable Readline Commands</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">A description of most of the Readline commands
78: available for binding</TD></TR>
79: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC22">1.5 Readline vi Mode</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">A short description of how to make Readline
80: behave like the vi editor.</TD></TR>
81: </TABLE></BLOCKQUOTE>
82: <P>
83:
84: <A NAME="Introduction and Notation"></A>
85: <HR SIZE="6">
86: <A NAME="SEC2"></A>
87: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
88: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC1"> < </A>]</TD>
89: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> > </A>]</TD>
90: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
91: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC1"> Up </A>]</TD>
92: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> >> </A>]</TD>
93: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
94: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
95: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
96: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
97: </TR></TABLE>
98: <H2> 1.1 Introduction to Line Editing </H2>
99: <!--docid::SEC2::-->
100: <P>
101:
102: The following paragraphs describe the notation used to represent
103: keystrokes.
104: </P><P>
105:
106: The text <KBD>C-k</KBD> is read as `Control-K' and describes the character
107: produced when the <KBD>k</KBD> key is pressed while the Control key
108: is depressed.
109: </P><P>
110:
111: The text <KBD>M-k</KBD> is read as `Meta-K' and describes the character
112: produced when the Meta key (if you have one) is depressed, and the <KBD>k</KBD>
113: key is pressed.
114: The Meta key is labeled <KBD>ALT</KBD> on many keyboards.
115: On keyboards with two keys labeled <KBD>ALT</KBD> (usually to either side of
116: the space bar), the <KBD>ALT</KBD> on the left side is generally set to
117: work as a Meta key.
118: The <KBD>ALT</KBD> key on the right may also be configured to work as a
119: Meta key or may be configured as some other modifier, such as a
120: Compose key for typing accented characters.
121: </P><P>
122:
123: If you do not have a Meta or <KBD>ALT</KBD> key, or another key working as
124: a Meta key, the identical keystroke can be generated by typing <KBD>ESC</KBD>
125: <EM>first</EM>, and then typing <KBD>k</KBD>.
126: Either process is known as <EM>metafying</EM> the <KBD>k</KBD> key.
127: </P><P>
128:
129: The text <KBD>M-C-k</KBD> is read as `Meta-Control-k' and describes the
130: character produced by <EM>metafying</EM> <KBD>C-k</KBD>.
131: </P><P>
132:
133: In addition, several keys have their own names. Specifically,
134: <KBD>DEL</KBD>, <KBD>ESC</KBD>, <KBD>LFD</KBD>, <KBD>SPC</KBD>, <KBD>RET</KBD>, and <KBD>TAB</KBD> all
135: stand for themselves when seen in this text, or in an init file
136: (see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
137: If your keyboard lacks a <KBD>LFD</KBD> key, typing <KBD>C-j</KBD> will
138: produce the desired character.
139: The <KBD>RET</KBD> key may be labeled <KBD>Return</KBD> or <KBD>Enter</KBD> on
140: some keyboards.
141: </P><P>
142:
143: <A NAME="Readline Interaction"></A>
144: <HR SIZE="6">
145: <A NAME="SEC3"></A>
146: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
147: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC2"> < </A>]</TD>
148: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC4"> > </A>]</TD>
149: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> << </A>]</TD>
150: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC1"> Up </A>]</TD>
151: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> >> </A>]</TD>
152: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
153: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
154: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
155: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
156: </TR></TABLE>
157: <H2> 1.2 Readline Interaction </H2>
158: <!--docid::SEC3::-->
159: <P>
160:
161: Often during an interactive session you type in a long line of text,
162: only to notice that the first word on the line is misspelled. The
163: Readline library gives you a set of commands for manipulating the text
164: as you type it in, allowing you to just fix your typo, and not forcing
165: you to retype the majority of the line. Using these editing commands,
166: you move the cursor to the place that needs correction, and delete or
167: insert the text of the corrections. Then, when you are satisfied with
168: the line, you simply press <KBD>RET</KBD>. You do not have to be at the
169: end of the line to press <KBD>RET</KBD>; the entire line is accepted
170: regardless of the location of the cursor within the line.
171: </P><P>
172:
173: <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
174: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC4">1.2.1 Readline Bare Essentials</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">The least you need to know about Readline.</TD></TR>
175: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC5">1.2.2 Readline Movement Commands</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Moving about the input line.</TD></TR>
176: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC6">1.2.3 Readline Killing Commands</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">How to delete text, and how to get it back!</TD></TR>
177: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC7">1.2.4 Readline Arguments</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Giving numeric arguments to commands.</TD></TR>
178: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC8">1.2.5 Searching for Commands in the History</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Searching through previous lines.</TD></TR>
179: </TABLE></BLOCKQUOTE>
180: <P>
181:
182: <A NAME="Readline Bare Essentials"></A>
183: <HR SIZE="6">
184: <A NAME="SEC4"></A>
185: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
186: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> < </A>]</TD>
187: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC5"> > </A>]</TD>
188: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> << </A>]</TD>
189: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> Up </A>]</TD>
190: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> >> </A>]</TD>
191: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
192: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
193: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
194: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
195: </TR></TABLE>
196: <H3> 1.2.1 Readline Bare Essentials </H3>
197: <!--docid::SEC4::-->
198: <P>
199:
200: In order to enter characters into the line, simply type them. The typed
201: character appears where the cursor was, and then the cursor moves one
202: space to the right. If you mistype a character, you can use your
203: erase character to back up and delete the mistyped character.
204: </P><P>
205:
206: Sometimes you may mistype a character, and
207: not notice the error until you have typed several other characters. In
208: that case, you can type <KBD>C-b</KBD> to move the cursor to the left, and then
209: correct your mistake. Afterwards, you can move the cursor to the right
210: with <KBD>C-f</KBD>.
211: </P><P>
212:
213: When you add text in the middle of a line, you will notice that characters
214: to the right of the cursor are `pushed over' to make room for the text
215: that you have inserted. Likewise, when you delete text behind the cursor,
216: characters to the right of the cursor are `pulled back' to fill in the
217: blank space created by the removal of the text. A list of the bare
218: essentials for editing the text of an input line follows.
219: </P><P>
220:
221: <DL COMPACT>
222: <DT><KBD>C-b</KBD>
223: <DD>Move back one character.
224: <DT><KBD>C-f</KBD>
225: <DD>Move forward one character.
226: <DT><KBD>DEL</KBD> or <KBD>Backspace</KBD>
227: <DD>Delete the character to the left of the cursor.
228: <DT><KBD>C-d</KBD>
229: <DD>Delete the character underneath the cursor.
230: <DT>Printing characters
231: <DD>Insert the character into the line at the cursor.
232: <DT><KBD>C-_</KBD> or <KBD>C-x C-u</KBD>
233: <DD>Undo the last editing command. You can undo all the way back to an
234: empty line.
235: </DL>
236: <P>
237:
238: (Depending on your configuration, the <KBD>Backspace</KBD> key be set to
239: delete the character to the left of the cursor and the <KBD>DEL</KBD> key set
240: to delete the character underneath the cursor, like <KBD>C-d</KBD>, rather
241: than the character to the left of the cursor.)
242: </P><P>
243:
244: <A NAME="Readline Movement Commands"></A>
245: <HR SIZE="6">
246: <A NAME="SEC5"></A>
247: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
248: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC4"> < </A>]</TD>
249: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC6"> > </A>]</TD>
250: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC6"> << </A>]</TD>
251: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> Up </A>]</TD>
252: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> >> </A>]</TD>
253: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
254: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
255: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
256: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
257: </TR></TABLE>
258: <H3> 1.2.2 Readline Movement Commands </H3>
259: <!--docid::SEC5::-->
260: <P>
261:
262: The above table describes the most basic keystrokes that you need
263: in order to do editing of the input line. For your convenience, many
264: other commands have been added in addition to <KBD>C-b</KBD>, <KBD>C-f</KBD>,
265: <KBD>C-d</KBD>, and <KBD>DEL</KBD>. Here are some commands for moving more rapidly
266: about the line.
267: </P><P>
268:
269: <DL COMPACT>
270: <DT><KBD>C-a</KBD>
271: <DD>Move to the start of the line.
272: <DT><KBD>C-e</KBD>
273: <DD>Move to the end of the line.
274: <DT><KBD>M-f</KBD>
275: <DD>Move forward a word, where a word is composed of letters and digits.
276: <DT><KBD>M-b</KBD>
277: <DD>Move backward a word.
278: <DT><KBD>C-l</KBD>
279: <DD>Clear the screen, reprinting the current line at the top.
280: </DL>
281: <P>
282:
283: Notice how <KBD>C-f</KBD> moves forward a character, while <KBD>M-f</KBD> moves
284: forward a word. It is a loose convention that control keystrokes
285: operate on characters while meta keystrokes operate on words.
286: </P><P>
287:
288: <A NAME="Readline Killing Commands"></A>
289: <HR SIZE="6">
290: <A NAME="SEC6"></A>
291: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
292: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC5"> < </A>]</TD>
293: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC7"> > </A>]</TD>
294: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC7"> << </A>]</TD>
295: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> Up </A>]</TD>
296: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> >> </A>]</TD>
297: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
298: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
299: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
300: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
301: </TR></TABLE>
302: <H3> 1.2.3 Readline Killing Commands </H3>
303: <!--docid::SEC6::-->
304: <P>
305:
306: <A NAME="IDX1"></A>
307: <A NAME="IDX2"></A>
308: </P><P>
309:
310: <EM>Killing</EM> text means to delete the text from the line, but to save
311: it away for later use, usually by <EM>yanking</EM> (re-inserting)
312: it back into the line.
313: (`Cut' and `paste' are more recent jargon for `kill' and `yank'.)
314: </P><P>
315:
316: If the description for a command says that it `kills' text, then you can
317: be sure that you can get the text back in a different (or the same)
318: place later.
319: </P><P>
320:
321: When you use a kill command, the text is saved in a <EM>kill-ring</EM>.
322: Any number of consecutive kills save all of the killed text together, so
323: that when you yank it back, you get it all. The kill
324: ring is not line specific; the text that you killed on a previously
325: typed line is available to be yanked back later, when you are typing
326: another line.
327: <A NAME="IDX3"></A>
328: </P><P>
329:
330: Here is the list of commands for killing text.
331: </P><P>
332:
333: <DL COMPACT>
334: <DT><KBD>C-k</KBD>
335: <DD>Kill the text from the current cursor position to the end of the line.
336: <P>
337:
338: <DT><KBD>M-d</KBD>
339: <DD>Kill from the cursor to the end of the current word, or, if between
340: words, to the end of the next word.
341: Word boundaries are the same as those used by <KBD>M-f</KBD>.
342: <P>
343:
344: <DT><KBD>M-<KBD>DEL</KBD></KBD>
345: <DD>Kill from the cursor the start of the current word, or, if between
346: words, to the start of the previous word.
347: Word boundaries are the same as those used by <KBD>M-b</KBD>.
348: <P>
349:
350: <DT><KBD>C-w</KBD>
351: <DD>Kill from the cursor to the previous whitespace. This is different than
352: <KBD>M-<KBD>DEL</KBD></KBD> because the word boundaries differ.
353: <P>
354:
355: </DL>
356: <P>
357:
358: Here is how to <EM>yank</EM> the text back into the line. Yanking
359: means to copy the most-recently-killed text from the kill buffer.
360: </P><P>
361:
362: <DL COMPACT>
363: <DT><KBD>C-y</KBD>
364: <DD>Yank the most recently killed text back into the buffer at the cursor.
365: <P>
366:
367: <DT><KBD>M-y</KBD>
368: <DD>Rotate the kill-ring, and yank the new top. You can only do this if
369: the prior command is <KBD>C-y</KBD> or <KBD>M-y</KBD>.
370: </DL>
371: <P>
372:
373: <A NAME="Readline Arguments"></A>
374: <HR SIZE="6">
375: <A NAME="SEC7"></A>
376: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
377: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC6"> < </A>]</TD>
378: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC8"> > </A>]</TD>
379: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC8"> << </A>]</TD>
380: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> Up </A>]</TD>
381: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> >> </A>]</TD>
382: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
383: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
384: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
385: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
386: </TR></TABLE>
387: <H3> 1.2.4 Readline Arguments </H3>
388: <!--docid::SEC7::-->
389: <P>
390:
391: You can pass numeric arguments to Readline commands. Sometimes the
392: argument acts as a repeat count, other times it is the <I>sign</I> of the
393: argument that is significant. If you pass a negative argument to a
394: command which normally acts in a forward direction, that command will
395: act in a backward direction. For example, to kill text back to the
396: start of the line, you might type <SAMP>`M-- C-k'</SAMP>.
397: </P><P>
398:
399: The general way to pass numeric arguments to a command is to type meta
400: digits before the command. If the first `digit' typed is a minus
401: sign (<SAMP>`-'</SAMP>), then the sign of the argument will be negative. Once
402: you have typed one meta digit to get the argument started, you can type
403: the remainder of the digits, and then the command. For example, to give
404: the <KBD>C-d</KBD> command an argument of 10, you could type <SAMP>`M-1 0 C-d'</SAMP>,
405: which will delete the next ten characters on the input line.
406: </P><P>
407:
408: <A NAME="Searching"></A>
409: <HR SIZE="6">
410: <A NAME="SEC8"></A>
411: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
412: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC7"> < </A>]</TD>
413: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> > </A>]</TD>
414: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> << </A>]</TD>
415: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC3"> Up </A>]</TD>
416: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> >> </A>]</TD>
417: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
418: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
419: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
420: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
421: </TR></TABLE>
422: <H3> 1.2.5 Searching for Commands in the History </H3>
423: <!--docid::SEC8::-->
424: <P>
425:
426: Readline provides commands for searching through the command history
427: for lines containing a specified string.
428: There are two search modes: <EM>incremental</EM> and <EM>non-incremental</EM>.
429: </P><P>
430:
431: Incremental searches begin before the user has finished typing the
432: search string.
433: As each character of the search string is typed, Readline displays
434: the next entry from the history matching the string typed so far.
435: An incremental search requires only as many characters as needed to
436: find the desired history entry.
437: To search backward in the history for a particular string, type
438: <KBD>C-r</KBD>. Typing <KBD>C-s</KBD> searches forward through the history.
439: The characters present in the value of the <CODE>isearch-terminators</CODE> variable
440: are used to terminate an incremental search.
441: If that variable has not been assigned a value, the <KBD>ESC</KBD> and
442: <KBD>C-J</KBD> characters will terminate an incremental search.
443: <KBD>C-g</KBD> will abort an incremental search and restore the original line.
444: When the search is terminated, the history entry containing the
445: search string becomes the current line.
446: </P><P>
447:
448: To find other matching entries in the history list, type <KBD>C-r</KBD> or
449: <KBD>C-s</KBD> as appropriate.
450: This will search backward or forward in the history for the next
451: entry matching the search string typed so far.
452: Any other key sequence bound to a Readline command will terminate
453: the search and execute that command.
454: For instance, a <KBD>RET</KBD> will terminate the search and accept
455: the line, thereby executing the command from the history list.
456: A movement command will terminate the search, make the last line found
457: the current line, and begin editing.
458: </P><P>
459:
460: Readline remembers the last incremental search string. If two
461: <KBD>C-r</KBD>s are typed without any intervening characters defining a new
462: search string, any remembered search string is used.
463: </P><P>
464:
465: Non-incremental searches read the entire search string before starting
466: to search for matching history lines. The search string may be
467: typed by the user or be part of the contents of the current line.
468: </P><P>
469:
470: <A NAME="Readline Init File"></A>
471: <HR SIZE="6">
472: <A NAME="SEC9"></A>
473: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
474: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC8"> < </A>]</TD>
475: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC10"> > </A>]</TD>
476: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> << </A>]</TD>
477: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC1"> Up </A>]</TD>
478: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> >> </A>]</TD>
479: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
480: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
481: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
482: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
483: </TR></TABLE>
484: <H2> 1.3 Readline Init File </H2>
485: <!--docid::SEC9::-->
486: <P>
487:
488: Although the Readline library comes with a set of Emacs-like
489: keybindings installed by default, it is possible to use a different set
490: of keybindings.
491: Any user can customize programs that use Readline by putting
492: commands in an <EM>inputrc</EM> file, conventionally in his home directory.
493: The name of this
494: file is taken from the value of the environment variable <CODE>INPUTRC</CODE>. If
495: that variable is unset, the default is <TT>`~/.inputrc'</TT>. If that
496: file does not exist or cannot be read, the ultimate default is
497: <TT>`/etc/inputrc'</TT>.
498: </P><P>
499:
500: When a program which uses the Readline library starts up, the
501: init file is read, and the key bindings are set.
502: </P><P>
503:
504: In addition, the <CODE>C-x C-r</CODE> command re-reads this init file, thus
505: incorporating any changes that you might have made to it.
506: </P><P>
507:
508: <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
509: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Syntax for the commands in the inputrc file.</TD></TR>
510: </TABLE>
511:
512: <br>
513: <TABLE BORDER=0 CELLSPACING=0>
514: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC11">1.3.2 Conditional Init Constructs</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Conditional key bindings in the inputrc file.</TD></TR>
515: </TABLE>
516:
517: <br>
518: <TABLE BORDER=0 CELLSPACING=0>
519: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC12">1.3.3 Sample Init File</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">An example inputrc file.</TD></TR>
520: </TABLE></BLOCKQUOTE>
521: <P>
522:
523: <A NAME="Readline Init File Syntax"></A>
524: <HR SIZE="6">
525: <A NAME="SEC10"></A>
526: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
527: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> < </A>]</TD>
528: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC11"> > </A>]</TD>
529: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> << </A>]</TD>
530: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> Up </A>]</TD>
531: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> >> </A>]</TD>
532: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
533: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
534: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
535: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
536: </TR></TABLE>
537: <H3> 1.3.1 Readline Init File Syntax </H3>
538: <!--docid::SEC10::-->
539: <P>
540:
541: There are only a few basic constructs allowed in the
542: Readline init file. Blank lines are ignored.
543: Lines beginning with a <SAMP>`#'</SAMP> are comments.
544: Lines beginning with a <SAMP>`$'</SAMP> indicate conditional
545: constructs (see section <A HREF="readline.html#SEC11">1.3.2 Conditional Init Constructs</A>). Other lines
546: denote variable settings and key bindings.
547: </P><P>
548:
549: <DL COMPACT>
550: <DT>Variable Settings
551: <DD>You can modify the run-time behavior of Readline by
552: altering the values of variables in Readline
553: using the <CODE>set</CODE> command within the init file.
554: The syntax is simple:
555: <P>
556:
557: <TABLE><tr><td> </td><td class=example><pre>set <VAR>variable</VAR> <VAR>value</VAR>
558: </pre></td></tr></table></P><P>
559:
560: Here, for example, is how to
561: change from the default Emacs-like key binding to use
562: <CODE>vi</CODE> line editing commands:
563: </P><P>
564:
565: <TABLE><tr><td> </td><td class=example><pre>set editing-mode vi
566: </pre></td></tr></table></P><P>
567:
568: Variable names and values, where appropriate, are recognized without regard
569: to case. Unrecognized variable names are ignored.
570: </P><P>
571:
572: Boolean variables (those that can be set to on or off) are set to on if
573: the value is null or empty, <VAR>on</VAR> (case-insensitive), or 1. Any other
574: value results in the variable being set to off.
575: </P><P>
576:
577: A great deal of run-time behavior is changeable with the following
578: variables.
579: </P><P>
580:
581: <A NAME="IDX4"></A>
582: <DL COMPACT>
583:
584: <DT><CODE>bell-style</CODE>
585: <DD><A NAME="IDX5"></A>
586: Controls what happens when Readline wants to ring the terminal bell.
587: If set to <SAMP>`none'</SAMP>, Readline never rings the bell. If set to
588: <SAMP>`visible'</SAMP>, Readline uses a visible bell if one is available.
589: If set to <SAMP>`audible'</SAMP> (the default), Readline attempts to ring
590: the terminal's bell.
591: <P>
592:
593: <DT><CODE>bind-tty-special-chars</CODE>
594: <DD><A NAME="IDX6"></A>
1.1.1.2 ! misho 595: If set to <SAMP>`on'</SAMP> (the default), Readline attempts to bind the control
! 596: characters treated specially by the kernel's terminal driver to their
! 597: Readline equivalents.
1.1 misho 598: <P>
599:
1.1.1.2 ! misho 600: <DT><CODE>blink-matching-paren</CODE>
1.1 misho 601: <DD><A NAME="IDX7"></A>
1.1.1.2 ! misho 602: If set to <SAMP>`on'</SAMP>, Readline attempts to briefly move the cursor to an
! 603: opening parenthesis when a closing parenthesis is inserted. The default
! 604: is <SAMP>`off'</SAMP>.
! 605: <P>
! 606:
! 607: <DT><CODE>colored-completion-prefix</CODE>
! 608: <DD><A NAME="IDX8"></A>
! 609: If set to <SAMP>`on'</SAMP>, when listing completions, Readline displays the
! 610: common prefix of the set of possible completions using a different color.
! 611: The color definitions are taken from the value of the <CODE>LS_COLORS</CODE>
! 612: environment variable.
! 613: The default is <SAMP>`off'</SAMP>.
! 614: <P>
! 615:
! 616: <DT><CODE>colored-stats</CODE>
! 617: <DD><A NAME="IDX9"></A>
1.1 misho 618: If set to <SAMP>`on'</SAMP>, Readline displays possible completions using different
619: colors to indicate their file type.
620: The color definitions are taken from the value of the <CODE>LS_COLORS</CODE>
621: environment variable.
622: The default is <SAMP>`off'</SAMP>.
623: <P>
624:
625: <DT><CODE>comment-begin</CODE>
1.1.1.2 ! misho 626: <DD><A NAME="IDX10"></A>
1.1 misho 627: The string to insert at the beginning of the line when the
628: <CODE>insert-comment</CODE> command is executed. The default value
629: is <CODE>"#"</CODE>.
630: <P>
631:
632: <DT><CODE>completion-display-width</CODE>
1.1.1.2 ! misho 633: <DD><A NAME="IDX11"></A>
1.1 misho 634: The number of screen columns used to display possible matches
635: when performing completion.
636: The value is ignored if it is less than 0 or greater than the terminal
637: screen width.
638: A value of 0 will cause matches to be displayed one per line.
639: The default value is -1.
640: <P>
641:
642: <DT><CODE>completion-ignore-case</CODE>
1.1.1.2 ! misho 643: <DD><A NAME="IDX12"></A>
1.1 misho 644: If set to <SAMP>`on'</SAMP>, Readline performs filename matching and completion
645: in a case-insensitive fashion.
646: The default value is <SAMP>`off'</SAMP>.
647: <P>
648:
649: <DT><CODE>completion-map-case</CODE>
1.1.1.2 ! misho 650: <DD><A NAME="IDX13"></A>
1.1 misho 651: If set to <SAMP>`on'</SAMP>, and <VAR>completion-ignore-case</VAR> is enabled, Readline
652: treats hyphens (<SAMP>`-'</SAMP>) and underscores (<SAMP>`_'</SAMP>) as equivalent when
653: performing case-insensitive filename matching and completion.
1.1.1.2 ! misho 654: The default value is <SAMP>`off'</SAMP>.
1.1 misho 655: <P>
656:
657: <DT><CODE>completion-prefix-display-length</CODE>
1.1.1.2 ! misho 658: <DD><A NAME="IDX14"></A>
1.1 misho 659: The length in characters of the common prefix of a list of possible
660: completions that is displayed without modification. When set to a
661: value greater than zero, common prefixes longer than this value are
662: replaced with an ellipsis when displaying possible completions.
663: <P>
664:
665: <DT><CODE>completion-query-items</CODE>
1.1.1.2 ! misho 666: <DD><A NAME="IDX15"></A>
1.1 misho 667: The number of possible completions that determines when the user is
668: asked whether the list of possibilities should be displayed.
1.1.1.2 ! misho 669: If the number of possible completions is greater than or equal to this value,
! 670: Readline will ask whether or not the user wishes to view them;
! 671: otherwise, they are simply listed.
1.1 misho 672: This variable must be set to an integer value greater than or equal to 0.
673: A negative value means Readline should never ask.
674: The default limit is <CODE>100</CODE>.
675: <P>
676:
677: <DT><CODE>convert-meta</CODE>
1.1.1.2 ! misho 678: <DD><A NAME="IDX16"></A>
1.1 misho 679: If set to <SAMP>`on'</SAMP>, Readline will convert characters with the
680: eighth bit set to an ASCII key sequence by stripping the eighth
681: bit and prefixing an <KBD>ESC</KBD> character, converting them to a
1.1.1.2 ! misho 682: meta-prefixed key sequence. The default value is <SAMP>`on'</SAMP>, but
! 683: will be set to <SAMP>`off'</SAMP> if the locale is one that contains
! 684: eight-bit characters.
1.1 misho 685: <P>
686:
687: <DT><CODE>disable-completion</CODE>
1.1.1.2 ! misho 688: <DD><A NAME="IDX17"></A>
1.1 misho 689: If set to <SAMP>`On'</SAMP>, Readline will inhibit word completion.
690: Completion characters will be inserted into the line as if they had
691: been mapped to <CODE>self-insert</CODE>. The default is <SAMP>`off'</SAMP>.
692: <P>
693:
1.1.1.2 ! misho 694: <DT><CODE>echo-control-characters</CODE>
! 695: <DD><A NAME="IDX18"></A>
! 696: When set to <SAMP>`on'</SAMP>, on operating systems that indicate they support it,
! 697: readline echoes a character corresponding to a signal generated from the
! 698: keyboard. The default is <SAMP>`on'</SAMP>.
! 699: <P>
! 700:
1.1 misho 701: <DT><CODE>editing-mode</CODE>
1.1.1.2 ! misho 702: <DD><A NAME="IDX19"></A>
1.1 misho 703: The <CODE>editing-mode</CODE> variable controls which default set of
704: key bindings is used. By default, Readline starts up in Emacs editing
705: mode, where the keystrokes are most similar to Emacs. This variable can be
706: set to either <SAMP>`emacs'</SAMP> or <SAMP>`vi'</SAMP>.
707: <P>
708:
1.1.1.2 ! misho 709: <DT><CODE>emacs-mode-string</CODE>
! 710: <DD><A NAME="IDX20"></A>
! 711: If the <VAR>show-mode-in-prompt</VAR> variable is enabled,
! 712: this string is displayed immediately before the last line of the primary
! 713: prompt when emacs editing mode is active. The value is expanded like a
! 714: key binding, so the standard set of meta- and control prefixes and
! 715: backslash escape sequences is available.
! 716: Use the <SAMP>`\1'</SAMP> and <SAMP>`\2'</SAMP> escapes to begin and end sequences of
! 717: non-printing characters, which can be used to embed a terminal control
! 718: sequence into the mode string.
! 719: The default is <SAMP>`@'</SAMP>.
! 720: <P>
! 721:
! 722: <DT><CODE>enable-bracketed-paste</CODE>
! 723: <DD><A NAME="IDX21"></A>
! 724: When set to <SAMP>`On'</SAMP>, Readline will configure the terminal in a way
! 725: that will enable it to insert each paste into the editing buffer as a
! 726: single string of characters, instead of treating each character as if
! 727: it had been read from the keyboard. This can prevent pasted characters
! 728: from being interpreted as editing commands. The default is <SAMP>`On'</SAMP>.
1.1 misho 729: <P>
730:
731: <DT><CODE>enable-keypad</CODE>
1.1.1.2 ! misho 732: <DD><A NAME="IDX22"></A>
1.1 misho 733: When set to <SAMP>`on'</SAMP>, Readline will try to enable the application
734: keypad when it is called. Some systems need this to enable the
735: arrow keys. The default is <SAMP>`off'</SAMP>.
736: <P>
737:
738: <DT><CODE>enable-meta-key</CODE>
739: <DD>When set to <SAMP>`on'</SAMP>, Readline will try to enable any meta modifier
740: key the terminal claims to support when it is called. On many terminals,
741: the meta key is used to send eight-bit characters.
742: The default is <SAMP>`on'</SAMP>.
743: <P>
744:
745: <DT><CODE>expand-tilde</CODE>
1.1.1.2 ! misho 746: <DD><A NAME="IDX23"></A>
1.1 misho 747: If set to <SAMP>`on'</SAMP>, tilde expansion is performed when Readline
748: attempts word completion. The default is <SAMP>`off'</SAMP>.
749: <P>
750:
751: <DT><CODE>history-preserve-point</CODE>
1.1.1.2 ! misho 752: <DD><A NAME="IDX24"></A>
1.1 misho 753: If set to <SAMP>`on'</SAMP>, the history code attempts to place the point (the
754: current cursor position) at the
755: same location on each history line retrieved with <CODE>previous-history</CODE>
756: or <CODE>next-history</CODE>. The default is <SAMP>`off'</SAMP>.
757: <P>
758:
759: <DT><CODE>history-size</CODE>
1.1.1.2 ! misho 760: <DD><A NAME="IDX25"></A>
1.1 misho 761: Set the maximum number of history entries saved in the history list.
762: If set to zero, any existing history entries are deleted and no new entries
763: are saved.
764: If set to a value less than zero, the number of history entries is not
765: limited.
766: By default, the number of history entries is not limited.
1.1.1.2 ! misho 767: If an attempt is made to set <VAR>history-size</VAR> to a non-numeric value,
! 768: the maximum number of history entries will be set to 500.
1.1 misho 769: <P>
770:
771: <DT><CODE>horizontal-scroll-mode</CODE>
1.1.1.2 ! misho 772: <DD><A NAME="IDX26"></A>
1.1 misho 773: This variable can be set to either <SAMP>`on'</SAMP> or <SAMP>`off'</SAMP>. Setting it
774: to <SAMP>`on'</SAMP> means that the text of the lines being edited will scroll
775: horizontally on a single screen line when they are longer than the width
1.1.1.2 ! misho 776: of the screen, instead of wrapping onto a new screen line.
! 777: This variable is automatically set to <SAMP>`on'</SAMP> for terminals of height 1.
! 778: By default, this variable is set to <SAMP>`off'</SAMP>.
1.1 misho 779: <P>
780:
781: <DT><CODE>input-meta</CODE>
1.1.1.2 ! misho 782: <DD><A NAME="IDX27"></A>
! 783: <A NAME="IDX28"></A>
1.1 misho 784: If set to <SAMP>`on'</SAMP>, Readline will enable eight-bit input (it
785: will not clear the eighth bit in the characters it reads),
786: regardless of what the terminal claims it can support. The
1.1.1.2 ! misho 787: default value is <SAMP>`off'</SAMP>, but Readline will set it to <SAMP>`on'</SAMP> if the
! 788: locale contains eight-bit characters.
! 789: The name <CODE>meta-flag</CODE> is a synonym for this variable.
1.1 misho 790: <P>
791:
792: <DT><CODE>isearch-terminators</CODE>
1.1.1.2 ! misho 793: <DD><A NAME="IDX29"></A>
1.1 misho 794: The string of characters that should terminate an incremental search without
795: subsequently executing the character as a command (see section <A HREF="readline.html#SEC8">1.2.5 Searching for Commands in the History</A>).
796: If this variable has not been given a value, the characters <KBD>ESC</KBD> and
797: <KBD>C-J</KBD> will terminate an incremental search.
798: <P>
799:
800: <DT><CODE>keymap</CODE>
1.1.1.2 ! misho 801: <DD><A NAME="IDX30"></A>
1.1 misho 802: Sets Readline's idea of the current keymap for key binding commands.
1.1.1.2 ! misho 803: Built-in <CODE>keymap</CODE> names are
1.1 misho 804: <CODE>emacs</CODE>,
805: <CODE>emacs-standard</CODE>,
806: <CODE>emacs-meta</CODE>,
807: <CODE>emacs-ctlx</CODE>,
808: <CODE>vi</CODE>,
809: <CODE>vi-move</CODE>,
810: <CODE>vi-command</CODE>, and
811: <CODE>vi-insert</CODE>.
1.1.1.2 ! misho 812: <CODE>vi</CODE> is equivalent to <CODE>vi-command</CODE> (<CODE>vi-move</CODE> is also a
! 813: synonym); <CODE>emacs</CODE> is equivalent to <CODE>emacs-standard</CODE>.
! 814: Applications may add additional names.
! 815: The default value is <CODE>emacs</CODE>.
1.1 misho 816: The value of the <CODE>editing-mode</CODE> variable also affects the
817: default keymap.
818: <P>
819:
820: <DT><CODE>keyseq-timeout</CODE>
821: <DD>Specifies the duration Readline will wait for a character when reading an
822: ambiguous key sequence (one that can form a complete key sequence using
823: the input read so far, or can take additional input to complete a longer
824: key sequence).
825: If no input is received within the timeout, Readline will use the shorter
826: but complete key sequence.
827: Readline uses this value to determine whether or not input is
828: available on the current input source (<CODE>rl_instream</CODE> by default).
829: The value is specified in milliseconds, so a value of 1000 means that
830: Readline will wait one second for additional input.
831: If this variable is set to a value less than or equal to zero, or to a
832: non-numeric value, Readline will wait until another key is pressed to
833: decide which key sequence to complete.
834: The default value is <CODE>500</CODE>.
835: <P>
836:
837: <DT><CODE>mark-directories</CODE>
838: <DD>If set to <SAMP>`on'</SAMP>, completed directory names have a slash
839: appended. The default is <SAMP>`on'</SAMP>.
840: <P>
841:
842: <DT><CODE>mark-modified-lines</CODE>
1.1.1.2 ! misho 843: <DD><A NAME="IDX31"></A>
1.1 misho 844: This variable, when set to <SAMP>`on'</SAMP>, causes Readline to display an
845: asterisk (<SAMP>`*'</SAMP>) at the start of history lines which have been modified.
846: This variable is <SAMP>`off'</SAMP> by default.
847: <P>
848:
849: <DT><CODE>mark-symlinked-directories</CODE>
1.1.1.2 ! misho 850: <DD><A NAME="IDX32"></A>
1.1 misho 851: If set to <SAMP>`on'</SAMP>, completed names which are symbolic links
852: to directories have a slash appended (subject to the value of
853: <CODE>mark-directories</CODE>).
854: The default is <SAMP>`off'</SAMP>.
855: <P>
856:
857: <DT><CODE>match-hidden-files</CODE>
1.1.1.2 ! misho 858: <DD><A NAME="IDX33"></A>
1.1 misho 859: This variable, when set to <SAMP>`on'</SAMP>, causes Readline to match files whose
860: names begin with a <SAMP>`.'</SAMP> (hidden files) when performing filename
861: completion.
862: If set to <SAMP>`off'</SAMP>, the leading <SAMP>`.'</SAMP> must be
863: supplied by the user in the filename to be completed.
864: This variable is <SAMP>`on'</SAMP> by default.
865: <P>
866:
867: <DT><CODE>menu-complete-display-prefix</CODE>
1.1.1.2 ! misho 868: <DD><A NAME="IDX34"></A>
1.1 misho 869: If set to <SAMP>`on'</SAMP>, menu completion displays the common prefix of the
870: list of possible completions (which may be empty) before cycling through
871: the list. The default is <SAMP>`off'</SAMP>.
872: <P>
873:
874: <DT><CODE>output-meta</CODE>
1.1.1.2 ! misho 875: <DD><A NAME="IDX35"></A>
1.1 misho 876: If set to <SAMP>`on'</SAMP>, Readline will display characters with the
877: eighth bit set directly rather than as a meta-prefixed escape
1.1.1.2 ! misho 878: sequence.
! 879: The default is <SAMP>`off'</SAMP>, but Readline will set it to <SAMP>`on'</SAMP> if the
! 880: locale contains eight-bit characters.
1.1 misho 881: <P>
882:
883: <DT><CODE>page-completions</CODE>
1.1.1.2 ! misho 884: <DD><A NAME="IDX36"></A>
1.1 misho 885: If set to <SAMP>`on'</SAMP>, Readline uses an internal <CODE>more</CODE>-like pager
886: to display a screenful of possible completions at a time.
887: This variable is <SAMP>`on'</SAMP> by default.
888: <P>
889:
890: <DT><CODE>print-completions-horizontally</CODE>
891: <DD>If set to <SAMP>`on'</SAMP>, Readline will display completions with matches
892: sorted horizontally in alphabetical order, rather than down the screen.
893: The default is <SAMP>`off'</SAMP>.
894: <P>
895:
896: <DT><CODE>revert-all-at-newline</CODE>
1.1.1.2 ! misho 897: <DD><A NAME="IDX37"></A>
1.1 misho 898: If set to <SAMP>`on'</SAMP>, Readline will undo all changes to history lines
899: before returning when <CODE>accept-line</CODE> is executed. By default,
900: history lines may be modified and retain individual undo lists across
901: calls to <CODE>readline</CODE>. The default is <SAMP>`off'</SAMP>.
902: <P>
903:
904: <DT><CODE>show-all-if-ambiguous</CODE>
1.1.1.2 ! misho 905: <DD><A NAME="IDX38"></A>
1.1 misho 906: This alters the default behavior of the completion functions. If
907: set to <SAMP>`on'</SAMP>,
908: words which have more than one possible completion cause the
909: matches to be listed immediately instead of ringing the bell.
910: The default value is <SAMP>`off'</SAMP>.
911: <P>
912:
913: <DT><CODE>show-all-if-unmodified</CODE>
1.1.1.2 ! misho 914: <DD><A NAME="IDX39"></A>
1.1 misho 915: This alters the default behavior of the completion functions in
916: a fashion similar to <VAR>show-all-if-ambiguous</VAR>.
917: If set to <SAMP>`on'</SAMP>,
918: words which have more than one possible completion without any
919: possible partial completion (the possible completions don't share
920: a common prefix) cause the matches to be listed immediately instead
921: of ringing the bell.
922: The default value is <SAMP>`off'</SAMP>.
923: <P>
924:
925: <DT><CODE>show-mode-in-prompt</CODE>
1.1.1.2 ! misho 926: <DD><A NAME="IDX40"></A>
! 927: If set to <SAMP>`on'</SAMP>, add a string to the beginning of the prompt
! 928: indicating the editing mode: emacs, vi command, or vi insertion.
! 929: The mode strings are user-settable (e.g., <VAR>emacs-mode-string</VAR>).
1.1 misho 930: The default value is <SAMP>`off'</SAMP>.
931: <P>
932:
933: <DT><CODE>skip-completed-text</CODE>
1.1.1.2 ! misho 934: <DD><A NAME="IDX41"></A>
1.1 misho 935: If set to <SAMP>`on'</SAMP>, this alters the default completion behavior when
936: inserting a single match into the line. It's only active when
937: performing completion in the middle of a word. If enabled, readline
938: does not insert characters from the completion that match characters
939: after point in the word being completed, so portions of the word
940: following the cursor are not duplicated.
941: For instance, if this is enabled, attempting completion when the cursor
942: is after the <SAMP>`e'</SAMP> in <SAMP>`Makefile'</SAMP> will result in <SAMP>`Makefile'</SAMP>
943: rather than <SAMP>`Makefilefile'</SAMP>, assuming there is a single possible
944: completion.
945: The default value is <SAMP>`off'</SAMP>.
946: <P>
947:
1.1.1.2 ! misho 948: <DT><CODE>vi-cmd-mode-string</CODE>
! 949: <DD><A NAME="IDX42"></A>
! 950: If the <VAR>show-mode-in-prompt</VAR> variable is enabled,
! 951: this string is displayed immediately before the last line of the primary
! 952: prompt when vi editing mode is active and in command mode.
! 953: The value is expanded like a
! 954: key binding, so the standard set of meta- and control prefixes and
! 955: backslash escape sequences is available.
! 956: Use the <SAMP>`\1'</SAMP> and <SAMP>`\2'</SAMP> escapes to begin and end sequences of
! 957: non-printing characters, which can be used to embed a terminal control
! 958: sequence into the mode string.
! 959: The default is <SAMP>`(cmd)'</SAMP>.
! 960: <P>
! 961:
! 962: <DT><CODE>vi-ins-mode-string</CODE>
! 963: <DD><A NAME="IDX43"></A>
! 964: If the <VAR>show-mode-in-prompt</VAR> variable is enabled,
! 965: this string is displayed immediately before the last line of the primary
! 966: prompt when vi editing mode is active and in insertion mode.
! 967: The value is expanded like a
! 968: key binding, so the standard set of meta- and control prefixes and
! 969: backslash escape sequences is available.
! 970: Use the <SAMP>`\1'</SAMP> and <SAMP>`\2'</SAMP> escapes to begin and end sequences of
! 971: non-printing characters, which can be used to embed a terminal control
! 972: sequence into the mode string.
! 973: The default is <SAMP>`(ins)'</SAMP>.
! 974: <P>
! 975:
1.1 misho 976: <DT><CODE>visible-stats</CODE>
1.1.1.2 ! misho 977: <DD><A NAME="IDX44"></A>
1.1 misho 978: If set to <SAMP>`on'</SAMP>, a character denoting a file's type
979: is appended to the filename when listing possible
980: completions. The default is <SAMP>`off'</SAMP>.
981: <P>
982:
983: </DL>
984: <P>
985:
986: <DT>Key Bindings
987: <DD>The syntax for controlling key bindings in the init file is
988: simple. First you need to find the name of the command that you
989: want to change. The following sections contain tables of the command
990: name, the default keybinding, if any, and a short description of what
991: the command does.
992: <P>
993:
994: Once you know the name of the command, simply place on a line
995: in the init file the name of the key
996: you wish to bind the command to, a colon, and then the name of the
997: command.
998: There can be no space between the key name and the colon -- that will be
999: interpreted as part of the key name.
1000: The name of the key can be expressed in different ways, depending on
1001: what you find most comfortable.
1002: </P><P>
1003:
1004: In addition to command names, readline allows keys to be bound
1005: to a string that is inserted when the key is pressed (a <VAR>macro</VAR>).
1006: </P><P>
1007:
1008: <DL COMPACT>
1009: <DT><VAR>keyname</VAR>: <VAR>function-name</VAR> or <VAR>macro</VAR>
1010: <DD><VAR>keyname</VAR> is the name of a key spelled out in English. For example:
1011: <TABLE><tr><td> </td><td class=example><pre>Control-u: universal-argument
1012: Meta-Rubout: backward-kill-word
1013: Control-o: "> output"
1014: </pre></td></tr></table><P>
1015:
1.1.1.2 ! misho 1016: In the example above, <KBD>C-u</KBD> is bound to the function
1.1 misho 1017: <CODE>universal-argument</CODE>,
1018: <KBD>M-DEL</KBD> is bound to the function <CODE>backward-kill-word</CODE>, and
1019: <KBD>C-o</KBD> is bound to run the macro
1020: expressed on the right hand side (that is, to insert the text
1021: <SAMP>`> output'</SAMP> into the line).
1022: </P><P>
1023:
1024: A number of symbolic character names are recognized while
1025: processing this key binding syntax:
1026: <VAR>DEL</VAR>,
1027: <VAR>ESC</VAR>,
1028: <VAR>ESCAPE</VAR>,
1029: <VAR>LFD</VAR>,
1030: <VAR>NEWLINE</VAR>,
1031: <VAR>RET</VAR>,
1032: <VAR>RETURN</VAR>,
1033: <VAR>RUBOUT</VAR>,
1034: <VAR>SPACE</VAR>,
1035: <VAR>SPC</VAR>,
1036: and
1037: <VAR>TAB</VAR>.
1038: </P><P>
1039:
1040: <DT>"<VAR>keyseq</VAR>": <VAR>function-name</VAR> or <VAR>macro</VAR>
1041: <DD><VAR>keyseq</VAR> differs from <VAR>keyname</VAR> above in that strings
1042: denoting an entire key sequence can be specified, by placing
1043: the key sequence in double quotes. Some GNU Emacs style key
1044: escapes can be used, as in the following example, but the
1045: special character names are not recognized.
1046: <P>
1047:
1048: <TABLE><tr><td> </td><td class=example><pre>"\C-u": universal-argument
1049: "\C-x\C-r": re-read-init-file
1050: "\e[11~": "Function Key 1"
1051: </pre></td></tr></table></P><P>
1052:
1053: In the above example, <KBD>C-u</KBD> is again bound to the function
1054: <CODE>universal-argument</CODE> (just as it was in the first example),
1055: <SAMP>`<KBD>C-x</KBD> <KBD>C-r</KBD>'</SAMP> is bound to the function <CODE>re-read-init-file</CODE>,
1056: and <SAMP>`<KBD>ESC</KBD> <KBD>[</KBD> <KBD>1</KBD> <KBD>1</KBD> <KBD>~</KBD>'</SAMP> is bound to insert
1057: the text <SAMP>`Function Key 1'</SAMP>.
1058: </P><P>
1059:
1060: </DL>
1061: <P>
1062:
1063: The following GNU Emacs style escape sequences are available when
1064: specifying key sequences:
1065: </P><P>
1066:
1067: <DL COMPACT>
1068: <DT><CODE><KBD>\C-</KBD></CODE>
1069: <DD>control prefix
1070: <DT><CODE><KBD>\M-</KBD></CODE>
1071: <DD>meta prefix
1072: <DT><CODE><KBD>\e</KBD></CODE>
1073: <DD>an escape character
1074: <DT><CODE><KBD>\\</KBD></CODE>
1075: <DD>backslash
1076: <DT><CODE><KBD>\"</KBD></CODE>
1077: <DD><KBD>"</KBD>, a double quotation mark
1078: <DT><CODE><KBD>\'</KBD></CODE>
1079: <DD><KBD>'</KBD>, a single quote or apostrophe
1080: </DL>
1081: <P>
1082:
1083: In addition to the GNU Emacs style escape sequences, a second
1084: set of backslash escapes is available:
1085: </P><P>
1086:
1087: <DL COMPACT>
1088: <DT><CODE>\a</CODE>
1089: <DD>alert (bell)
1090: <DT><CODE>\b</CODE>
1091: <DD>backspace
1092: <DT><CODE>\d</CODE>
1093: <DD>delete
1094: <DT><CODE>\f</CODE>
1095: <DD>form feed
1096: <DT><CODE>\n</CODE>
1097: <DD>newline
1098: <DT><CODE>\r</CODE>
1099: <DD>carriage return
1100: <DT><CODE>\t</CODE>
1101: <DD>horizontal tab
1102: <DT><CODE>\v</CODE>
1103: <DD>vertical tab
1104: <DT><CODE>\<VAR>nnn</VAR></CODE>
1105: <DD>the eight-bit character whose value is the octal value <VAR>nnn</VAR>
1106: (one to three digits)
1107: <DT><CODE>\x<VAR>HH</VAR></CODE>
1108: <DD>the eight-bit character whose value is the hexadecimal value <VAR>HH</VAR>
1109: (one or two hex digits)
1110: </DL>
1111: <P>
1112:
1113: When entering the text of a macro, single or double quotes must
1114: be used to indicate a macro definition.
1115: Unquoted text is assumed to be a function name.
1116: In the macro body, the backslash escapes described above are expanded.
1117: Backslash will quote any other character in the macro text,
1118: including <SAMP>`"'</SAMP> and <SAMP>`''</SAMP>.
1119: For example, the following binding will make <SAMP>`<KBD>C-x</KBD> \'</SAMP>
1120: insert a single <SAMP>`\'</SAMP> into the line:
1121: <TABLE><tr><td> </td><td class=example><pre>"\C-x\\": "\\"
1122: </pre></td></tr></table></P><P>
1123:
1124: </DL>
1125: <P>
1126:
1127: <A NAME="Conditional Init Constructs"></A>
1128: <HR SIZE="6">
1129: <A NAME="SEC11"></A>
1130: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1131: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC10"> < </A>]</TD>
1132: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC12"> > </A>]</TD>
1133: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC12"> << </A>]</TD>
1134: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> Up </A>]</TD>
1135: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> >> </A>]</TD>
1136: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1137: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1138: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1139: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1140: </TR></TABLE>
1141: <H3> 1.3.2 Conditional Init Constructs </H3>
1142: <!--docid::SEC11::-->
1143: <P>
1144:
1145: Readline implements a facility similar in spirit to the conditional
1146: compilation features of the C preprocessor which allows key
1147: bindings and variable settings to be performed as the result
1148: of tests. There are four parser directives used.
1149: </P><P>
1150:
1151: <DL COMPACT>
1152: <DT><CODE>$if</CODE>
1153: <DD>The <CODE>$if</CODE> construct allows bindings to be made based on the
1154: editing mode, the terminal being used, or the application using
1.1.1.2 ! misho 1155: Readline. The text of the test, after any comparison operator,
! 1156: extends to the end of the line;
! 1157: unless otherwise noted, no characters are required to isolate it.
1.1 misho 1158: <P>
1159:
1160: <DL COMPACT>
1161: <DT><CODE>mode</CODE>
1162: <DD>The <CODE>mode=</CODE> form of the <CODE>$if</CODE> directive is used to test
1163: whether Readline is in <CODE>emacs</CODE> or <CODE>vi</CODE> mode.
1164: This may be used in conjunction
1165: with the <SAMP>`set keymap'</SAMP> command, for instance, to set bindings in
1166: the <CODE>emacs-standard</CODE> and <CODE>emacs-ctlx</CODE> keymaps only if
1167: Readline is starting out in <CODE>emacs</CODE> mode.
1168: <P>
1169:
1170: <DT><CODE>term</CODE>
1171: <DD>The <CODE>term=</CODE> form may be used to include terminal-specific
1172: key bindings, perhaps to bind the key sequences output by the
1173: terminal's function keys. The word on the right side of the
1174: <SAMP>`='</SAMP> is tested against both the full name of the terminal and
1175: the portion of the terminal name before the first <SAMP>`-'</SAMP>. This
1176: allows <CODE>sun</CODE> to match both <CODE>sun</CODE> and <CODE>sun-cmd</CODE>,
1177: for instance.
1178: <P>
1179:
1.1.1.2 ! misho 1180: <DT><CODE>version</CODE>
! 1181: <DD>The <CODE>version</CODE> test may be used to perform comparisons against
! 1182: specific Readline versions.
! 1183: The <CODE>version</CODE> expands to the current Readline version.
! 1184: The set of comparison operators includes
! 1185: <SAMP>`='</SAMP> (and <SAMP>`=='</SAMP>), <SAMP>`!='</SAMP>, <SAMP>`<='</SAMP>, <SAMP>`>='</SAMP>, <SAMP>`<'</SAMP>,
! 1186: and <SAMP>`>'</SAMP>.
! 1187: The version number supplied on the right side of the operator consists
! 1188: of a major version number, an optional decimal point, and an optional
! 1189: minor version (e.g., <SAMP>`7.1'</SAMP>). If the minor version is omitted, it
! 1190: is assumed to be <SAMP>`0'</SAMP>.
! 1191: The operator may be separated from the string <CODE>version</CODE> and
! 1192: from the version number argument by whitespace.
! 1193: The following example sets a variable if the Readline version being used
! 1194: is 7.0 or newer:
! 1195: <TABLE><tr><td> </td><td class=example><pre>$if version >= 7.0
! 1196: set show-mode-in-prompt on
! 1197: $endif
! 1198: </pre></td></tr></table><P>
! 1199:
1.1 misho 1200: <DT><CODE>application</CODE>
1201: <DD>The <VAR>application</VAR> construct is used to include
1202: application-specific settings. Each program using the Readline
1203: library sets the <VAR>application name</VAR>, and you can test for
1204: a particular value.
1205: This could be used to bind key sequences to functions useful for
1206: a specific program. For instance, the following command adds a
1207: key sequence that quotes the current or previous word in Bash:
1208: <TABLE><tr><td> </td><td class=example><pre>$if Bash
1209: # Quote the current or previous word
1210: "\C-xq": "\eb\"\ef\""
1211: $endif
1.1.1.2 ! misho 1212: </pre></td></tr></table><P>
! 1213:
! 1214: <DT><CODE>variable</CODE>
! 1215: <DD>The <VAR>variable</VAR> construct provides simple equality tests for Readline
! 1216: variables and values.
! 1217: The permitted comparison operators are <SAMP>`='</SAMP>, <SAMP>`=='</SAMP>, and <SAMP>`!='</SAMP>.
! 1218: The variable name must be separated from the comparison operator by
! 1219: whitespace; the operator may be separated from the value on the right hand
! 1220: side by whitespace.
! 1221: Both string and boolean variables may be tested. Boolean variables must be
! 1222: tested against the values <VAR>on</VAR> and <VAR>off</VAR>.
! 1223: The following example is equivalent to the <CODE>mode=emacs</CODE> test described
! 1224: above:
! 1225: <TABLE><tr><td> </td><td class=example><pre>$if editing-mode == emacs
! 1226: set show-mode-in-prompt on
! 1227: $endif
1.1 misho 1228: </pre></td></tr></table></DL>
1229: <P>
1230:
1231: <DT><CODE>$endif</CODE>
1232: <DD>This command, as seen in the previous example, terminates an
1233: <CODE>$if</CODE> command.
1234: <P>
1235:
1236: <DT><CODE>$else</CODE>
1237: <DD>Commands in this branch of the <CODE>$if</CODE> directive are executed if
1238: the test fails.
1239: <P>
1240:
1241: <DT><CODE>$include</CODE>
1242: <DD>This directive takes a single filename as an argument and reads commands
1243: and bindings from that file.
1244: For example, the following directive reads from <TT>`/etc/inputrc'</TT>:
1245: <TABLE><tr><td> </td><td class=example><pre>$include /etc/inputrc
1246: </pre></td></tr></table></DL>
1247: <P>
1248:
1249: <A NAME="Sample Init File"></A>
1250: <HR SIZE="6">
1251: <A NAME="SEC12"></A>
1252: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1253: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC11"> < </A>]</TD>
1254: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> > </A>]</TD>
1255: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> << </A>]</TD>
1256: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC9"> Up </A>]</TD>
1257: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> >> </A>]</TD>
1258: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1259: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1260: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1261: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1262: </TR></TABLE>
1263: <H3> 1.3.3 Sample Init File </H3>
1264: <!--docid::SEC12::-->
1265: <P>
1266:
1267: Here is an example of an <VAR>inputrc</VAR> file. This illustrates key
1268: binding, variable assignment, and conditional syntax.
1269: </P><P>
1270:
1271: <TABLE><tr><td> </td><td class=example><pre># This file controls the behaviour of line input editing for
1272: # programs that use the GNU Readline library. Existing
1273: # programs include FTP, Bash, and GDB.
1274: #
1275: # You can re-read the inputrc file with C-x C-r.
1276: # Lines beginning with '#' are comments.
1277: #
1278: # First, include any system-wide bindings and variable
1279: # assignments from /etc/Inputrc
1280: $include /etc/Inputrc
1281:
1282: #
1283: # Set various bindings for emacs mode.
1284:
1285: set editing-mode emacs
1286:
1287: $if mode=emacs
1288:
1289: Meta-Control-h: backward-kill-word Text after the function name is ignored
1290:
1291: #
1292: # Arrow keys in keypad mode
1293: #
1294: #"\M-OD": backward-char
1295: #"\M-OC": forward-char
1296: #"\M-OA": previous-history
1297: #"\M-OB": next-history
1298: #
1299: # Arrow keys in ANSI mode
1300: #
1301: "\M-[D": backward-char
1302: "\M-[C": forward-char
1303: "\M-[A": previous-history
1304: "\M-[B": next-history
1305: #
1306: # Arrow keys in 8 bit keypad mode
1307: #
1308: #"\M-\C-OD": backward-char
1309: #"\M-\C-OC": forward-char
1310: #"\M-\C-OA": previous-history
1311: #"\M-\C-OB": next-history
1312: #
1313: # Arrow keys in 8 bit ANSI mode
1314: #
1315: #"\M-\C-[D": backward-char
1316: #"\M-\C-[C": forward-char
1317: #"\M-\C-[A": previous-history
1318: #"\M-\C-[B": next-history
1319:
1320: C-q: quoted-insert
1321:
1322: $endif
1323:
1324: # An old-style binding. This happens to be the default.
1325: TAB: complete
1326:
1327: # Macros that are convenient for shell interaction
1328: $if Bash
1329: # edit the path
1330: "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
1331: # prepare to type a quoted word --
1332: # insert open and close double quotes
1333: # and move to just after the open quote
1334: "\C-x\"": "\"\"\C-b"
1335: # insert a backslash (testing backslash escapes
1336: # in sequences and macros)
1337: "\C-x\\": "\\"
1338: # Quote the current or previous word
1339: "\C-xq": "\eb\"\ef\""
1340: # Add a binding to refresh the line, which is unbound
1341: "\C-xr": redraw-current-line
1342: # Edit variable on current line.
1343: "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
1344: $endif
1345:
1346: # use a visible bell if one is available
1347: set bell-style visible
1348:
1349: # don't strip characters to 7 bits when reading
1350: set input-meta on
1351:
1352: # allow iso-latin1 characters to be inserted rather
1353: # than converted to prefix-meta sequences
1354: set convert-meta off
1355:
1356: # display characters with the eighth bit set directly
1357: # rather than as meta-prefixed characters
1358: set output-meta on
1359:
1.1.1.2 ! misho 1360: # if there are 150 or more possible completions for a word,
! 1361: # ask whether or not the user wants to see all of them
1.1 misho 1362: set completion-query-items 150
1363:
1364: # For FTP
1365: $if Ftp
1366: "\C-xg": "get \M-?"
1367: "\C-xt": "put \M-?"
1368: "\M-.": yank-last-arg
1369: $endif
1370: </pre></td></tr></table></P><P>
1371:
1372: <A NAME="Bindable Readline Commands"></A>
1373: <HR SIZE="6">
1374: <A NAME="SEC13"></A>
1375: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1376: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC12"> < </A>]</TD>
1377: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC14"> > </A>]</TD>
1378: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> << </A>]</TD>
1379: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC1"> Up </A>]</TD>
1380: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> >> </A>]</TD>
1381: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1382: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1383: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1384: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1385: </TR></TABLE>
1386: <H2> 1.4 Bindable Readline Commands </H2>
1387: <!--docid::SEC13::-->
1388: <P>
1389:
1390: <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
1391: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Moving about the line.</TD></TR>
1392: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Getting at previous lines.</TD></TR>
1393: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Commands for changing text.</TD></TR>
1394: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Commands for killing and yanking.</TD></TR>
1395: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Specifying numeric arguments, repeat counts.</TD></TR>
1396: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Getting Readline to do the typing for you.</TD></TR>
1397: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC20">1.4.7 Keyboard Macros</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Saving and re-executing typed characters</TD></TR>
1398: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Other miscellaneous commands.</TD></TR>
1399: </TABLE></BLOCKQUOTE>
1400: <P>
1401:
1402: This section describes Readline commands that may be bound to key
1403: sequences.
1404: Command names without an accompanying key sequence are unbound by default.
1405: </P><P>
1406:
1407: In the following descriptions, <EM>point</EM> refers to the current cursor
1408: position, and <EM>mark</EM> refers to a cursor position saved by the
1409: <CODE>set-mark</CODE> command.
1410: The text between the point and mark is referred to as the <EM>region</EM>.
1411: </P><P>
1412:
1413: <A NAME="Commands For Moving"></A>
1414: <HR SIZE="6">
1415: <A NAME="SEC14"></A>
1416: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1417: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> < </A>]</TD>
1418: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC15"> > </A>]</TD>
1419: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> << </A>]</TD>
1420: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1421: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> >> </A>]</TD>
1422: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1423: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1424: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1425: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1426: </TR></TABLE>
1427: <H3> 1.4.1 Commands For Moving </H3>
1428: <!--docid::SEC14::-->
1429: <DL COMPACT>
1.1.1.2 ! misho 1430: <A NAME="IDX45"></A>
1.1 misho 1431: <DT><CODE>beginning-of-line (C-a)</CODE>
1.1.1.2 ! misho 1432: <DD><A NAME="IDX46"></A>
1.1 misho 1433: Move to the start of the current line.
1434: <P>
1435:
1.1.1.2 ! misho 1436: <A NAME="IDX47"></A>
1.1 misho 1437: <DT><CODE>end-of-line (C-e)</CODE>
1.1.1.2 ! misho 1438: <DD><A NAME="IDX48"></A>
1.1 misho 1439: Move to the end of the line.
1440: <P>
1441:
1.1.1.2 ! misho 1442: <A NAME="IDX49"></A>
1.1 misho 1443: <DT><CODE>forward-char (C-f)</CODE>
1.1.1.2 ! misho 1444: <DD><A NAME="IDX50"></A>
1.1 misho 1445: Move forward a character.
1446: <P>
1447:
1.1.1.2 ! misho 1448: <A NAME="IDX51"></A>
1.1 misho 1449: <DT><CODE>backward-char (C-b)</CODE>
1.1.1.2 ! misho 1450: <DD><A NAME="IDX52"></A>
1.1 misho 1451: Move back a character.
1452: <P>
1453:
1.1.1.2 ! misho 1454: <A NAME="IDX53"></A>
1.1 misho 1455: <DT><CODE>forward-word (M-f)</CODE>
1.1.1.2 ! misho 1456: <DD><A NAME="IDX54"></A>
1.1 misho 1457: Move forward to the end of the next word.
1458: Words are composed of letters and digits.
1459: <P>
1460:
1.1.1.2 ! misho 1461: <A NAME="IDX55"></A>
1.1 misho 1462: <DT><CODE>backward-word (M-b)</CODE>
1.1.1.2 ! misho 1463: <DD><A NAME="IDX56"></A>
1.1 misho 1464: Move back to the start of the current or previous word.
1465: Words are composed of letters and digits.
1466: <P>
1467:
1.1.1.2 ! misho 1468: <A NAME="IDX57"></A>
! 1469: <DT><CODE>previous-screen-line ()</CODE>
! 1470: <DD><A NAME="IDX58"></A>
! 1471: Attempt to move point to the same physical screen column on the previous
! 1472: physical screen line. This will not have the desired effect if the current
! 1473: Readline line does not take up more than one physical line or if point is not
! 1474: greater than the length of the prompt plus the screen width.
! 1475: <P>
! 1476:
! 1477: <A NAME="IDX59"></A>
! 1478: <DT><CODE>next-screen-line ()</CODE>
! 1479: <DD><A NAME="IDX60"></A>
! 1480: Attempt to move point to the same physical screen column on the next
! 1481: physical screen line. This will not have the desired effect if the current
! 1482: Readline line does not take up more than one physical line or if the length
! 1483: of the current Readline line is not greater than the length of the prompt
! 1484: plus the screen width.
! 1485: <P>
! 1486:
! 1487: <A NAME="IDX61"></A>
! 1488: <DT><CODE>clear-display (M-C-l)</CODE>
! 1489: <DD><A NAME="IDX62"></A>
! 1490: Clear the screen and, if possible, the terminal's scrollback buffer,
! 1491: then redraw the current line,
! 1492: leaving the current line at the top of the screen.
! 1493: <P>
! 1494:
! 1495: <A NAME="IDX63"></A>
1.1 misho 1496: <DT><CODE>clear-screen (C-l)</CODE>
1.1.1.2 ! misho 1497: <DD><A NAME="IDX64"></A>
! 1498: Clear the screen,
! 1499: then redraw the current line,
1.1 misho 1500: leaving the current line at the top of the screen.
1501: <P>
1502:
1.1.1.2 ! misho 1503: <A NAME="IDX65"></A>
1.1 misho 1504: <DT><CODE>redraw-current-line ()</CODE>
1.1.1.2 ! misho 1505: <DD><A NAME="IDX66"></A>
1.1 misho 1506: Refresh the current line. By default, this is unbound.
1507: <P>
1508:
1509: </DL>
1510: <P>
1511:
1512: <A NAME="Commands For History"></A>
1513: <HR SIZE="6">
1514: <A NAME="SEC15"></A>
1515: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1516: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC14"> < </A>]</TD>
1517: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC16"> > </A>]</TD>
1518: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC16"> << </A>]</TD>
1519: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1520: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> >> </A>]</TD>
1521: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1522: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1523: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1524: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1525: </TR></TABLE>
1526: <H3> 1.4.2 Commands For Manipulating The History </H3>
1527: <!--docid::SEC15::-->
1528: <P>
1529:
1530: <DL COMPACT>
1.1.1.2 ! misho 1531: <A NAME="IDX67"></A>
1.1 misho 1532: <DT><CODE>accept-line (Newline or Return)</CODE>
1.1.1.2 ! misho 1533: <DD><A NAME="IDX68"></A>
1.1 misho 1534: Accept the line regardless of where the cursor is.
1535: If this line is
1536: non-empty, it may be added to the history list for future recall with
1537: <CODE>add_history()</CODE>.
1538: If this line is a modified history line, the history line is restored
1539: to its original state.
1540: <P>
1541:
1.1.1.2 ! misho 1542: <A NAME="IDX69"></A>
1.1 misho 1543: <DT><CODE>previous-history (C-p)</CODE>
1.1.1.2 ! misho 1544: <DD><A NAME="IDX70"></A>
1.1 misho 1545: Move `back' through the history list, fetching the previous command.
1546: <P>
1547:
1.1.1.2 ! misho 1548: <A NAME="IDX71"></A>
1.1 misho 1549: <DT><CODE>next-history (C-n)</CODE>
1.1.1.2 ! misho 1550: <DD><A NAME="IDX72"></A>
1.1 misho 1551: Move `forward' through the history list, fetching the next command.
1552: <P>
1553:
1.1.1.2 ! misho 1554: <A NAME="IDX73"></A>
1.1 misho 1555: <DT><CODE>beginning-of-history (M-<)</CODE>
1.1.1.2 ! misho 1556: <DD><A NAME="IDX74"></A>
1.1 misho 1557: Move to the first line in the history.
1558: <P>
1559:
1.1.1.2 ! misho 1560: <A NAME="IDX75"></A>
1.1 misho 1561: <DT><CODE>end-of-history (M->)</CODE>
1.1.1.2 ! misho 1562: <DD><A NAME="IDX76"></A>
1.1 misho 1563: Move to the end of the input history, i.e., the line currently
1564: being entered.
1565: <P>
1566:
1.1.1.2 ! misho 1567: <A NAME="IDX77"></A>
1.1 misho 1568: <DT><CODE>reverse-search-history (C-r)</CODE>
1.1.1.2 ! misho 1569: <DD><A NAME="IDX78"></A>
1.1 misho 1570: Search backward starting at the current line and moving `up' through
1571: the history as necessary. This is an incremental search.
1.1.1.2 ! misho 1572: This command sets the region to the matched text and activates the mark.
1.1 misho 1573: <P>
1574:
1.1.1.2 ! misho 1575: <A NAME="IDX79"></A>
1.1 misho 1576: <DT><CODE>forward-search-history (C-s)</CODE>
1.1.1.2 ! misho 1577: <DD><A NAME="IDX80"></A>
1.1 misho 1578: Search forward starting at the current line and moving `down' through
1.1.1.2 ! misho 1579: the history as necessary. This is an incremental search.
! 1580: This command sets the region to the matched text and activates the mark.
1.1 misho 1581: <P>
1582:
1.1.1.2 ! misho 1583: <A NAME="IDX81"></A>
1.1 misho 1584: <DT><CODE>non-incremental-reverse-search-history (M-p)</CODE>
1.1.1.2 ! misho 1585: <DD><A NAME="IDX82"></A>
1.1 misho 1586: Search backward starting at the current line and moving `up'
1587: through the history as necessary using a non-incremental search
1588: for a string supplied by the user.
1.1.1.2 ! misho 1589: The search string may match anywhere in a history line.
1.1 misho 1590: <P>
1591:
1.1.1.2 ! misho 1592: <A NAME="IDX83"></A>
1.1 misho 1593: <DT><CODE>non-incremental-forward-search-history (M-n)</CODE>
1.1.1.2 ! misho 1594: <DD><A NAME="IDX84"></A>
1.1 misho 1595: Search forward starting at the current line and moving `down'
1.1.1.2 ! misho 1596: through the history as necessary using a non-incremental search
1.1 misho 1597: for a string supplied by the user.
1.1.1.2 ! misho 1598: The search string may match anywhere in a history line.
1.1 misho 1599: <P>
1600:
1.1.1.2 ! misho 1601: <A NAME="IDX85"></A>
1.1 misho 1602: <DT><CODE>history-search-forward ()</CODE>
1.1.1.2 ! misho 1603: <DD><A NAME="IDX86"></A>
1.1 misho 1604: Search forward through the history for the string of characters
1605: between the start of the current line and the point.
1606: The search string must match at the beginning of a history line.
1607: This is a non-incremental search.
1608: By default, this command is unbound.
1609: <P>
1610:
1.1.1.2 ! misho 1611: <A NAME="IDX87"></A>
1.1 misho 1612: <DT><CODE>history-search-backward ()</CODE>
1.1.1.2 ! misho 1613: <DD><A NAME="IDX88"></A>
1.1 misho 1614: Search backward through the history for the string of characters
1615: between the start of the current line and the point.
1616: The search string must match at the beginning of a history line.
1617: This is a non-incremental search.
1618: By default, this command is unbound.
1619: <P>
1620:
1.1.1.2 ! misho 1621: <A NAME="IDX89"></A>
! 1622: <DT><CODE>history-substring-search-forward ()</CODE>
! 1623: <DD><A NAME="IDX90"></A>
1.1 misho 1624: Search forward through the history for the string of characters
1625: between the start of the current line and the point.
1626: The search string may match anywhere in a history line.
1627: This is a non-incremental search.
1628: By default, this command is unbound.
1629: <P>
1630:
1.1.1.2 ! misho 1631: <A NAME="IDX91"></A>
! 1632: <DT><CODE>history-substring-search-backward ()</CODE>
! 1633: <DD><A NAME="IDX92"></A>
1.1 misho 1634: Search backward through the history for the string of characters
1635: between the start of the current line and the point.
1636: The search string may match anywhere in a history line.
1637: This is a non-incremental search.
1638: By default, this command is unbound.
1639: <P>
1640:
1.1.1.2 ! misho 1641: <A NAME="IDX93"></A>
1.1 misho 1642: <DT><CODE>yank-nth-arg (M-C-y)</CODE>
1.1.1.2 ! misho 1643: <DD><A NAME="IDX94"></A>
1.1 misho 1644: Insert the first argument to the previous command (usually
1645: the second word on the previous line) at point.
1646: With an argument <VAR>n</VAR>,
1647: insert the <VAR>n</VAR>th word from the previous command (the words
1648: in the previous command begin with word 0). A negative argument
1649: inserts the <VAR>n</VAR>th word from the end of the previous command.
1650: Once the argument <VAR>n</VAR> is computed, the argument is extracted
1651: as if the <SAMP>`!<VAR>n</VAR>'</SAMP> history expansion had been specified.
1652: <P>
1653:
1.1.1.2 ! misho 1654: <A NAME="IDX95"></A>
1.1 misho 1655: <DT><CODE>yank-last-arg (M-. or M-_)</CODE>
1.1.1.2 ! misho 1656: <DD><A NAME="IDX96"></A>
1.1 misho 1657: Insert last argument to the previous command (the last word of the
1658: previous history entry).
1659: With a numeric argument, behave exactly like <CODE>yank-nth-arg</CODE>.
1660: Successive calls to <CODE>yank-last-arg</CODE> move back through the history
1661: list, inserting the last word (or the word specified by the argument to
1662: the first call) of each line in turn.
1663: Any numeric argument supplied to these successive calls determines
1664: the direction to move through the history. A negative argument switches
1665: the direction through the history (back or forward).
1666: The history expansion facilities are used to extract the last argument,
1667: as if the <SAMP>`!$'</SAMP> history expansion had been specified.
1668: <P>
1669:
1.1.1.2 ! misho 1670: <A NAME="IDX97"></A>
! 1671: <DT><CODE>operate-and-get-next (C-o)</CODE>
! 1672: <DD><A NAME="IDX98"></A>
! 1673: Accept the current line for return to the calling application as if a
! 1674: newline had been entered,
! 1675: and fetch the next line relative to the current line from the history
! 1676: for editing.
! 1677: A numeric argument, if supplied, specifies the history entry to use instead
! 1678: of the current line.
! 1679: <P>
! 1680:
1.1 misho 1681: </DL>
1682: <P>
1683:
1684: <A NAME="Commands For Text"></A>
1685: <HR SIZE="6">
1686: <A NAME="SEC16"></A>
1687: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1688: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC15"> < </A>]</TD>
1689: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC17"> > </A>]</TD>
1690: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC17"> << </A>]</TD>
1691: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1692: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> >> </A>]</TD>
1693: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1694: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1695: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1696: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1697: </TR></TABLE>
1698: <H3> 1.4.3 Commands For Changing Text </H3>
1699: <!--docid::SEC16::-->
1700: <P>
1701:
1702: <DL COMPACT>
1703:
1.1.1.2 ! misho 1704: <A NAME="IDX99"></A>
1.1 misho 1705: <DT><CODE><I>end-of-file</I> (usually C-d)</CODE>
1.1.1.2 ! misho 1706: <DD><A NAME="IDX100"></A>
1.1 misho 1707: The character indicating end-of-file as set, for example, by
1708: <CODE>stty</CODE>. If this character is read when there are no characters
1709: on the line, and point is at the beginning of the line, Readline
1710: interprets it as the end of input and returns EOF.
1711: <P>
1712:
1.1.1.2 ! misho 1713: <A NAME="IDX101"></A>
1.1 misho 1714: <DT><CODE>delete-char (C-d)</CODE>
1.1.1.2 ! misho 1715: <DD><A NAME="IDX102"></A>
1.1 misho 1716: Delete the character at point. If this function is bound to the
1717: same character as the tty EOF character, as <KBD>C-d</KBD>
1718: commonly is, see above for the effects.
1719: <P>
1720:
1.1.1.2 ! misho 1721: <A NAME="IDX103"></A>
1.1 misho 1722: <DT><CODE>backward-delete-char (Rubout)</CODE>
1.1.1.2 ! misho 1723: <DD><A NAME="IDX104"></A>
1.1 misho 1724: Delete the character behind the cursor. A numeric argument means
1725: to kill the characters instead of deleting them.
1726: <P>
1727:
1.1.1.2 ! misho 1728: <A NAME="IDX105"></A>
1.1 misho 1729: <DT><CODE>forward-backward-delete-char ()</CODE>
1.1.1.2 ! misho 1730: <DD><A NAME="IDX106"></A>
1.1 misho 1731: Delete the character under the cursor, unless the cursor is at the
1732: end of the line, in which case the character behind the cursor is
1733: deleted. By default, this is not bound to a key.
1734: <P>
1735:
1.1.1.2 ! misho 1736: <A NAME="IDX107"></A>
1.1 misho 1737: <DT><CODE>quoted-insert (C-q or C-v)</CODE>
1.1.1.2 ! misho 1738: <DD><A NAME="IDX108"></A>
1.1 misho 1739: Add the next character typed to the line verbatim. This is
1740: how to insert key sequences like <KBD>C-q</KBD>, for example.
1741: <P>
1742:
1.1.1.2 ! misho 1743: <A NAME="IDX109"></A>
1.1 misho 1744: <DT><CODE>tab-insert (M-<KBD>TAB</KBD>)</CODE>
1.1.1.2 ! misho 1745: <DD><A NAME="IDX110"></A>
1.1 misho 1746: Insert a tab character.
1747: <P>
1748:
1.1.1.2 ! misho 1749: <A NAME="IDX111"></A>
1.1 misho 1750: <DT><CODE>self-insert (a, b, A, 1, !, <small>...</small>)</CODE>
1.1.1.2 ! misho 1751: <DD><A NAME="IDX112"></A>
1.1 misho 1752: Insert yourself.
1753: <P>
1754:
1.1.1.2 ! misho 1755: <A NAME="IDX113"></A>
! 1756: <DT><CODE>bracketed-paste-begin ()</CODE>
! 1757: <DD><A NAME="IDX114"></A>
! 1758: This function is intended to be bound to the "bracketed paste" escape
! 1759: sequence sent by some terminals, and such a binding is assigned by default.
! 1760: It allows Readline to insert the pasted text as a single unit without treating
! 1761: each character as if it had been read from the keyboard. The characters
! 1762: are inserted as if each one was bound to <CODE>self-insert</CODE> instead of
! 1763: executing any editing commands.
! 1764: <P>
! 1765:
! 1766: Bracketed paste sets the region (the characters between point and the mark)
! 1767: to the inserted text. It uses the concept of an <EM>active mark</EM>: when the
! 1768: mark is active, Readline redisplay uses the terminal's standout mode to
! 1769: denote the region.
! 1770: </P><P>
! 1771:
! 1772: <A NAME="IDX115"></A>
1.1 misho 1773: <DT><CODE>transpose-chars (C-t)</CODE>
1.1.1.2 ! misho 1774: <DD><A NAME="IDX116"></A>
1.1 misho 1775: Drag the character before the cursor forward over
1776: the character at the cursor, moving the
1777: cursor forward as well. If the insertion point
1778: is at the end of the line, then this
1779: transposes the last two characters of the line.
1780: Negative arguments have no effect.
1781: <P>
1782:
1.1.1.2 ! misho 1783: <A NAME="IDX117"></A>
1.1 misho 1784: <DT><CODE>transpose-words (M-t)</CODE>
1.1.1.2 ! misho 1785: <DD><A NAME="IDX118"></A>
1.1 misho 1786: Drag the word before point past the word after point,
1787: moving point past that word as well.
1788: If the insertion point is at the end of the line, this transposes
1789: the last two words on the line.
1790: <P>
1791:
1.1.1.2 ! misho 1792: <A NAME="IDX119"></A>
1.1 misho 1793: <DT><CODE>upcase-word (M-u)</CODE>
1.1.1.2 ! misho 1794: <DD><A NAME="IDX120"></A>
1.1 misho 1795: Uppercase the current (or following) word. With a negative argument,
1796: uppercase the previous word, but do not move the cursor.
1797: <P>
1798:
1.1.1.2 ! misho 1799: <A NAME="IDX121"></A>
1.1 misho 1800: <DT><CODE>downcase-word (M-l)</CODE>
1.1.1.2 ! misho 1801: <DD><A NAME="IDX122"></A>
1.1 misho 1802: Lowercase the current (or following) word. With a negative argument,
1803: lowercase the previous word, but do not move the cursor.
1804: <P>
1805:
1.1.1.2 ! misho 1806: <A NAME="IDX123"></A>
1.1 misho 1807: <DT><CODE>capitalize-word (M-c)</CODE>
1.1.1.2 ! misho 1808: <DD><A NAME="IDX124"></A>
1.1 misho 1809: Capitalize the current (or following) word. With a negative argument,
1810: capitalize the previous word, but do not move the cursor.
1811: <P>
1812:
1.1.1.2 ! misho 1813: <A NAME="IDX125"></A>
1.1 misho 1814: <DT><CODE>overwrite-mode ()</CODE>
1.1.1.2 ! misho 1815: <DD><A NAME="IDX126"></A>
1.1 misho 1816: Toggle overwrite mode. With an explicit positive numeric argument,
1817: switches to overwrite mode. With an explicit non-positive numeric
1818: argument, switches to insert mode. This command affects only
1819: <CODE>emacs</CODE> mode; <CODE>vi</CODE> mode does overwrite differently.
1820: Each call to <CODE>readline()</CODE> starts in insert mode.
1821: <P>
1822:
1823: In overwrite mode, characters bound to <CODE>self-insert</CODE> replace
1824: the text at point rather than pushing the text to the right.
1825: Characters bound to <CODE>backward-delete-char</CODE> replace the character
1826: before point with a space.
1827: </P><P>
1828:
1829: By default, this command is unbound.
1830: </P><P>
1831:
1832: </DL>
1833: <P>
1834:
1835: <A NAME="Commands For Killing"></A>
1836: <HR SIZE="6">
1837: <A NAME="SEC17"></A>
1838: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1839: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC16"> < </A>]</TD>
1840: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC18"> > </A>]</TD>
1841: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC18"> << </A>]</TD>
1842: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1843: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> >> </A>]</TD>
1844: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1845: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1846: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1847: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1848: </TR></TABLE>
1849: <H3> 1.4.4 Killing And Yanking </H3>
1850: <!--docid::SEC17::-->
1851: <P>
1852:
1853: <DL COMPACT>
1854:
1.1.1.2 ! misho 1855: <A NAME="IDX127"></A>
1.1 misho 1856: <DT><CODE>kill-line (C-k)</CODE>
1.1.1.2 ! misho 1857: <DD><A NAME="IDX128"></A>
1.1 misho 1858: Kill the text from point to the end of the line.
1.1.1.2 ! misho 1859: With a negative numeric argument, kill backward from the cursor to the
! 1860: beginning of the current line.
1.1 misho 1861: <P>
1862:
1.1.1.2 ! misho 1863: <A NAME="IDX129"></A>
1.1 misho 1864: <DT><CODE>backward-kill-line (C-x Rubout)</CODE>
1.1.1.2 ! misho 1865: <DD><A NAME="IDX130"></A>
! 1866: Kill backward from the cursor to the beginning of the current line.
! 1867: With a negative numeric argument, kill forward from the cursor to the
! 1868: end of the current line.
1.1 misho 1869: <P>
1870:
1.1.1.2 ! misho 1871: <A NAME="IDX131"></A>
1.1 misho 1872: <DT><CODE>unix-line-discard (C-u)</CODE>
1.1.1.2 ! misho 1873: <DD><A NAME="IDX132"></A>
1.1 misho 1874: Kill backward from the cursor to the beginning of the current line.
1875: <P>
1876:
1.1.1.2 ! misho 1877: <A NAME="IDX133"></A>
1.1 misho 1878: <DT><CODE>kill-whole-line ()</CODE>
1.1.1.2 ! misho 1879: <DD><A NAME="IDX134"></A>
1.1 misho 1880: Kill all characters on the current line, no matter where point is.
1881: By default, this is unbound.
1882: <P>
1883:
1.1.1.2 ! misho 1884: <A NAME="IDX135"></A>
1.1 misho 1885: <DT><CODE>kill-word (M-d)</CODE>
1.1.1.2 ! misho 1886: <DD><A NAME="IDX136"></A>
1.1 misho 1887: Kill from point to the end of the current word, or if between
1888: words, to the end of the next word.
1889: Word boundaries are the same as <CODE>forward-word</CODE>.
1890: <P>
1891:
1.1.1.2 ! misho 1892: <A NAME="IDX137"></A>
1.1 misho 1893: <DT><CODE>backward-kill-word (M-<KBD>DEL</KBD>)</CODE>
1.1.1.2 ! misho 1894: <DD><A NAME="IDX138"></A>
1.1 misho 1895: Kill the word behind point.
1896: Word boundaries are the same as <CODE>backward-word</CODE>.
1897: <P>
1898:
1.1.1.2 ! misho 1899: <A NAME="IDX139"></A>
! 1900: <DT><CODE>shell-transpose-words (M-C-t)</CODE>
! 1901: <DD><A NAME="IDX140"></A>
! 1902: Drag the word before point past the word after point,
! 1903: moving point past that word as well.
! 1904: If the insertion point is at the end of the line, this transposes
! 1905: the last two words on the line.
! 1906: Word boundaries are the same as <CODE>shell-forward-word</CODE> and
! 1907: <CODE>shell-backward-word</CODE>.
! 1908: <P>
! 1909:
! 1910: <A NAME="IDX141"></A>
1.1 misho 1911: <DT><CODE>unix-word-rubout (C-w)</CODE>
1.1.1.2 ! misho 1912: <DD><A NAME="IDX142"></A>
1.1 misho 1913: Kill the word behind point, using white space as a word boundary.
1914: The killed text is saved on the kill-ring.
1915: <P>
1916:
1.1.1.2 ! misho 1917: <A NAME="IDX143"></A>
1.1 misho 1918: <DT><CODE>unix-filename-rubout ()</CODE>
1.1.1.2 ! misho 1919: <DD><A NAME="IDX144"></A>
1.1 misho 1920: Kill the word behind point, using white space and the slash character
1921: as the word boundaries.
1922: The killed text is saved on the kill-ring.
1923: <P>
1924:
1.1.1.2 ! misho 1925: <A NAME="IDX145"></A>
1.1 misho 1926: <DT><CODE>delete-horizontal-space ()</CODE>
1.1.1.2 ! misho 1927: <DD><A NAME="IDX146"></A>
1.1 misho 1928: Delete all spaces and tabs around point. By default, this is unbound.
1929: <P>
1930:
1.1.1.2 ! misho 1931: <A NAME="IDX147"></A>
1.1 misho 1932: <DT><CODE>kill-region ()</CODE>
1.1.1.2 ! misho 1933: <DD><A NAME="IDX148"></A>
1.1 misho 1934: Kill the text in the current region.
1935: By default, this command is unbound.
1936: <P>
1937:
1.1.1.2 ! misho 1938: <A NAME="IDX149"></A>
1.1 misho 1939: <DT><CODE>copy-region-as-kill ()</CODE>
1.1.1.2 ! misho 1940: <DD><A NAME="IDX150"></A>
1.1 misho 1941: Copy the text in the region to the kill buffer, so it can be yanked
1942: right away. By default, this command is unbound.
1943: <P>
1944:
1.1.1.2 ! misho 1945: <A NAME="IDX151"></A>
1.1 misho 1946: <DT><CODE>copy-backward-word ()</CODE>
1.1.1.2 ! misho 1947: <DD><A NAME="IDX152"></A>
1.1 misho 1948: Copy the word before point to the kill buffer.
1949: The word boundaries are the same as <CODE>backward-word</CODE>.
1950: By default, this command is unbound.
1951: <P>
1952:
1.1.1.2 ! misho 1953: <A NAME="IDX153"></A>
1.1 misho 1954: <DT><CODE>copy-forward-word ()</CODE>
1.1.1.2 ! misho 1955: <DD><A NAME="IDX154"></A>
1.1 misho 1956: Copy the word following point to the kill buffer.
1957: The word boundaries are the same as <CODE>forward-word</CODE>.
1958: By default, this command is unbound.
1959: <P>
1960:
1.1.1.2 ! misho 1961: <A NAME="IDX155"></A>
1.1 misho 1962: <DT><CODE>yank (C-y)</CODE>
1.1.1.2 ! misho 1963: <DD><A NAME="IDX156"></A>
1.1 misho 1964: Yank the top of the kill ring into the buffer at point.
1965: <P>
1966:
1.1.1.2 ! misho 1967: <A NAME="IDX157"></A>
1.1 misho 1968: <DT><CODE>yank-pop (M-y)</CODE>
1.1.1.2 ! misho 1969: <DD><A NAME="IDX158"></A>
1.1 misho 1970: Rotate the kill-ring, and yank the new top. You can only do this if
1971: the prior command is <CODE>yank</CODE> or <CODE>yank-pop</CODE>.
1972: </DL>
1973: <P>
1974:
1975: <A NAME="Numeric Arguments"></A>
1976: <HR SIZE="6">
1977: <A NAME="SEC18"></A>
1978: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1979: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC17"> < </A>]</TD>
1980: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC19"> > </A>]</TD>
1981: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC19"> << </A>]</TD>
1982: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
1983: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> >> </A>]</TD>
1984: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
1985: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
1986: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
1987: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
1988: </TR></TABLE>
1989: <H3> 1.4.5 Specifying Numeric Arguments </H3>
1990: <!--docid::SEC18::-->
1991: <DL COMPACT>
1992:
1.1.1.2 ! misho 1993: <A NAME="IDX159"></A>
1.1 misho 1994: <DT><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, <small>...</small> <KBD>M--</KBD>)</CODE>
1.1.1.2 ! misho 1995: <DD><A NAME="IDX160"></A>
1.1 misho 1996: Add this digit to the argument already accumulating, or start a new
1997: argument. <KBD>M--</KBD> starts a negative argument.
1998: <P>
1999:
1.1.1.2 ! misho 2000: <A NAME="IDX161"></A>
1.1 misho 2001: <DT><CODE>universal-argument ()</CODE>
1.1.1.2 ! misho 2002: <DD><A NAME="IDX162"></A>
1.1 misho 2003: This is another way to specify an argument.
2004: If this command is followed by one or more digits, optionally with a
2005: leading minus sign, those digits define the argument.
2006: If the command is followed by digits, executing <CODE>universal-argument</CODE>
2007: again ends the numeric argument, but is otherwise ignored.
2008: As a special case, if this command is immediately followed by a
1.1.1.2 ! misho 2009: character that is neither a digit nor minus sign, the argument count
1.1 misho 2010: for the next command is multiplied by four.
2011: The argument count is initially one, so executing this function the
2012: first time makes the argument count four, a second time makes the
2013: argument count sixteen, and so on.
2014: By default, this is not bound to a key.
2015: </DL>
2016: <P>
2017:
2018: <A NAME="Commands For Completion"></A>
2019: <HR SIZE="6">
2020: <A NAME="SEC19"></A>
2021: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2022: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC18"> < </A>]</TD>
2023: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC20"> > </A>]</TD>
2024: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC20"> << </A>]</TD>
2025: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
2026: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> >> </A>]</TD>
2027: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2028: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2029: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2030: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2031: </TR></TABLE>
2032: <H3> 1.4.6 Letting Readline Type For You </H3>
2033: <!--docid::SEC19::-->
2034: <P>
2035:
2036: <DL COMPACT>
1.1.1.2 ! misho 2037: <A NAME="IDX163"></A>
1.1 misho 2038: <DT><CODE>complete (<KBD>TAB</KBD>)</CODE>
1.1.1.2 ! misho 2039: <DD><A NAME="IDX164"></A>
1.1 misho 2040: Attempt to perform completion on the text before point.
2041: The actual completion performed is application-specific.
2042: The default is filename completion.
2043: <P>
2044:
1.1.1.2 ! misho 2045: <A NAME="IDX165"></A>
1.1 misho 2046: <DT><CODE>possible-completions (M-?)</CODE>
1.1.1.2 ! misho 2047: <DD><A NAME="IDX166"></A>
1.1 misho 2048: List the possible completions of the text before point.
2049: When displaying completions, Readline sets the number of columns used
2050: for display to the value of <CODE>completion-display-width</CODE>, the value of
2051: the environment variable <CODE>COLUMNS</CODE>, or the screen width, in that order.
2052: <P>
2053:
1.1.1.2 ! misho 2054: <A NAME="IDX167"></A>
1.1 misho 2055: <DT><CODE>insert-completions (M-*)</CODE>
1.1.1.2 ! misho 2056: <DD><A NAME="IDX168"></A>
1.1 misho 2057: Insert all completions of the text before point that would have
2058: been generated by <CODE>possible-completions</CODE>.
2059: <P>
2060:
1.1.1.2 ! misho 2061: <A NAME="IDX169"></A>
1.1 misho 2062: <DT><CODE>menu-complete ()</CODE>
1.1.1.2 ! misho 2063: <DD><A NAME="IDX170"></A>
1.1 misho 2064: Similar to <CODE>complete</CODE>, but replaces the word to be completed
2065: with a single match from the list of possible completions.
2066: Repeated execution of <CODE>menu-complete</CODE> steps through the list
2067: of possible completions, inserting each match in turn.
2068: At the end of the list of completions, the bell is rung
2069: (subject to the setting of <CODE>bell-style</CODE>)
2070: and the original text is restored.
2071: An argument of <VAR>n</VAR> moves <VAR>n</VAR> positions forward in the list
2072: of matches; a negative argument may be used to move backward
2073: through the list.
2074: This command is intended to be bound to <KBD>TAB</KBD>, but is unbound
2075: by default.
2076: <P>
2077:
1.1.1.2 ! misho 2078: <A NAME="IDX171"></A>
1.1 misho 2079: <DT><CODE>menu-complete-backward ()</CODE>
1.1.1.2 ! misho 2080: <DD><A NAME="IDX172"></A>
1.1 misho 2081: Identical to <CODE>menu-complete</CODE>, but moves backward through the list
2082: of possible completions, as if <CODE>menu-complete</CODE> had been given a
2083: negative argument.
2084: <P>
2085:
1.1.1.2 ! misho 2086: <A NAME="IDX173"></A>
1.1 misho 2087: <DT><CODE>delete-char-or-list ()</CODE>
1.1.1.2 ! misho 2088: <DD><A NAME="IDX174"></A>
1.1 misho 2089: Deletes the character under the cursor if not at the beginning or
2090: end of the line (like <CODE>delete-char</CODE>).
2091: If at the end of the line, behaves identically to
2092: <CODE>possible-completions</CODE>.
2093: This command is unbound by default.
2094: <P>
2095:
2096: </DL>
2097: <P>
2098:
2099: <A NAME="Keyboard Macros"></A>
2100: <HR SIZE="6">
2101: <A NAME="SEC20"></A>
2102: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2103: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC19"> < </A>]</TD>
2104: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC21"> > </A>]</TD>
2105: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC21"> << </A>]</TD>
2106: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
2107: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> >> </A>]</TD>
2108: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2109: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2110: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2111: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2112: </TR></TABLE>
2113: <H3> 1.4.7 Keyboard Macros </H3>
2114: <!--docid::SEC20::-->
2115: <DL COMPACT>
2116:
1.1.1.2 ! misho 2117: <A NAME="IDX175"></A>
1.1 misho 2118: <DT><CODE>start-kbd-macro (C-x ()</CODE>
1.1.1.2 ! misho 2119: <DD><A NAME="IDX176"></A>
1.1 misho 2120: Begin saving the characters typed into the current keyboard macro.
2121: <P>
2122:
1.1.1.2 ! misho 2123: <A NAME="IDX177"></A>
1.1 misho 2124: <DT><CODE>end-kbd-macro (C-x ))</CODE>
1.1.1.2 ! misho 2125: <DD><A NAME="IDX178"></A>
1.1 misho 2126: Stop saving the characters typed into the current keyboard macro
2127: and save the definition.
2128: <P>
2129:
1.1.1.2 ! misho 2130: <A NAME="IDX179"></A>
1.1 misho 2131: <DT><CODE>call-last-kbd-macro (C-x e)</CODE>
1.1.1.2 ! misho 2132: <DD><A NAME="IDX180"></A>
1.1 misho 2133: Re-execute the last keyboard macro defined, by making the characters
2134: in the macro appear as if typed at the keyboard.
2135: <P>
2136:
1.1.1.2 ! misho 2137: <A NAME="IDX181"></A>
1.1 misho 2138: <DT><CODE>print-last-kbd-macro ()</CODE>
1.1.1.2 ! misho 2139: <DD><A NAME="IDX182"></A>
1.1 misho 2140: Print the last keboard macro defined in a format suitable for the
2141: <VAR>inputrc</VAR> file.
2142: <P>
2143:
2144: </DL>
2145: <P>
2146:
2147: <A NAME="Miscellaneous Commands"></A>
2148: <HR SIZE="6">
2149: <A NAME="SEC21"></A>
2150: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2151: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC20"> < </A>]</TD>
2152: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> > </A>]</TD>
2153: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> << </A>]</TD>
2154: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD>
2155: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> >> </A>]</TD>
2156: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2157: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2158: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2159: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2160: </TR></TABLE>
2161: <H3> 1.4.8 Some Miscellaneous Commands </H3>
2162: <!--docid::SEC21::-->
2163: <DL COMPACT>
2164:
1.1.1.2 ! misho 2165: <A NAME="IDX183"></A>
1.1 misho 2166: <DT><CODE>re-read-init-file (C-x C-r)</CODE>
1.1.1.2 ! misho 2167: <DD><A NAME="IDX184"></A>
1.1 misho 2168: Read in the contents of the <VAR>inputrc</VAR> file, and incorporate
2169: any bindings or variable assignments found there.
2170: <P>
2171:
1.1.1.2 ! misho 2172: <A NAME="IDX185"></A>
1.1 misho 2173: <DT><CODE>abort (C-g)</CODE>
1.1.1.2 ! misho 2174: <DD><A NAME="IDX186"></A>
1.1 misho 2175: Abort the current editing command and
2176: ring the terminal's bell (subject to the setting of
2177: <CODE>bell-style</CODE>).
2178: <P>
2179:
1.1.1.2 ! misho 2180: <A NAME="IDX187"></A>
! 2181: <DT><CODE>do-lowercase-version (M-A, M-B, M-<VAR>x</VAR>, <small>...</small>)</CODE>
! 2182: <DD><A NAME="IDX188"></A>
! 2183: If the metafied character <VAR>x</VAR> is upper case, run the command
! 2184: that is bound to the corresponding metafied lower case character.
! 2185: The behavior is undefined if <VAR>x</VAR> is already lower case.
1.1 misho 2186: <P>
2187:
1.1.1.2 ! misho 2188: <A NAME="IDX189"></A>
1.1 misho 2189: <DT><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE>
1.1.1.2 ! misho 2190: <DD><A NAME="IDX190"></A>
1.1 misho 2191: Metafy the next character typed. This is for keyboards
2192: without a meta key. Typing <SAMP>`<KBD>ESC</KBD> f'</SAMP> is equivalent to typing
2193: <KBD>M-f</KBD>.
2194: <P>
2195:
1.1.1.2 ! misho 2196: <A NAME="IDX191"></A>
1.1 misho 2197: <DT><CODE>undo (C-_ or C-x C-u)</CODE>
1.1.1.2 ! misho 2198: <DD><A NAME="IDX192"></A>
1.1 misho 2199: Incremental undo, separately remembered for each line.
2200: <P>
2201:
1.1.1.2 ! misho 2202: <A NAME="IDX193"></A>
1.1 misho 2203: <DT><CODE>revert-line (M-r)</CODE>
1.1.1.2 ! misho 2204: <DD><A NAME="IDX194"></A>
1.1 misho 2205: Undo all changes made to this line. This is like executing the <CODE>undo</CODE>
2206: command enough times to get back to the beginning.
2207: <P>
2208:
1.1.1.2 ! misho 2209: <A NAME="IDX195"></A>
1.1 misho 2210: <DT><CODE>tilde-expand (M-~)</CODE>
1.1.1.2 ! misho 2211: <DD><A NAME="IDX196"></A>
1.1 misho 2212: Perform tilde expansion on the current word.
2213: <P>
2214:
1.1.1.2 ! misho 2215: <A NAME="IDX197"></A>
1.1 misho 2216: <DT><CODE>set-mark (C-@)</CODE>
1.1.1.2 ! misho 2217: <DD><A NAME="IDX198"></A>
1.1 misho 2218: Set the mark to the point. If a
2219: numeric argument is supplied, the mark is set to that position.
2220: <P>
2221:
1.1.1.2 ! misho 2222: <A NAME="IDX199"></A>
1.1 misho 2223: <DT><CODE>exchange-point-and-mark (C-x C-x)</CODE>
1.1.1.2 ! misho 2224: <DD><A NAME="IDX200"></A>
1.1 misho 2225: Swap the point with the mark. The current cursor position is set to
2226: the saved position, and the old cursor position is saved as the mark.
2227: <P>
2228:
1.1.1.2 ! misho 2229: <A NAME="IDX201"></A>
1.1 misho 2230: <DT><CODE>character-search (C-])</CODE>
1.1.1.2 ! misho 2231: <DD><A NAME="IDX202"></A>
1.1 misho 2232: A character is read and point is moved to the next occurrence of that
2233: character. A negative count searches for previous occurrences.
2234: <P>
2235:
1.1.1.2 ! misho 2236: <A NAME="IDX203"></A>
1.1 misho 2237: <DT><CODE>character-search-backward (M-C-])</CODE>
1.1.1.2 ! misho 2238: <DD><A NAME="IDX204"></A>
1.1 misho 2239: A character is read and point is moved to the previous occurrence
2240: of that character. A negative count searches for subsequent
2241: occurrences.
2242: <P>
2243:
1.1.1.2 ! misho 2244: <A NAME="IDX205"></A>
1.1 misho 2245: <DT><CODE>skip-csi-sequence ()</CODE>
1.1.1.2 ! misho 2246: <DD><A NAME="IDX206"></A>
1.1 misho 2247: Read enough characters to consume a multi-key sequence such as those
2248: defined for keys like Home and End. Such sequences begin with a
2249: Control Sequence Indicator (CSI), usually ESC-[. If this sequence is
2250: bound to "\e[", keys producing such sequences will have no effect
2251: unless explicitly bound to a readline command, instead of inserting
2252: stray characters into the editing buffer. This is unbound by default,
2253: but usually bound to ESC-[.
2254: <P>
2255:
1.1.1.2 ! misho 2256: <A NAME="IDX207"></A>
1.1 misho 2257: <DT><CODE>insert-comment (M-#)</CODE>
1.1.1.2 ! misho 2258: <DD><A NAME="IDX208"></A>
1.1 misho 2259: Without a numeric argument, the value of the <CODE>comment-begin</CODE>
2260: variable is inserted at the beginning of the current line.
2261: If a numeric argument is supplied, this command acts as a toggle: if
2262: the characters at the beginning of the line do not match the value
2263: of <CODE>comment-begin</CODE>, the value is inserted, otherwise
2264: the characters in <CODE>comment-begin</CODE> are deleted from the beginning of
2265: the line.
2266: In either case, the line is accepted as if a newline had been typed.
2267: <P>
2268:
1.1.1.2 ! misho 2269: <A NAME="IDX209"></A>
1.1 misho 2270: <DT><CODE>dump-functions ()</CODE>
1.1.1.2 ! misho 2271: <DD><A NAME="IDX210"></A>
1.1 misho 2272: Print all of the functions and their key bindings to the
2273: Readline output stream. If a numeric argument is supplied,
2274: the output is formatted in such a way that it can be made part
2275: of an <VAR>inputrc</VAR> file. This command is unbound by default.
2276: <P>
2277:
1.1.1.2 ! misho 2278: <A NAME="IDX211"></A>
1.1 misho 2279: <DT><CODE>dump-variables ()</CODE>
1.1.1.2 ! misho 2280: <DD><A NAME="IDX212"></A>
1.1 misho 2281: Print all of the settable variables and their values to the
2282: Readline output stream. If a numeric argument is supplied,
2283: the output is formatted in such a way that it can be made part
2284: of an <VAR>inputrc</VAR> file. This command is unbound by default.
2285: <P>
2286:
1.1.1.2 ! misho 2287: <A NAME="IDX213"></A>
1.1 misho 2288: <DT><CODE>dump-macros ()</CODE>
1.1.1.2 ! misho 2289: <DD><A NAME="IDX214"></A>
1.1 misho 2290: Print all of the Readline key sequences bound to macros and the
2291: strings they output. If a numeric argument is supplied,
2292: the output is formatted in such a way that it can be made part
2293: of an <VAR>inputrc</VAR> file. This command is unbound by default.
2294: <P>
2295:
1.1.1.2 ! misho 2296: <A NAME="IDX215"></A>
1.1 misho 2297: <DT><CODE>emacs-editing-mode (C-e)</CODE>
1.1.1.2 ! misho 2298: <DD><A NAME="IDX216"></A>
1.1 misho 2299: When in <CODE>vi</CODE> command mode, this causes a switch to <CODE>emacs</CODE>
2300: editing mode.
2301: <P>
2302:
1.1.1.2 ! misho 2303: <A NAME="IDX217"></A>
1.1 misho 2304: <DT><CODE>vi-editing-mode (M-C-j)</CODE>
1.1.1.2 ! misho 2305: <DD><A NAME="IDX218"></A>
1.1 misho 2306: When in <CODE>emacs</CODE> editing mode, this causes a switch to <CODE>vi</CODE>
2307: editing mode.
2308: <P>
2309:
2310: </DL>
2311: <P>
2312:
2313: <A NAME="Readline vi Mode"></A>
2314: <HR SIZE="6">
2315: <A NAME="SEC22"></A>
2316: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2317: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC21"> < </A>]</TD>
2318: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> > </A>]</TD>
2319: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
2320: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC1"> Up </A>]</TD>
2321: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> >> </A>]</TD>
2322: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2323: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2324: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2325: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2326: </TR></TABLE>
2327: <H2> 1.5 Readline vi Mode </H2>
2328: <!--docid::SEC22::-->
2329: <P>
2330:
2331: While the Readline library does not have a full set of <CODE>vi</CODE>
2332: editing functions, it does contain enough to allow simple editing
2333: of the line. The Readline <CODE>vi</CODE> mode behaves as specified in
2334: the POSIX standard.
2335: </P><P>
2336:
2337: In order to switch interactively between <CODE>emacs</CODE> and <CODE>vi</CODE>
2338: editing modes, use the command <KBD>M-C-j</KBD> (bound to emacs-editing-mode
2339: when in <CODE>vi</CODE> mode and to vi-editing-mode in <CODE>emacs</CODE> mode).
2340: The Readline default is <CODE>emacs</CODE> mode.
2341: </P><P>
2342:
2343: When you enter a line in <CODE>vi</CODE> mode, you are already placed in
2344: `insertion' mode, as if you had typed an <SAMP>`i'</SAMP>. Pressing <KBD>ESC</KBD>
2345: switches you into `command' mode, where you can edit the text of the
2346: line with the standard <CODE>vi</CODE> movement keys, move to previous
2347: history lines with <SAMP>`k'</SAMP> and subsequent lines with <SAMP>`j'</SAMP>, and
2348: so forth.
2349: </P><P>
2350:
2351: This document describes the GNU Readline Library, a utility for aiding
2352: in the consistency of user interface across discrete programs that need
2353: to provide a command line interface.
2354: </P><P>
2355:
1.1.1.2 ! misho 2356: Copyright (C) 1988--2020 Free Software Foundation, Inc.
1.1 misho 2357: </P><P>
2358:
2359: Permission is granted to make and distribute verbatim copies of
2360: this manual provided the copyright notice and this permission notice
2361: pare preserved on all copies.
2362: </P><P>
2363:
2364: Permission is granted to copy and distribute modified versions of this
2365: manual under the conditions for verbatim copying, provided that the entire
2366: resulting derived work is distributed under the terms of a permission
2367: notice identical to this one.
2368: </P><P>
2369:
2370: Permission is granted to copy and distribute translations of this manual
2371: into another language, under the above conditions for modified versions,
2372: except that this permission notice may be stated in a translation approved
2373: by the Foundation.
2374: </P><P>
2375:
2376: <A NAME="Programming with GNU Readline"></A>
2377: <HR SIZE="6">
2378: <A NAME="SEC23"></A>
2379: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2380: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> < </A>]</TD>
2381: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC24"> > </A>]</TD>
2382: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
2383: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> Up </A>]</TD>
2384: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> >> </A>]</TD>
2385: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2386: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2387: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2388: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2389: </TR></TABLE>
2390: <H1> 2. Programming with GNU Readline </H1>
2391: <!--docid::SEC23::-->
2392: <P>
2393:
2394: This chapter describes the interface between the GNU Readline Library and
2395: other programs. If you are a programmer, and you wish to include the
2396: features found in GNU Readline
2397: such as completion, line editing, and interactive history manipulation
2398: in your own programs, this section is for you.
2399: </P><P>
2400:
2401: <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
2402: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC24">2.1 Basic Behavior</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Using the default behavior of Readline.</TD></TR>
2403: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC25">2.2 Custom Functions</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Adding your own functions to Readline.</TD></TR>
2404: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Variables accessible to custom
2405: functions.</TD></TR>
2406: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC29">2.4 Readline Convenience Functions</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Functions which Readline supplies to
2407: aid in writing your own custom
2408: functions.</TD></TR>
2409: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">How Readline behaves when it receives signals.</TD></TR>
2410: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC45">2.6 Custom Completers</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Supplanting or supplementing Readline's
2411: completion functions.</TD></TR>
2412: </TABLE></BLOCKQUOTE>
2413: <P>
2414:
2415: <A NAME="Basic Behavior"></A>
2416: <HR SIZE="6">
2417: <A NAME="SEC24"></A>
2418: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2419: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> < </A>]</TD>
2420: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC25"> > </A>]</TD>
2421: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
2422: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
2423: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> >> </A>]</TD>
2424: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2425: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2426: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2427: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2428: </TR></TABLE>
2429: <H2> 2.1 Basic Behavior </H2>
2430: <!--docid::SEC24::-->
2431: <P>
2432:
2433: Many programs provide a command line interface, such as <CODE>mail</CODE>,
2434: <CODE>ftp</CODE>, and <CODE>sh</CODE>. For such programs, the default behaviour of
2435: Readline is sufficient. This section describes how to use Readline in
2436: the simplest way possible, perhaps to replace calls in your code to
2437: <CODE>gets()</CODE> or <CODE>fgets()</CODE>.
2438: </P><P>
2439:
1.1.1.2 ! misho 2440: <A NAME="IDX219"></A>
! 2441: <A NAME="IDX220"></A>
1.1 misho 2442: </P><P>
2443:
2444: The function <CODE>readline()</CODE> prints a prompt <VAR>prompt</VAR>
2445: and then reads and returns a single line of text from the user.
2446: If <VAR>prompt</VAR> is <CODE>NULL</CODE> or the empty string, no prompt is displayed.
2447: The line <CODE>readline</CODE> returns is allocated with <CODE>malloc()</CODE>;
2448: the caller should <CODE>free()</CODE> the line when it has finished with it.
2449: The declaration for <CODE>readline</CODE> in ANSI C is
2450: </P><P>
2451:
2452: <TABLE><tr><td> </td><td class=example><pre><CODE>char *readline (const char *<VAR>prompt</VAR>);</CODE>
2453: </pre></td></tr></table></P><P>
2454:
2455: So, one might say
2456: <TABLE><tr><td> </td><td class=example><pre><CODE>char *line = readline ("Enter a line: ");</CODE>
2457: </pre></td></tr></table>in order to read a line of text from the user.
2458: The line returned has the final newline removed, so only the
2459: text remains.
2460: </P><P>
2461:
2462: If <CODE>readline</CODE> encounters an <CODE>EOF</CODE> while reading the line, and the
2463: line is empty at that point, then <CODE>(char *)NULL</CODE> is returned.
2464: Otherwise, the line is ended just as if a newline had been typed.
2465: </P><P>
2466:
1.1.1.2 ! misho 2467: Readline performs some expansion on the <VAR>prompt</VAR> before it is
! 2468: displayed on the screen. See the description of <CODE>rl_expand_prompt</CODE>
! 2469: (see section <A HREF="readline.html#SEC35">2.4.6 Redisplay</A>) for additional details, especially if <VAR>prompt</VAR>
! 2470: will contain characters that do not consume physical screen space when
! 2471: displayed.
! 2472: </P><P>
! 2473:
1.1 misho 2474: If you want the user to be able to get at the line later, (with
2475: <KBD>C-p</KBD> for example), you must call <CODE>add_history()</CODE> to save the
2476: line away in a <EM>history</EM> list of such lines.
2477: </P><P>
2478:
2479: <TABLE><tr><td> </td><td class=example><pre><CODE>add_history (line)</CODE>;
2480: </pre></td></tr></table></P><P>
2481:
2482: For full details on the GNU History Library, see the associated manual.
2483: </P><P>
2484:
2485: It is preferable to avoid saving empty lines on the history list, since
2486: users rarely have a burning need to reuse a blank line. Here is
2487: a function which usefully replaces the standard <CODE>gets()</CODE> library
2488: function, and has the advantage of no static buffer to overflow:
2489: </P><P>
2490:
2491: <TABLE><tr><td> </td><td class=example><pre>/* A static variable for holding the line. */
2492: static char *line_read = (char *)NULL;
2493:
2494: /* Read a string, and return a pointer to it.
2495: Returns NULL on EOF. */
2496: char *
2497: rl_gets ()
2498: {
2499: /* If the buffer has already been allocated,
2500: return the memory to the free pool. */
2501: if (line_read)
2502: {
2503: free (line_read);
2504: line_read = (char *)NULL;
2505: }
2506:
2507: /* Get a line from the user. */
2508: line_read = readline ("");
2509:
2510: /* If the line has any text in it,
2511: save it on the history. */
2512: if (line_read && *line_read)
2513: add_history (line_read);
2514:
2515: return (line_read);
2516: }
2517: </pre></td></tr></table></P><P>
2518:
2519: This function gives the user the default behaviour of <KBD>TAB</KBD>
2520: completion: completion on file names. If you do not want Readline to
2521: complete on filenames, you can change the binding of the <KBD>TAB</KBD> key
2522: with <CODE>rl_bind_key()</CODE>.
2523: </P><P>
2524:
2525: <TABLE><tr><td> </td><td class=example><pre><CODE>int rl_bind_key (int <VAR>key</VAR>, rl_command_func_t *<VAR>function</VAR>);</CODE>
2526: </pre></td></tr></table></P><P>
2527:
2528: <CODE>rl_bind_key()</CODE> takes two arguments: <VAR>key</VAR> is the character that
2529: you want to bind, and <VAR>function</VAR> is the address of the function to
2530: call when <VAR>key</VAR> is pressed. Binding <KBD>TAB</KBD> to <CODE>rl_insert()</CODE>
2531: makes <KBD>TAB</KBD> insert itself.
2532: <CODE>rl_bind_key()</CODE> returns non-zero if <VAR>key</VAR> is not a valid
2533: ASCII character code (between 0 and 255).
2534: </P><P>
2535:
2536: Thus, to disable the default <KBD>TAB</KBD> behavior, the following suffices:
2537: <TABLE><tr><td> </td><td class=example><pre><CODE>rl_bind_key ('\t', rl_insert);</CODE>
2538: </pre></td></tr></table></P><P>
2539:
2540: This code should be executed once at the start of your program; you
2541: might write a function called <CODE>initialize_readline()</CODE> which
2542: performs this and other desired initializations, such as installing
2543: custom completers (see section <A HREF="readline.html#SEC45">2.6 Custom Completers</A>).
2544: </P><P>
2545:
2546: <A NAME="Custom Functions"></A>
2547: <HR SIZE="6">
2548: <A NAME="SEC25"></A>
2549: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2550: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC24"> < </A>]</TD>
2551: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC26"> > </A>]</TD>
2552: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> << </A>]</TD>
2553: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
2554: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> >> </A>]</TD>
2555: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2556: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2557: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2558: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2559: </TR></TABLE>
2560: <H2> 2.2 Custom Functions </H2>
2561: <!--docid::SEC25::-->
2562: <P>
2563:
2564: Readline provides many functions for manipulating the text of
2565: the line, but it isn't possible to anticipate the needs of all
2566: programs. This section describes the various functions and variables
2567: defined within the Readline library which allow a user program to add
2568: customized functionality to Readline.
2569: </P><P>
2570:
2571: Before declaring any functions that customize Readline's behavior, or
2572: using any functionality Readline provides in other code, an
2573: application writer should include the file <CODE><readline/readline.h></CODE>
2574: in any file that uses Readline's features. Since some of the definitions
2575: in <CODE>readline.h</CODE> use the <CODE>stdio</CODE> library, the file
2576: <CODE><stdio.h></CODE> should be included before <CODE>readline.h</CODE>.
2577: </P><P>
2578:
2579: <CODE>readline.h</CODE> defines a C preprocessor variable that should
2580: be treated as an integer, <CODE>RL_READLINE_VERSION</CODE>, which may
2581: be used to conditionally compile application code depending on
2582: the installed Readline version. The value is a hexadecimal
2583: encoding of the major and minor version numbers of the library,
2584: of the form 0x<VAR>MMmm</VAR>. <VAR>MM</VAR> is the two-digit major
2585: version number; <VAR>mm</VAR> is the two-digit minor version number.
2586: For Readline 4.2, for example, the value of
2587: <CODE>RL_READLINE_VERSION</CODE> would be <CODE>0x0402</CODE>.
2588: </P><P>
2589:
2590: <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
2591: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC26">2.2.1 Readline Typedefs</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">C declarations to make code readable.</TD></TR>
2592: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC27">2.2.2 Writing a New Function</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Variables and calling conventions.</TD></TR>
2593: </TABLE></BLOCKQUOTE>
2594: <P>
2595:
2596: <A NAME="Readline Typedefs"></A>
2597: <HR SIZE="6">
2598: <A NAME="SEC26"></A>
2599: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2600: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC25"> < </A>]</TD>
2601: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC27"> > </A>]</TD>
2602: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> << </A>]</TD>
2603: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC25"> Up </A>]</TD>
2604: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> >> </A>]</TD>
2605: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2606: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2607: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2608: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2609: </TR></TABLE>
2610: <H3> 2.2.1 Readline Typedefs </H3>
2611: <!--docid::SEC26::-->
2612: <P>
2613:
2614: For readability, we declare a number of new object types, all pointers
2615: to functions.
2616: </P><P>
2617:
2618: The reason for declaring these new types is to make it easier to write
2619: code describing pointers to C functions with appropriately prototyped
2620: arguments and return values.
2621: </P><P>
2622:
2623: For instance, say we want to declare a variable <VAR>func</VAR> as a pointer
2624: to a function which takes two <CODE>int</CODE> arguments and returns an
2625: <CODE>int</CODE> (this is the type of all of the Readline bindable functions).
2626: Instead of the classic C declaration
2627: </P><P>
2628:
2629: <CODE>int (*func)();</CODE>
2630: </P><P>
2631:
2632: or the ANSI-C style declaration
2633: </P><P>
2634:
2635: <CODE>int (*func)(int, int);</CODE>
2636: </P><P>
2637:
2638: we may write
2639: </P><P>
2640:
2641: <CODE>rl_command_func_t *func;</CODE>
2642: </P><P>
2643:
2644: The full list of function pointer types available is
2645: </P><P>
2646:
2647: <DL COMPACT>
2648: <DT><CODE>typedef int rl_command_func_t (int, int);</CODE>
2649: <DD><P>
2650:
2651: <DT><CODE>typedef char *rl_compentry_func_t (const char *, int);</CODE>
2652: <DD><P>
2653:
2654: <DT><CODE>typedef char **rl_completion_func_t (const char *, int, int);</CODE>
2655: <DD><P>
2656:
2657: <DT><CODE>typedef char *rl_quote_func_t (char *, int, char *);</CODE>
2658: <DD><P>
2659:
2660: <DT><CODE>typedef char *rl_dequote_func_t (char *, int);</CODE>
2661: <DD><P>
2662:
2663: <DT><CODE>typedef int rl_compignore_func_t (char **);</CODE>
2664: <DD><P>
2665:
2666: <DT><CODE>typedef void rl_compdisp_func_t (char **, int, int);</CODE>
2667: <DD><P>
2668:
2669: <DT><CODE>typedef int rl_hook_func_t (void);</CODE>
2670: <DD><P>
2671:
2672: <DT><CODE>typedef int rl_getc_func_t (FILE *);</CODE>
2673: <DD><P>
2674:
2675: <DT><CODE>typedef int rl_linebuf_func_t (char *, int);</CODE>
2676: <DD><P>
2677:
2678: <DT><CODE>typedef int rl_intfunc_t (int);</CODE>
2679: <DD><DT><CODE>#define rl_ivoidfunc_t rl_hook_func_t</CODE>
2680: <DD><DT><CODE>typedef int rl_icpfunc_t (char *);</CODE>
2681: <DD><DT><CODE>typedef int rl_icppfunc_t (char **);</CODE>
2682: <DD><P>
2683:
2684: <DT><CODE>typedef void rl_voidfunc_t (void);</CODE>
2685: <DD><DT><CODE>typedef void rl_vintfunc_t (int);</CODE>
2686: <DD><DT><CODE>typedef void rl_vcpfunc_t (char *);</CODE>
2687: <DD><DT><CODE>typedef void rl_vcppfunc_t (char **);</CODE>
2688: <DD><P>
2689:
2690: </DL>
2691: <P>
2692:
2693: <A NAME="Function Writing"></A>
2694: <HR SIZE="6">
2695: <A NAME="SEC27"></A>
2696: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2697: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC26"> < </A>]</TD>
2698: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> > </A>]</TD>
2699: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> << </A>]</TD>
2700: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC25"> Up </A>]</TD>
2701: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> >> </A>]</TD>
2702: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2703: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2704: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2705: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2706: </TR></TABLE>
2707: <H3> 2.2.2 Writing a New Function </H3>
2708: <!--docid::SEC27::-->
2709: <P>
2710:
2711: In order to write new functions for Readline, you need to know the
2712: calling conventions for keyboard-invoked functions, and the names of the
2713: variables that describe the current state of the line read so far.
2714: </P><P>
2715:
2716: The calling sequence for a command <CODE>foo</CODE> looks like
2717: </P><P>
2718:
2719: <TABLE><tr><td> </td><td class=example><pre><CODE>int foo (int count, int key)</CODE>
2720: </pre></td></tr></table></P><P>
2721:
2722: where <VAR>count</VAR> is the numeric argument (or 1 if defaulted) and
2723: <VAR>key</VAR> is the key that invoked this function.
2724: </P><P>
2725:
2726: It is completely up to the function as to what should be done with the
2727: numeric argument. Some functions use it as a repeat count, some
2728: as a flag, and others to choose alternate behavior (refreshing the current
2729: line as opposed to refreshing the screen, for example). Some choose to
2730: ignore it. In general, if a
2731: function uses the numeric argument as a repeat count, it should be able
2732: to do something useful with both negative and positive arguments.
2733: At the very least, it should be aware that it can be passed a
2734: negative argument.
2735: </P><P>
2736:
2737: A command function should return 0 if its action completes successfully,
1.1.1.2 ! misho 2738: and a value greater than zero if some error occurs.
1.1 misho 2739: This is the convention obeyed by all of the builtin Readline bindable
2740: command functions.
2741: </P><P>
2742:
2743: <A NAME="Readline Variables"></A>
2744: <HR SIZE="6">
2745: <A NAME="SEC28"></A>
2746: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2747: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC27"> < </A>]</TD>
2748: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> > </A>]</TD>
2749: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> << </A>]</TD>
2750: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
2751: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> >> </A>]</TD>
2752: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
2753: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
2754: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
2755: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
2756: </TR></TABLE>
2757: <H2> 2.3 Readline Variables </H2>
2758: <!--docid::SEC28::-->
2759: <P>
2760:
2761: These variables are available to function writers.
2762: </P><P>
2763:
1.1.1.2 ! misho 2764: <A NAME="IDX221"></A>
1.1 misho 2765: <DL>
2766: <DT><U>Variable:</U> char * <B>rl_line_buffer</B>
2767: <DD>This is the line gathered so far. You are welcome to modify the
2768: contents of the line, but see <A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A>. The
2769: function <CODE>rl_extend_line_buffer</CODE> is available to increase
2770: the memory allocated to <CODE>rl_line_buffer</CODE>.
2771: </DL>
2772: </P><P>
2773:
1.1.1.2 ! misho 2774: <A NAME="IDX222"></A>
1.1 misho 2775: <DL>
2776: <DT><U>Variable:</U> int <B>rl_point</B>
2777: <DD>The offset of the current cursor position in <CODE>rl_line_buffer</CODE>
2778: (the <EM>point</EM>).
2779: </DL>
2780: </P><P>
2781:
1.1.1.2 ! misho 2782: <A NAME="IDX223"></A>
1.1 misho 2783: <DL>
2784: <DT><U>Variable:</U> int <B>rl_end</B>
2785: <DD>The number of characters present in <CODE>rl_line_buffer</CODE>. When
2786: <CODE>rl_point</CODE> is at the end of the line, <CODE>rl_point</CODE> and
2787: <CODE>rl_end</CODE> are equal.
2788: </DL>
2789: </P><P>
2790:
1.1.1.2 ! misho 2791: <A NAME="IDX224"></A>
1.1 misho 2792: <DL>
2793: <DT><U>Variable:</U> int <B>rl_mark</B>
2794: <DD>The <VAR>mark</VAR> (saved position) in the current line. If set, the mark
2795: and point define a <EM>region</EM>.
2796: </DL>
2797: </P><P>
2798:
1.1.1.2 ! misho 2799: <A NAME="IDX225"></A>
1.1 misho 2800: <DL>
2801: <DT><U>Variable:</U> int <B>rl_done</B>
2802: <DD>Setting this to a non-zero value causes Readline to return the current
2803: line immediately.
2804: </DL>
2805: </P><P>
2806:
1.1.1.2 ! misho 2807: <A NAME="IDX226"></A>
1.1 misho 2808: <DL>
2809: <DT><U>Variable:</U> int <B>rl_num_chars_to_read</B>
2810: <DD>Setting this to a positive value before calling <CODE>readline()</CODE> causes
2811: Readline to return after accepting that many characters, rather
2812: than reading up to a character bound to <CODE>accept-line</CODE>.
2813: </DL>
2814: </P><P>
2815:
1.1.1.2 ! misho 2816: <A NAME="IDX227"></A>
1.1 misho 2817: <DL>
2818: <DT><U>Variable:</U> int <B>rl_pending_input</B>
2819: <DD>Setting this to a value makes it the next keystroke read. This is a
2820: way to stuff a single character into the input stream.
2821: </DL>
2822: </P><P>
2823:
1.1.1.2 ! misho 2824: <A NAME="IDX228"></A>
1.1 misho 2825: <DL>
2826: <DT><U>Variable:</U> int <B>rl_dispatching</B>
2827: <DD>Set to a non-zero value if a function is being called from a key binding;
2828: zero otherwise. Application functions can test this to discover whether
2829: they were called directly or by Readline's dispatching mechanism.
2830: </DL>
2831: </P><P>
2832:
1.1.1.2 ! misho 2833: <A NAME="IDX229"></A>
1.1 misho 2834: <DL>
2835: <DT><U>Variable:</U> int <B>rl_erase_empty_line</B>
2836: <DD>Setting this to a non-zero value causes Readline to completely erase
2837: the current line, including any prompt, any time a newline is typed as
2838: the only character on an otherwise-empty line. The cursor is moved to
2839: the beginning of the newly-blank line.
2840: </DL>
2841: </P><P>
2842:
1.1.1.2 ! misho 2843: <A NAME="IDX230"></A>
1.1 misho 2844: <DL>
2845: <DT><U>Variable:</U> char * <B>rl_prompt</B>
2846: <DD>The prompt Readline uses. This is set from the argument to
2847: <CODE>readline()</CODE>, and should not be assigned to directly.
2848: The <CODE>rl_set_prompt()</CODE> function (see section <A HREF="readline.html#SEC35">2.4.6 Redisplay</A>) may
2849: be used to modify the prompt string after calling <CODE>readline()</CODE>.
2850: </DL>
2851: </P><P>
2852:
1.1.1.2 ! misho 2853: <A NAME="IDX231"></A>
1.1 misho 2854: <DL>
2855: <DT><U>Variable:</U> char * <B>rl_display_prompt</B>
2856: <DD>The string displayed as the prompt. This is usually identical to
2857: <VAR>rl_prompt</VAR>, but may be changed temporarily by functions that
2858: use the prompt string as a message area, such as incremental search.
2859: </DL>
2860: </P><P>
2861:
1.1.1.2 ! misho 2862: <A NAME="IDX232"></A>
1.1 misho 2863: <DL>
2864: <DT><U>Variable:</U> int <B>rl_already_prompted</B>
2865: <DD>If an application wishes to display the prompt itself, rather than have
2866: Readline do it the first time <CODE>readline()</CODE> is called, it should set
2867: this variable to a non-zero value after displaying the prompt.
2868: The prompt must also be passed as the argument to <CODE>readline()</CODE> so
2869: the redisplay functions can update the display properly.
2870: The calling application is responsible for managing the value; Readline
2871: never sets it.
2872: </DL>
2873: </P><P>
2874:
1.1.1.2 ! misho 2875: <A NAME="IDX233"></A>
1.1 misho 2876: <DL>
2877: <DT><U>Variable:</U> const char * <B>rl_library_version</B>
2878: <DD>The version number of this revision of the library.
2879: </DL>
2880: </P><P>
2881:
1.1.1.2 ! misho 2882: <A NAME="IDX234"></A>
1.1 misho 2883: <DL>
2884: <DT><U>Variable:</U> int <B>rl_readline_version</B>
2885: <DD>An integer encoding the current version of the library. The encoding is
2886: of the form 0x<VAR>MMmm</VAR>, where <VAR>MM</VAR> is the two-digit major version
2887: number, and <VAR>mm</VAR> is the two-digit minor version number.
2888: For example, for Readline-4.2, <CODE>rl_readline_version</CODE> would have the
2889: value 0x0402.
2890: </DL>
2891: </P><P>
2892:
1.1.1.2 ! misho 2893: <A NAME="IDX235"></A>
1.1 misho 2894: <DL>
2895: <DT><U>Variable:</U> int <B>rl_gnu_readline_p</B>
2896: <DD>Always set to 1, denoting that this is GNU readline rather than some
2897: emulation.
2898: </DL>
2899: </P><P>
2900:
1.1.1.2 ! misho 2901: <A NAME="IDX236"></A>
1.1 misho 2902: <DL>
2903: <DT><U>Variable:</U> const char * <B>rl_terminal_name</B>
2904: <DD>The terminal type, used for initialization. If not set by the application,
2905: Readline sets this to the value of the <CODE>TERM</CODE> environment variable
2906: the first time it is called.
2907: </DL>
2908: </P><P>
2909:
1.1.1.2 ! misho 2910: <A NAME="IDX237"></A>
1.1 misho 2911: <DL>
2912: <DT><U>Variable:</U> const char * <B>rl_readline_name</B>
2913: <DD>This variable is set to a unique name by each application using Readline.
2914: The value allows conditional parsing of the inputrc file
2915: (see section <A HREF="readline.html#SEC11">1.3.2 Conditional Init Constructs</A>).
2916: </DL>
2917: </P><P>
2918:
1.1.1.2 ! misho 2919: <A NAME="IDX238"></A>
1.1 misho 2920: <DL>
2921: <DT><U>Variable:</U> FILE * <B>rl_instream</B>
2922: <DD>The stdio stream from which Readline reads input.
2923: If <CODE>NULL</CODE>, Readline defaults to <VAR>stdin</VAR>.
2924: </DL>
2925: </P><P>
2926:
1.1.1.2 ! misho 2927: <A NAME="IDX239"></A>
1.1 misho 2928: <DL>
2929: <DT><U>Variable:</U> FILE * <B>rl_outstream</B>
2930: <DD>The stdio stream to which Readline performs output.
2931: If <CODE>NULL</CODE>, Readline defaults to <VAR>stdout</VAR>.
2932: </DL>
2933: </P><P>
2934:
1.1.1.2 ! misho 2935: <A NAME="IDX240"></A>
1.1 misho 2936: <DL>
2937: <DT><U>Variable:</U> int <B>rl_prefer_env_winsize</B>
2938: <DD>If non-zero, Readline gives values found in the <CODE>LINES</CODE> and
2939: <CODE>COLUMNS</CODE> environment variables greater precedence than values fetched
2940: from the kernel when computing the screen dimensions.
2941: </DL>
2942: </P><P>
2943:
1.1.1.2 ! misho 2944: <A NAME="IDX241"></A>
1.1 misho 2945: <DL>
2946: <DT><U>Variable:</U> rl_command_func_t * <B>rl_last_func</B>
2947: <DD>The address of the last command function Readline executed. May be used to
2948: test whether or not a function is being executed twice in succession, for
2949: example.
2950: </DL>
2951: </P><P>
2952:
1.1.1.2 ! misho 2953: <A NAME="IDX242"></A>
1.1 misho 2954: <DL>
2955: <DT><U>Variable:</U> rl_hook_func_t * <B>rl_startup_hook</B>
2956: <DD>If non-zero, this is the address of a function to call just
2957: before <CODE>readline</CODE> prints the first prompt.
2958: </DL>
2959: </P><P>
2960:
1.1.1.2 ! misho 2961: <A NAME="IDX243"></A>
1.1 misho 2962: <DL>
2963: <DT><U>Variable:</U> rl_hook_func_t * <B>rl_pre_input_hook</B>
2964: <DD>If non-zero, this is the address of a function to call after
2965: the first prompt has been printed and just before <CODE>readline</CODE>
2966: starts reading input characters.
2967: </DL>
2968: </P><P>
2969:
1.1.1.2 ! misho 2970: <A NAME="IDX244"></A>
1.1 misho 2971: <DL>
2972: <DT><U>Variable:</U> rl_hook_func_t * <B>rl_event_hook</B>
2973: <DD>If non-zero, this is the address of a function to call periodically
2974: when Readline is waiting for terminal input.
2975: By default, this will be called at most ten times a second if there
2976: is no keyboard input.
2977: </DL>
2978: </P><P>
2979:
1.1.1.2 ! misho 2980: <A NAME="IDX245"></A>
1.1 misho 2981: <DL>
2982: <DT><U>Variable:</U> rl_getc_func_t * <B>rl_getc_function</B>
2983: <DD>If non-zero, Readline will call indirectly through this pointer
2984: to get a character from the input stream. By default, it is set to
2985: <CODE>rl_getc</CODE>, the default Readline character input function
2986: (see section <A HREF="readline.html#SEC37">2.4.8 Character Input</A>).
2987: In general, an application that sets <VAR>rl_getc_function</VAR> should consider
2988: setting <VAR>rl_input_available_hook</VAR> as well.
2989: </DL>
2990: </P><P>
2991:
1.1.1.2 ! misho 2992: <A NAME="IDX246"></A>
1.1 misho 2993: <DL>
2994: <DT><U>Variable:</U> rl_hook_func_t * <B>rl_signal_event_hook</B>
2995: <DD>If non-zero, this is the address of a function to call if a read system
2996: call is interrupted when Readline is reading terminal input.
2997: </DL>
2998: </P><P>
2999:
1.1.1.2 ! misho 3000: <A NAME="IDX247"></A>
1.1 misho 3001: <DL>
3002: <DT><U>Variable:</U> rl_hook_func_t * <B>rl_input_available_hook</B>
3003: <DD>If non-zero, Readline will use this function's return value when it needs
3004: to determine whether or not there is available input on the current input
3005: source.
3006: The default hook checks <CODE>rl_instream</CODE>; if an application is using a
3007: different input source, it should set the hook appropriately.
3008: Readline queries for available input when implementing intra-key-sequence
3009: timeouts during input and incremental searches.
3010: This may use an application-specific timeout before returning a value;
3011: Readline uses the value passed to <CODE>rl_set_keyboard_input_timeout()</CODE>
3012: or the value of the user-settable <VAR>keyseq-timeout</VAR> variable.
3013: This is designed for use by applications using Readline's callback interface
3014: (see section <A HREF="readline.html#SEC41">2.4.12 Alternate Interface</A>), which may not use the traditional
3015: <CODE>read(2)</CODE> and file descriptor interface, or other applications using
3016: a different input mechanism.
3017: If an application uses an input mechanism or hook that can potentially exceed
3018: the value of <VAR>keyseq-timeout</VAR>, it should increase the timeout or set
3019: this hook appropriately even when not using the callback interface.
3020: In general, an application that sets <VAR>rl_getc_function</VAR> should consider
3021: setting <VAR>rl_input_available_hook</VAR> as well.
3022: </DL>
3023: </P><P>
3024:
1.1.1.2 ! misho 3025: <A NAME="IDX248"></A>
1.1 misho 3026: <DL>
3027: <DT><U>Variable:</U> rl_voidfunc_t * <B>rl_redisplay_function</B>
3028: <DD>If non-zero, Readline will call indirectly through this pointer
3029: to update the display with the current contents of the editing buffer.
3030: By default, it is set to <CODE>rl_redisplay</CODE>, the default Readline
3031: redisplay function (see section <A HREF="readline.html#SEC35">2.4.6 Redisplay</A>).
3032: </DL>
3033: </P><P>
3034:
1.1.1.2 ! misho 3035: <A NAME="IDX249"></A>
1.1 misho 3036: <DL>
3037: <DT><U>Variable:</U> rl_vintfunc_t * <B>rl_prep_term_function</B>
3038: <DD>If non-zero, Readline will call indirectly through this pointer
3039: to initialize the terminal. The function takes a single argument, an
3040: <CODE>int</CODE> flag that says whether or not to use eight-bit characters.
3041: By default, this is set to <CODE>rl_prep_terminal</CODE>
3042: (see section <A HREF="readline.html#SEC38">2.4.9 Terminal Management</A>).
3043: </DL>
3044: </P><P>
3045:
1.1.1.2 ! misho 3046: <A NAME="IDX250"></A>
1.1 misho 3047: <DL>
3048: <DT><U>Variable:</U> rl_voidfunc_t * <B>rl_deprep_term_function</B>
3049: <DD>If non-zero, Readline will call indirectly through this pointer
3050: to reset the terminal. This function should undo the effects of
3051: <CODE>rl_prep_term_function</CODE>.
3052: By default, this is set to <CODE>rl_deprep_terminal</CODE>
3053: (see section <A HREF="readline.html#SEC38">2.4.9 Terminal Management</A>).
3054: </DL>
3055: </P><P>
3056:
1.1.1.2 ! misho 3057: <A NAME="IDX251"></A>
1.1 misho 3058: <DL>
3059: <DT><U>Variable:</U> Keymap <B>rl_executing_keymap</B>
3060: <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
3061: currently executing readline function was found.
3062: </DL>
3063: </P><P>
3064:
1.1.1.2 ! misho 3065: <A NAME="IDX252"></A>
1.1 misho 3066: <DL>
3067: <DT><U>Variable:</U> Keymap <B>rl_binding_keymap</B>
3068: <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
3069: last key binding occurred.
3070: </DL>
3071: </P><P>
3072:
1.1.1.2 ! misho 3073: <A NAME="IDX253"></A>
1.1 misho 3074: <DL>
3075: <DT><U>Variable:</U> char * <B>rl_executing_macro</B>
3076: <DD>This variable is set to the text of any currently-executing macro.
3077: </DL>
3078: </P><P>
3079:
1.1.1.2 ! misho 3080: <A NAME="IDX254"></A>
1.1 misho 3081: <DL>
3082: <DT><U>Variable:</U> int <B>rl_executing_key</B>
3083: <DD>The key that caused the dispatch to the currently-executing Readline function.
3084: </DL>
3085: </P><P>
3086:
1.1.1.2 ! misho 3087: <A NAME="IDX255"></A>
1.1 misho 3088: <DL>
3089: <DT><U>Variable:</U> char * <B>rl_executing_keyseq</B>
3090: <DD>The full key sequence that caused the dispatch to the currently-executing
3091: Readline function.
3092: </DL>
3093: </P><P>
3094:
1.1.1.2 ! misho 3095: <A NAME="IDX256"></A>
1.1 misho 3096: <DL>
3097: <DT><U>Variable:</U> int <B>rl_key_sequence_length</B>
3098: <DD>The number of characters in <VAR>rl_executing_keyseq</VAR>.
3099: </DL>
3100: </P><P>
3101:
1.1.1.2 ! misho 3102: <A NAME="IDX257"></A>
1.1 misho 3103: <DL>
3104: <DT><U>Variable:</U> int <B>rl_readline_state</B>
3105: <DD>A variable with bit values that encapsulate the current Readline state.
3106: A bit is set with the <CODE>RL_SETSTATE</CODE> macro, and unset with the
3107: <CODE>RL_UNSETSTATE</CODE> macro. Use the <CODE>RL_ISSTATE</CODE> macro to test
3108: whether a particular state bit is set. Current state bits include:
3109: </P><P>
3110:
3111: <DL COMPACT>
3112: <DT><CODE>RL_STATE_NONE</CODE>
3113: <DD>Readline has not yet been called, nor has it begun to initialize.
3114: <DT><CODE>RL_STATE_INITIALIZING</CODE>
3115: <DD>Readline is initializing its internal data structures.
3116: <DT><CODE>RL_STATE_INITIALIZED</CODE>
3117: <DD>Readline has completed its initialization.
3118: <DT><CODE>RL_STATE_TERMPREPPED</CODE>
3119: <DD>Readline has modified the terminal modes to do its own input and redisplay.
3120: <DT><CODE>RL_STATE_READCMD</CODE>
3121: <DD>Readline is reading a command from the keyboard.
3122: <DT><CODE>RL_STATE_METANEXT</CODE>
3123: <DD>Readline is reading more input after reading the meta-prefix character.
3124: <DT><CODE>RL_STATE_DISPATCHING</CODE>
3125: <DD>Readline is dispatching to a command.
3126: <DT><CODE>RL_STATE_MOREINPUT</CODE>
3127: <DD>Readline is reading more input while executing an editing command.
3128: <DT><CODE>RL_STATE_ISEARCH</CODE>
3129: <DD>Readline is performing an incremental history search.
3130: <DT><CODE>RL_STATE_NSEARCH</CODE>
3131: <DD>Readline is performing a non-incremental history search.
3132: <DT><CODE>RL_STATE_SEARCH</CODE>
3133: <DD>Readline is searching backward or forward through the history for a string.
3134: <DT><CODE>RL_STATE_NUMERICARG</CODE>
3135: <DD>Readline is reading a numeric argument.
3136: <DT><CODE>RL_STATE_MACROINPUT</CODE>
3137: <DD>Readline is currently getting its input from a previously-defined keyboard
3138: macro.
3139: <DT><CODE>RL_STATE_MACRODEF</CODE>
3140: <DD>Readline is currently reading characters defining a keyboard macro.
3141: <DT><CODE>RL_STATE_OVERWRITE</CODE>
3142: <DD>Readline is in overwrite mode.
3143: <DT><CODE>RL_STATE_COMPLETING</CODE>
3144: <DD>Readline is performing word completion.
3145: <DT><CODE>RL_STATE_SIGHANDLER</CODE>
3146: <DD>Readline is currently executing the readline signal handler.
3147: <DT><CODE>RL_STATE_UNDOING</CODE>
3148: <DD>Readline is performing an undo.
3149: <DT><CODE>RL_STATE_INPUTPENDING</CODE>
3150: <DD>Readline has input pending due to a call to <CODE>rl_execute_next()</CODE>.
3151: <DT><CODE>RL_STATE_TTYCSAVED</CODE>
3152: <DD>Readline has saved the values of the terminal's special characters.
3153: <DT><CODE>RL_STATE_CALLBACK</CODE>
3154: <DD>Readline is currently using the alternate (callback) interface
3155: (see section <A HREF="readline.html#SEC41">2.4.12 Alternate Interface</A>).
3156: <DT><CODE>RL_STATE_VIMOTION</CODE>
3157: <DD>Readline is reading the argument to a vi-mode "motion" command.
3158: <DT><CODE>RL_STATE_MULTIKEY</CODE>
3159: <DD>Readline is reading a multiple-keystroke command.
3160: <DT><CODE>RL_STATE_VICMDONCE</CODE>
3161: <DD>Readline has entered vi command (movement) mode at least one time during
3162: the current call to <CODE>readline()</CODE>.
3163: <DT><CODE>RL_STATE_DONE</CODE>
3164: <DD>Readline has read a key sequence bound to <CODE>accept-line</CODE>
3165: and is about to return the line to the caller.
3166: </DL>
3167: <P>
3168:
3169: </DL>
3170: </P><P>
3171:
1.1.1.2 ! misho 3172: <A NAME="IDX258"></A>
1.1 misho 3173: <DL>
3174: <DT><U>Variable:</U> int <B>rl_explicit_arg</B>
3175: <DD>Set to a non-zero value if an explicit numeric argument was specified by
3176: the user. Only valid in a bindable command function.
3177: </DL>
3178: </P><P>
3179:
1.1.1.2 ! misho 3180: <A NAME="IDX259"></A>
1.1 misho 3181: <DL>
3182: <DT><U>Variable:</U> int <B>rl_numeric_arg</B>
3183: <DD>Set to the value of any numeric argument explicitly specified by the user
3184: before executing the current Readline function. Only valid in a bindable
3185: command function.
3186: </DL>
3187: </P><P>
3188:
1.1.1.2 ! misho 3189: <A NAME="IDX260"></A>
1.1 misho 3190: <DL>
3191: <DT><U>Variable:</U> int <B>rl_editing_mode</B>
3192: <DD>Set to a value denoting Readline's current editing mode. A value of
3193: <VAR>1</VAR> means Readline is currently in emacs mode; <VAR>0</VAR>
3194: means that vi mode is active.
3195: </DL>
3196: </P><P>
3197:
3198: <A NAME="Readline Convenience Functions"></A>
3199: <HR SIZE="6">
3200: <A NAME="SEC29"></A>
3201: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3202: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC28"> < </A>]</TD>
3203: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC30"> > </A>]</TD>
3204: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> << </A>]</TD>
3205: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
3206: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
3207: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3208: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3209: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3210: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3211: </TR></TABLE>
3212: <H2> 2.4 Readline Convenience Functions </H2>
3213: <!--docid::SEC29::-->
3214: <P>
3215:
3216: <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
3217: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC30">2.4.1 Naming a Function</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">How to give a function you write a name.</TD></TR>
3218: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Making keymaps.</TD></TR>
3219: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Changing Keymaps.</TD></TR>
3220: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Translate function names to
3221: key sequences.</TD></TR>
3222: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">How to make your functions undoable.</TD></TR>
3223: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Functions to control line display.</TD></TR>
3224: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC36">2.4.7 Modifying Text</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Functions to modify <CODE>rl_line_buffer</CODE>.</TD></TR>
3225: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC37">2.4.8 Character Input</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Functions to read keyboard input.</TD></TR>
3226: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC38">2.4.9 Terminal Management</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Functions to manage terminal settings.</TD></TR>
3227: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Generally useful functions and hooks.</TD></TR>
3228: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Functions that don't fall into any category.</TD></TR>
3229: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC41">2.4.12 Alternate Interface</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Using Readline in a `callback' fashion.</TD></TR>
3230: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC42">2.4.13 A Readline Example</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">An example Readline function.</TD></TR>
3231: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC43">2.4.14 Alternate Interface Example</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">An example program using the alternate interface.</TD></TR>
3232: </TABLE></BLOCKQUOTE>
3233: <P>
3234:
3235: <A NAME="Function Naming"></A>
3236: <HR SIZE="6">
3237: <A NAME="SEC30"></A>
3238: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3239: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> < </A>]</TD>
3240: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> > </A>]</TD>
3241: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> << </A>]</TD>
3242: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3243: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
3244: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3245: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3246: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3247: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3248: </TR></TABLE>
3249: <H3> 2.4.1 Naming a Function </H3>
3250: <!--docid::SEC30::-->
3251: <P>
3252:
3253: The user can dynamically change the bindings of keys while using
3254: Readline. This is done by representing the function with a descriptive
3255: name. The user is able to type the descriptive name when referring to
3256: the function. Thus, in an init file, one might find
3257: </P><P>
3258:
3259: <TABLE><tr><td> </td><td class=example><pre>Meta-Rubout: backward-kill-word
3260: </pre></td></tr></table></P><P>
3261:
3262: This binds the keystroke <KBD>Meta-Rubout</KBD> to the function
3263: <EM>descriptively</EM> named <CODE>backward-kill-word</CODE>. You, as the
3264: programmer, should bind the functions you write to descriptive names as
3265: well. Readline provides a function for doing that:
3266: </P><P>
3267:
1.1.1.2 ! misho 3268: <A NAME="IDX261"></A>
1.1 misho 3269: <DL>
3270: <DT><U>Function:</U> int <B>rl_add_defun</B> <I>(const char *name, rl_command_func_t *function, int key)</I>
3271: <DD>Add <VAR>name</VAR> to the list of named functions. Make <VAR>function</VAR> be
3272: the function that gets called. If <VAR>key</VAR> is not -1, then bind it to
3273: <VAR>function</VAR> using <CODE>rl_bind_key()</CODE>.
3274: </DL>
3275: </P><P>
3276:
3277: Using this function alone is sufficient for most applications.
3278: It is the recommended way to add a few functions to the default
3279: functions that Readline has built in.
3280: If you need to do something other than adding a function to Readline,
3281: you may need to use the underlying functions described below.
3282: </P><P>
3283:
3284: <A NAME="Keymaps"></A>
3285: <HR SIZE="6">
3286: <A NAME="SEC31"></A>
3287: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3288: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC30"> < </A>]</TD>
3289: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC32"> > </A>]</TD>
3290: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC32"> << </A>]</TD>
3291: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3292: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
3293: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3294: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3295: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3296: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3297: </TR></TABLE>
3298: <H3> 2.4.2 Selecting a Keymap </H3>
3299: <!--docid::SEC31::-->
3300: <P>
3301:
3302: Key bindings take place on a <EM>keymap</EM>. The keymap is the
3303: association between the keys that the user types and the functions that
3304: get run. You can make your own keymaps, copy existing keymaps, and tell
3305: Readline which keymap to use.
3306: </P><P>
3307:
1.1.1.2 ! misho 3308: <A NAME="IDX262"></A>
1.1 misho 3309: <DL>
3310: <DT><U>Function:</U> Keymap <B>rl_make_bare_keymap</B> <I>(void)</I>
3311: <DD>Returns a new, empty keymap. The space for the keymap is allocated with
3312: <CODE>malloc()</CODE>; the caller should free it by calling
3313: <CODE>rl_free_keymap()</CODE> when done.
3314: </DL>
3315: </P><P>
3316:
1.1.1.2 ! misho 3317: <A NAME="IDX263"></A>
1.1 misho 3318: <DL>
3319: <DT><U>Function:</U> Keymap <B>rl_copy_keymap</B> <I>(Keymap map)</I>
3320: <DD>Return a new keymap which is a copy of <VAR>map</VAR>.
3321: </DL>
3322: </P><P>
3323:
1.1.1.2 ! misho 3324: <A NAME="IDX264"></A>
1.1 misho 3325: <DL>
3326: <DT><U>Function:</U> Keymap <B>rl_make_keymap</B> <I>(void)</I>
3327: <DD>Return a new keymap with the printing characters bound to rl_insert,
3328: the lowercase Meta characters bound to run their equivalents, and
3329: the Meta digits bound to produce numeric arguments.
3330: </DL>
3331: </P><P>
3332:
1.1.1.2 ! misho 3333: <A NAME="IDX265"></A>
1.1 misho 3334: <DL>
3335: <DT><U>Function:</U> void <B>rl_discard_keymap</B> <I>(Keymap keymap)</I>
3336: <DD>Free the storage associated with the data in <VAR>keymap</VAR>.
3337: The caller should free <VAR>keymap</VAR>.
3338: </DL>
3339: </P><P>
3340:
1.1.1.2 ! misho 3341: <A NAME="IDX266"></A>
1.1 misho 3342: <DL>
3343: <DT><U>Function:</U> void <B>rl_free_keymap</B> <I>(Keymap keymap)</I>
3344: <DD>Free all storage associated with <VAR>keymap</VAR>. This calls
3345: <CODE>rl_discard_keymap</CODE> to free subordindate keymaps and macros.
3346: </DL>
3347: </P><P>
3348:
1.1.1.2 ! misho 3349: <A NAME="IDX267"></A>
! 3350: <DL>
! 3351: <DT><U>Function:</U> int <B>rl_empty_keymap</B> <I>(Keymap keymap)</I>
! 3352: <DD>Return non-zero if there are no keys bound to functions in <VAR>keymap</VAR>;
! 3353: zero if there are any keys bound.
! 3354: </DL>
! 3355: </P><P>
! 3356:
1.1 misho 3357: Readline has several internal keymaps. These functions allow you to
3358: change which keymap is active.
3359: </P><P>
3360:
1.1.1.2 ! misho 3361: <A NAME="IDX268"></A>
1.1 misho 3362: <DL>
3363: <DT><U>Function:</U> Keymap <B>rl_get_keymap</B> <I>(void)</I>
3364: <DD>Returns the currently active keymap.
3365: </DL>
3366: </P><P>
3367:
1.1.1.2 ! misho 3368: <A NAME="IDX269"></A>
1.1 misho 3369: <DL>
3370: <DT><U>Function:</U> void <B>rl_set_keymap</B> <I>(Keymap keymap)</I>
3371: <DD>Makes <VAR>keymap</VAR> the currently active keymap.
3372: </DL>
3373: </P><P>
3374:
1.1.1.2 ! misho 3375: <A NAME="IDX270"></A>
1.1 misho 3376: <DL>
3377: <DT><U>Function:</U> Keymap <B>rl_get_keymap_by_name</B> <I>(const char *name)</I>
3378: <DD>Return the keymap matching <VAR>name</VAR>. <VAR>name</VAR> is one which would
3379: be supplied in a <CODE>set keymap</CODE> inputrc line (see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
3380: </DL>
3381: </P><P>
3382:
1.1.1.2 ! misho 3383: <A NAME="IDX271"></A>
1.1 misho 3384: <DL>
3385: <DT><U>Function:</U> char * <B>rl_get_keymap_name</B> <I>(Keymap keymap)</I>
3386: <DD>Return the name matching <VAR>keymap</VAR>. <VAR>name</VAR> is one which would
3387: be supplied in a <CODE>set keymap</CODE> inputrc line (see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
3388: </DL>
3389: </P><P>
3390:
1.1.1.2 ! misho 3391: <A NAME="IDX272"></A>
! 3392: <DL>
! 3393: <DT><U>Function:</U> int <B>rl_set_keymap_name</B> <I>(const char *name, Keymap keymap)</I>
! 3394: <DD>Set the name of <VAR>keymap</VAR>. This name will then be "registered" and
! 3395: available for use in a <CODE>set keymap</CODE> inputrc directive
! 3396: see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
! 3397: The <VAR>name</VAR> may not be one of Readline's builtin keymap names;
! 3398: you may not add a different name for one of Readline's builtin keymaps.
! 3399: You may replace the name associated with a given keymap by calling this
! 3400: function more than once with the same <VAR>keymap</VAR> argument.
! 3401: You may associate a registered <VAR>name</VAR> with a new keymap by calling this
! 3402: function more than once with the same <VAR>name</VAR> argument.
! 3403: There is no way to remove a named keymap once the name has been
! 3404: registered.
! 3405: Readline will make a copy of <VAR>name</VAR>.
! 3406: The return value is greater than zero unless <VAR>name</VAR> is one of
! 3407: Readline's builtin keymap names or <VAR>keymap</VAR> is one of Readline's
! 3408: builtin keymaps.
! 3409: </DL>
! 3410: </P><P>
! 3411:
1.1 misho 3412: <A NAME="Binding Keys"></A>
3413: <HR SIZE="6">
3414: <A NAME="SEC32"></A>
3415: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3416: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> < </A>]</TD>
3417: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC33"> > </A>]</TD>
3418: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC33"> << </A>]</TD>
3419: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3420: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
3421: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3422: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3423: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3424: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3425: </TR></TABLE>
3426: <H3> 2.4.3 Binding Keys </H3>
3427: <!--docid::SEC32::-->
3428: <P>
3429:
3430: Key sequences are associate with functions through the keymap.
3431: Readline has several internal keymaps: <CODE>emacs_standard_keymap</CODE>,
3432: <CODE>emacs_meta_keymap</CODE>, <CODE>emacs_ctlx_keymap</CODE>,
3433: <CODE>vi_movement_keymap</CODE>, and <CODE>vi_insertion_keymap</CODE>.
3434: <CODE>emacs_standard_keymap</CODE> is the default, and the examples in
3435: this manual assume that.
3436: </P><P>
3437:
3438: Since <CODE>readline()</CODE> installs a set of default key bindings the first
3439: time it is called, there is always the danger that a custom binding
3440: installed before the first call to <CODE>readline()</CODE> will be overridden.
3441: An alternate mechanism is to install custom key bindings in an
3442: initialization function assigned to the <CODE>rl_startup_hook</CODE> variable
3443: (see section <A HREF="readline.html#SEC28">2.3 Readline Variables</A>).
3444: </P><P>
3445:
3446: These functions manage key bindings.
3447: </P><P>
3448:
1.1.1.2 ! misho 3449: <A NAME="IDX273"></A>
1.1 misho 3450: <DL>
3451: <DT><U>Function:</U> int <B>rl_bind_key</B> <I>(int key, rl_command_func_t *function)</I>
3452: <DD>Binds <VAR>key</VAR> to <VAR>function</VAR> in the currently active keymap.
3453: Returns non-zero in the case of an invalid <VAR>key</VAR>.
3454: </DL>
3455: </P><P>
3456:
1.1.1.2 ! misho 3457: <A NAME="IDX274"></A>
1.1 misho 3458: <DL>
3459: <DT><U>Function:</U> int <B>rl_bind_key_in_map</B> <I>(int key, rl_command_func_t *function, Keymap map)</I>
3460: <DD>Bind <VAR>key</VAR> to <VAR>function</VAR> in <VAR>map</VAR>.
3461: Returns non-zero in the case of an invalid <VAR>key</VAR>.
3462: </DL>
3463: </P><P>
3464:
1.1.1.2 ! misho 3465: <A NAME="IDX275"></A>
1.1 misho 3466: <DL>
3467: <DT><U>Function:</U> int <B>rl_bind_key_if_unbound</B> <I>(int key, rl_command_func_t *function)</I>
3468: <DD>Binds <VAR>key</VAR> to <VAR>function</VAR> if it is not already bound in the
3469: currently active keymap.
3470: Returns non-zero in the case of an invalid <VAR>key</VAR> or if <VAR>key</VAR> is
3471: already bound.
3472: </DL>
3473: </P><P>
3474:
1.1.1.2 ! misho 3475: <A NAME="IDX276"></A>
1.1 misho 3476: <DL>
3477: <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>
3478: <DD>Binds <VAR>key</VAR> to <VAR>function</VAR> if it is not already bound in <VAR>map</VAR>.
3479: Returns non-zero in the case of an invalid <VAR>key</VAR> or if <VAR>key</VAR> is
3480: already bound.
3481: </DL>
3482: </P><P>
3483:
1.1.1.2 ! misho 3484: <A NAME="IDX277"></A>
1.1 misho 3485: <DL>
3486: <DT><U>Function:</U> int <B>rl_unbind_key</B> <I>(int key)</I>
3487: <DD>Bind <VAR>key</VAR> to the null function in the currently active keymap.
3488: Returns non-zero in case of error.
3489: </DL>
3490: </P><P>
3491:
1.1.1.2 ! misho 3492: <A NAME="IDX278"></A>
1.1 misho 3493: <DL>
3494: <DT><U>Function:</U> int <B>rl_unbind_key_in_map</B> <I>(int key, Keymap map)</I>
3495: <DD>Bind <VAR>key</VAR> to the null function in <VAR>map</VAR>.
3496: Returns non-zero in case of error.
3497: </DL>
3498: </P><P>
3499:
1.1.1.2 ! misho 3500: <A NAME="IDX279"></A>
1.1 misho 3501: <DL>
3502: <DT><U>Function:</U> int <B>rl_unbind_function_in_map</B> <I>(rl_command_func_t *function, Keymap map)</I>
3503: <DD>Unbind all keys that execute <VAR>function</VAR> in <VAR>map</VAR>.
3504: </DL>
3505: </P><P>
3506:
1.1.1.2 ! misho 3507: <A NAME="IDX280"></A>
1.1 misho 3508: <DL>
3509: <DT><U>Function:</U> int <B>rl_unbind_command_in_map</B> <I>(const char *command, Keymap map)</I>
3510: <DD>Unbind all keys that are bound to <VAR>command</VAR> in <VAR>map</VAR>.
3511: </DL>
3512: </P><P>
3513:
1.1.1.2 ! misho 3514: <A NAME="IDX281"></A>
1.1 misho 3515: <DL>
3516: <DT><U>Function:</U> int <B>rl_bind_keyseq</B> <I>(const char *keyseq, rl_command_func_t *function)</I>
3517: <DD>Bind the key sequence represented by the string <VAR>keyseq</VAR> to the function
3518: <VAR>function</VAR>, beginning in the current keymap.
3519: This makes new keymaps as necessary.
3520: The return value is non-zero if <VAR>keyseq</VAR> is invalid.
3521: </DL>
3522: </P><P>
3523:
1.1.1.2 ! misho 3524: <A NAME="IDX282"></A>
1.1 misho 3525: <DL>
3526: <DT><U>Function:</U> int <B>rl_bind_keyseq_in_map</B> <I>(const char *keyseq, rl_command_func_t *function, Keymap map)</I>
3527: <DD>Bind the key sequence represented by the string <VAR>keyseq</VAR> to the function
3528: <VAR>function</VAR>. This makes new keymaps as necessary.
3529: Initial bindings are performed in <VAR>map</VAR>.
3530: The return value is non-zero if <VAR>keyseq</VAR> is invalid.
3531: </DL>
3532: </P><P>
3533:
1.1.1.2 ! misho 3534: <A NAME="IDX283"></A>
1.1 misho 3535: <DL>
3536: <DT><U>Function:</U> int <B>rl_set_key</B> <I>(const char *keyseq, rl_command_func_t *function, Keymap map)</I>
3537: <DD>Equivalent to <CODE>rl_bind_keyseq_in_map</CODE>.
3538: </DL>
3539: </P><P>
3540:
1.1.1.2 ! misho 3541: <A NAME="IDX284"></A>
1.1 misho 3542: <DL>
3543: <DT><U>Function:</U> int <B>rl_bind_keyseq_if_unbound</B> <I>(const char *keyseq, rl_command_func_t *function)</I>
3544: <DD>Binds <VAR>keyseq</VAR> to <VAR>function</VAR> if it is not already bound in the
3545: currently active keymap.
3546: Returns non-zero in the case of an invalid <VAR>keyseq</VAR> or if <VAR>keyseq</VAR> is
3547: already bound.
3548: </DL>
3549: </P><P>
3550:
1.1.1.2 ! misho 3551: <A NAME="IDX285"></A>
1.1 misho 3552: <DL>
3553: <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>
3554: <DD>Binds <VAR>keyseq</VAR> to <VAR>function</VAR> if it is not already bound in <VAR>map</VAR>.
3555: Returns non-zero in the case of an invalid <VAR>keyseq</VAR> or if <VAR>keyseq</VAR> is
3556: already bound.
3557: </DL>
3558: </P><P>
3559:
1.1.1.2 ! misho 3560: <A NAME="IDX286"></A>
1.1 misho 3561: <DL>
3562: <DT><U>Function:</U> int <B>rl_generic_bind</B> <I>(int type, const char *keyseq, char *data, Keymap map)</I>
3563: <DD>Bind the key sequence represented by the string <VAR>keyseq</VAR> to the arbitrary
3564: pointer <VAR>data</VAR>. <VAR>type</VAR> says what kind of data is pointed to by
3565: <VAR>data</VAR>; this can be a function (<CODE>ISFUNC</CODE>), a macro
3566: (<CODE>ISMACR</CODE>), or a keymap (<CODE>ISKMAP</CODE>). This makes new keymaps as
3567: necessary. The initial keymap in which to do bindings is <VAR>map</VAR>.
3568: </DL>
3569: </P><P>
3570:
1.1.1.2 ! misho 3571: <A NAME="IDX287"></A>
1.1 misho 3572: <DL>
3573: <DT><U>Function:</U> int <B>rl_parse_and_bind</B> <I>(char *line)</I>
3574: <DD>Parse <VAR>line</VAR> as if it had been read from the <CODE>inputrc</CODE> file and
3575: perform any key bindings and variable assignments found
3576: (see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
3577: </DL>
3578: </P><P>
3579:
1.1.1.2 ! misho 3580: <A NAME="IDX288"></A>
1.1 misho 3581: <DL>
3582: <DT><U>Function:</U> int <B>rl_read_init_file</B> <I>(const char *filename)</I>
3583: <DD>Read keybindings and variable assignments from <VAR>filename</VAR>
3584: (see section <A HREF="readline.html#SEC9">1.3 Readline Init File</A>).
3585: </DL>
3586: </P><P>
3587:
3588: <A NAME="Associating Function Names and Bindings"></A>
3589: <HR SIZE="6">
3590: <A NAME="SEC33"></A>
3591: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3592: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC32"> < </A>]</TD>
3593: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC34"> > </A>]</TD>
3594: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC34"> << </A>]</TD>
3595: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3596: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
3597: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3598: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3599: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3600: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3601: </TR></TABLE>
3602: <H3> 2.4.4 Associating Function Names and Bindings </H3>
3603: <!--docid::SEC33::-->
3604: <P>
3605:
3606: These functions allow you to find out what keys invoke named functions
3607: and the functions invoked by a particular key sequence. You may also
3608: associate a new function name with an arbitrary function.
3609: </P><P>
3610:
1.1.1.2 ! misho 3611: <A NAME="IDX289"></A>
1.1 misho 3612: <DL>
3613: <DT><U>Function:</U> rl_command_func_t * <B>rl_named_function</B> <I>(const char *name)</I>
3614: <DD>Return the function with name <VAR>name</VAR>.
3615: </DL>
3616: </P><P>
3617:
1.1.1.2 ! misho 3618: <A NAME="IDX290"></A>
1.1 misho 3619: <DL>
3620: <DT><U>Function:</U> rl_command_func_t * <B>rl_function_of_keyseq</B> <I>(const char *keyseq, Keymap map, int *type)</I>
3621: <DD>Return the function invoked by <VAR>keyseq</VAR> in keymap <VAR>map</VAR>.
3622: If <VAR>map</VAR> is <CODE>NULL</CODE>, the current keymap is used. If <VAR>type</VAR> is
3623: not <CODE>NULL</CODE>, the type of the object is returned in the <CODE>int</CODE> variable
3624: it points to (one of <CODE>ISFUNC</CODE>, <CODE>ISKMAP</CODE>, or <CODE>ISMACR</CODE>).
1.1.1.2 ! misho 3625: It takes a "translated" key sequence and should not be used if the key sequence
! 3626: can include NUL.
1.1 misho 3627: </DL>
3628: </P><P>
3629:
1.1.1.2 ! misho 3630: <A NAME="IDX291"></A>
! 3631: <DL>
! 3632: <DT><U>Function:</U> rl_command_func_t * <B>rl_function_of_keyseq_len</B> <I>(const char *keyseq, size_t len, Keymap map, int *type)</I>
! 3633: <DD>Return the function invoked by <VAR>keyseq</VAR> of length <VAR>len</VAR>
! 3634: in keymap <VAR>map</VAR>. Equivalent to <CODE>rl_function_of_keyseq</CODE> with the
! 3635: addition of the <VAR>len</VAR> parameter.
! 3636: It takes a "translated" key sequence and should be used if the key sequence
! 3637: can include NUL.
! 3638: </DL>
! 3639: </P><P>
! 3640:
! 3641: <A NAME="IDX292"></A>
1.1 misho 3642: <DL>
3643: <DT><U>Function:</U> char ** <B>rl_invoking_keyseqs</B> <I>(rl_command_func_t *function)</I>
3644: <DD>Return an array of strings representing the key sequences used to
3645: invoke <VAR>function</VAR> in the current keymap.
3646: </DL>
3647: </P><P>
3648:
1.1.1.2 ! misho 3649: <A NAME="IDX293"></A>
1.1 misho 3650: <DL>
3651: <DT><U>Function:</U> char ** <B>rl_invoking_keyseqs_in_map</B> <I>(rl_command_func_t *function, Keymap map)</I>
3652: <DD>Return an array of strings representing the key sequences used to
3653: invoke <VAR>function</VAR> in the keymap <VAR>map</VAR>.
3654: </DL>
3655: </P><P>
3656:
1.1.1.2 ! misho 3657: <A NAME="IDX294"></A>
1.1 misho 3658: <DL>
3659: <DT><U>Function:</U> void <B>rl_function_dumper</B> <I>(int readable)</I>
3660: <DD>Print the readline function names and the key sequences currently
3661: bound to them to <CODE>rl_outstream</CODE>. If <VAR>readable</VAR> is non-zero,
3662: the list is formatted in such a way that it can be made part of an
3663: <CODE>inputrc</CODE> file and re-read.
3664: </DL>
3665: </P><P>
3666:
1.1.1.2 ! misho 3667: <A NAME="IDX295"></A>
1.1 misho 3668: <DL>
3669: <DT><U>Function:</U> void <B>rl_list_funmap_names</B> <I>(void)</I>
3670: <DD>Print the names of all bindable Readline functions to <CODE>rl_outstream</CODE>.
3671: </DL>
3672: </P><P>
3673:
1.1.1.2 ! misho 3674: <A NAME="IDX296"></A>
1.1 misho 3675: <DL>
3676: <DT><U>Function:</U> const char ** <B>rl_funmap_names</B> <I>(void)</I>
3677: <DD>Return a NULL terminated array of known function names. The array is
3678: sorted. The array itself is allocated, but not the strings inside. You
3679: should free the array, but not the pointers, using <CODE>free</CODE> or
3680: <CODE>rl_free</CODE> when you are done.
3681: </DL>
3682: </P><P>
3683:
1.1.1.2 ! misho 3684: <A NAME="IDX297"></A>
1.1 misho 3685: <DL>
3686: <DT><U>Function:</U> int <B>rl_add_funmap_entry</B> <I>(const char *name, rl_command_func_t *function)</I>
3687: <DD>Add <VAR>name</VAR> to the list of bindable Readline command names, and make
3688: <VAR>function</VAR> the function to be called when <VAR>name</VAR> is invoked.
3689: </DL>
3690: </P><P>
3691:
3692: <A NAME="Allowing Undoing"></A>
3693: <HR SIZE="6">
3694: <A NAME="SEC34"></A>
3695: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3696: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC33"> < </A>]</TD>
3697: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC35"> > </A>]</TD>
3698: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC35"> << </A>]</TD>
3699: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3700: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
3701: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3702: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3703: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3704: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3705: </TR></TABLE>
3706: <H3> 2.4.5 Allowing Undoing </H3>
3707: <!--docid::SEC34::-->
3708: <P>
3709:
3710: Supporting the undo command is a painless thing, and makes your
3711: functions much more useful. It is certainly easy to try
3712: something if you know you can undo it.
3713: </P><P>
3714:
3715: If your function simply inserts text once, or deletes text once, and
3716: uses <CODE>rl_insert_text()</CODE> or <CODE>rl_delete_text()</CODE> to do it, then
3717: undoing is already done for you automatically.
3718: </P><P>
3719:
3720: If you do multiple insertions or multiple deletions, or any combination
3721: of these operations, you should group them together into one operation.
3722: This is done with <CODE>rl_begin_undo_group()</CODE> and
3723: <CODE>rl_end_undo_group()</CODE>.
3724: </P><P>
3725:
3726: The types of events that can be undone are:
3727: </P><P>
3728:
3729: <TABLE><tr><td> </td><td class=smallexample><FONT SIZE=-1><pre>enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END };
3730: </FONT></pre></td></tr></table></P><P>
3731:
3732: Notice that <CODE>UNDO_DELETE</CODE> means to insert some text, and
3733: <CODE>UNDO_INSERT</CODE> means to delete some text. That is, the undo code
3734: tells what to undo, not how to undo it. <CODE>UNDO_BEGIN</CODE> and
3735: <CODE>UNDO_END</CODE> are tags added by <CODE>rl_begin_undo_group()</CODE> and
3736: <CODE>rl_end_undo_group()</CODE>.
3737: </P><P>
3738:
1.1.1.2 ! misho 3739: <A NAME="IDX298"></A>
1.1 misho 3740: <DL>
3741: <DT><U>Function:</U> int <B>rl_begin_undo_group</B> <I>(void)</I>
3742: <DD>Begins saving undo information in a group construct. The undo
3743: information usually comes from calls to <CODE>rl_insert_text()</CODE> and
3744: <CODE>rl_delete_text()</CODE>, but could be the result of calls to
3745: <CODE>rl_add_undo()</CODE>.
3746: </DL>
3747: </P><P>
3748:
1.1.1.2 ! misho 3749: <A NAME="IDX299"></A>
1.1 misho 3750: <DL>
3751: <DT><U>Function:</U> int <B>rl_end_undo_group</B> <I>(void)</I>
3752: <DD>Closes the current undo group started with <CODE>rl_begin_undo_group
3753: ()</CODE>. There should be one call to <CODE>rl_end_undo_group()</CODE>
3754: for each call to <CODE>rl_begin_undo_group()</CODE>.
3755: </DL>
3756: </P><P>
3757:
1.1.1.2 ! misho 3758: <A NAME="IDX300"></A>
1.1 misho 3759: <DL>
3760: <DT><U>Function:</U> void <B>rl_add_undo</B> <I>(enum undo_code what, int start, int end, char *text)</I>
3761: <DD>Remember how to undo an event (according to <VAR>what</VAR>). The affected
3762: text runs from <VAR>start</VAR> to <VAR>end</VAR>, and encompasses <VAR>text</VAR>.
3763: </DL>
3764: </P><P>
3765:
1.1.1.2 ! misho 3766: <A NAME="IDX301"></A>
1.1 misho 3767: <DL>
3768: <DT><U>Function:</U> void <B>rl_free_undo_list</B> <I>(void)</I>
3769: <DD>Free the existing undo list.
3770: </DL>
3771: </P><P>
3772:
1.1.1.2 ! misho 3773: <A NAME="IDX302"></A>
1.1 misho 3774: <DL>
3775: <DT><U>Function:</U> int <B>rl_do_undo</B> <I>(void)</I>
3776: <DD>Undo the first thing on the undo list. Returns <CODE>0</CODE> if there was
3777: nothing to undo, non-zero if something was undone.
3778: </DL>
3779: </P><P>
3780:
3781: Finally, if you neither insert nor delete text, but directly modify the
3782: existing text (e.g., change its case), call <CODE>rl_modifying()</CODE>
3783: once, just before you modify the text. You must supply the indices of
3784: the text range that you are going to modify.
3785: </P><P>
3786:
1.1.1.2 ! misho 3787: <A NAME="IDX303"></A>
1.1 misho 3788: <DL>
3789: <DT><U>Function:</U> int <B>rl_modifying</B> <I>(int start, int end)</I>
3790: <DD>Tell Readline to save the text between <VAR>start</VAR> and <VAR>end</VAR> as a
3791: single undo unit. It is assumed that you will subsequently modify
3792: that text.
3793: </DL>
3794: </P><P>
3795:
3796: <A NAME="Redisplay"></A>
3797: <HR SIZE="6">
3798: <A NAME="SEC35"></A>
3799: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3800: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC34"> < </A>]</TD>
3801: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC36"> > </A>]</TD>
3802: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC36"> << </A>]</TD>
3803: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3804: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
3805: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3806: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3807: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3808: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3809: </TR></TABLE>
3810: <H3> 2.4.6 Redisplay </H3>
3811: <!--docid::SEC35::-->
3812: <P>
3813:
1.1.1.2 ! misho 3814: <A NAME="IDX304"></A>
1.1 misho 3815: <DL>
3816: <DT><U>Function:</U> void <B>rl_redisplay</B> <I>(void)</I>
3817: <DD>Change what's displayed on the screen to reflect the current contents
3818: of <CODE>rl_line_buffer</CODE>.
3819: </DL>
3820: </P><P>
3821:
1.1.1.2 ! misho 3822: <A NAME="IDX305"></A>
1.1 misho 3823: <DL>
3824: <DT><U>Function:</U> int <B>rl_forced_update_display</B> <I>(void)</I>
3825: <DD>Force the line to be updated and redisplayed, whether or not
3826: Readline thinks the screen display is correct.
3827: </DL>
3828: </P><P>
3829:
1.1.1.2 ! misho 3830: <A NAME="IDX306"></A>
1.1 misho 3831: <DL>
3832: <DT><U>Function:</U> int <B>rl_on_new_line</B> <I>(void)</I>
3833: <DD>Tell the update functions that we have moved onto a new (empty) line,
3834: usually after outputting a newline.
3835: </DL>
3836: </P><P>
3837:
1.1.1.2 ! misho 3838: <A NAME="IDX307"></A>
1.1 misho 3839: <DL>
3840: <DT><U>Function:</U> int <B>rl_on_new_line_with_prompt</B> <I>(void)</I>
3841: <DD>Tell the update functions that we have moved onto a new line, with
3842: <VAR>rl_prompt</VAR> already displayed.
3843: This could be used by applications that want to output the prompt string
3844: themselves, but still need Readline to know the prompt string length for
3845: redisplay.
3846: It should be used after setting <VAR>rl_already_prompted</VAR>.
3847: </DL>
3848: </P><P>
3849:
1.1.1.2 ! misho 3850: <A NAME="IDX308"></A>
! 3851: <DL>
! 3852: <DT><U>Function:</U> int <B>rl_clear_visible_line</B> <I>(void)</I>
! 3853: <DD>Clear the screen lines corresponding to the current line's contents.
! 3854: </DL>
! 3855: </P><P>
! 3856:
! 3857: <A NAME="IDX309"></A>
1.1 misho 3858: <DL>
3859: <DT><U>Function:</U> int <B>rl_reset_line_state</B> <I>(void)</I>
3860: <DD>Reset the display state to a clean state and redisplay the current line
3861: starting on a new line.
3862: </DL>
3863: </P><P>
3864:
1.1.1.2 ! misho 3865: <A NAME="IDX310"></A>
1.1 misho 3866: <DL>
3867: <DT><U>Function:</U> int <B>rl_crlf</B> <I>(void)</I>
3868: <DD>Move the cursor to the start of the next screen line.
3869: </DL>
3870: </P><P>
3871:
1.1.1.2 ! misho 3872: <A NAME="IDX311"></A>
1.1 misho 3873: <DL>
3874: <DT><U>Function:</U> int <B>rl_show_char</B> <I>(int c)</I>
3875: <DD>Display character <VAR>c</VAR> on <CODE>rl_outstream</CODE>.
3876: If Readline has not been set to display meta characters directly, this
3877: will convert meta characters to a meta-prefixed key sequence.
3878: This is intended for use by applications which wish to do their own
3879: redisplay.
3880: </DL>
3881: </P><P>
3882:
1.1.1.2 ! misho 3883: <A NAME="IDX312"></A>
1.1 misho 3884: <DL>
3885: <DT><U>Function:</U> int <B>rl_message</B> <I>(const char *, <small>...</small>)</I>
3886: <DD>The arguments are a format string as would be supplied to <CODE>printf</CODE>,
3887: possibly containing conversion specifications such as <SAMP>`%d'</SAMP>, and
3888: any additional arguments necessary to satisfy the conversion specifications.
3889: The resulting string is displayed in the <EM>echo area</EM>. The echo area
3890: is also used to display numeric arguments and search strings.
3891: You should call <CODE>rl_save_prompt</CODE> to save the prompt information
3892: before calling this function.
3893: </DL>
3894: </P><P>
3895:
1.1.1.2 ! misho 3896: <A NAME="IDX313"></A>
1.1 misho 3897: <DL>
3898: <DT><U>Function:</U> int <B>rl_clear_message</B> <I>(void)</I>
3899: <DD>Clear the message in the echo area. If the prompt was saved with a call to
3900: <CODE>rl_save_prompt</CODE> before the last call to <CODE>rl_message</CODE>,
3901: call <CODE>rl_restore_prompt</CODE> before calling this function.
3902: </DL>
3903: </P><P>
3904:
1.1.1.2 ! misho 3905: <A NAME="IDX314"></A>
1.1 misho 3906: <DL>
3907: <DT><U>Function:</U> void <B>rl_save_prompt</B> <I>(void)</I>
3908: <DD>Save the local Readline prompt display state in preparation for
3909: displaying a new message in the message area with <CODE>rl_message()</CODE>.
3910: </DL>
3911: </P><P>
3912:
1.1.1.2 ! misho 3913: <A NAME="IDX315"></A>
1.1 misho 3914: <DL>
3915: <DT><U>Function:</U> void <B>rl_restore_prompt</B> <I>(void)</I>
3916: <DD>Restore the local Readline prompt display state saved by the most
3917: recent call to <CODE>rl_save_prompt</CODE>.
3918: if <CODE>rl_save_prompt</CODE> was called to save the prompt before a call
3919: to <CODE>rl_message</CODE>, this function should be called before the
3920: corresponding call to <CODE>rl_clear_message</CODE>.
3921: </DL>
3922: </P><P>
3923:
1.1.1.2 ! misho 3924: <A NAME="IDX316"></A>
1.1 misho 3925: <DL>
3926: <DT><U>Function:</U> int <B>rl_expand_prompt</B> <I>(char *prompt)</I>
3927: <DD>Expand any special character sequences in <VAR>prompt</VAR> and set up the
3928: local Readline prompt redisplay variables.
3929: This function is called by <CODE>readline()</CODE>. It may also be called to
3930: expand the primary prompt if the <CODE>rl_on_new_line_with_prompt()</CODE>
3931: function or <CODE>rl_already_prompted</CODE> variable is used.
3932: It returns the number of visible characters on the last line of the
3933: (possibly multi-line) prompt.
3934: Applications may indicate that the prompt contains characters that take
3935: up no physical screen space when displayed by bracketing a sequence of
3936: such characters with the special markers <CODE>RL_PROMPT_START_IGNORE</CODE>
1.1.1.2 ! misho 3937: and <CODE>RL_PROMPT_END_IGNORE</CODE> (declared in <TT>`readline.h'</TT>). This may
1.1 misho 3938: be used to embed terminal-specific escape sequences in prompts.
3939: </DL>
3940: </P><P>
3941:
1.1.1.2 ! misho 3942: <A NAME="IDX317"></A>
1.1 misho 3943: <DL>
3944: <DT><U>Function:</U> int <B>rl_set_prompt</B> <I>(const char *prompt)</I>
3945: <DD>Make Readline use <VAR>prompt</VAR> for subsequent redisplay. This calls
3946: <CODE>rl_expand_prompt()</CODE> to expand the prompt and sets <CODE>rl_prompt</CODE>
3947: to the result.
3948: </DL>
3949: </P><P>
3950:
3951: <A NAME="Modifying Text"></A>
3952: <HR SIZE="6">
3953: <A NAME="SEC36"></A>
3954: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3955: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC35"> < </A>]</TD>
3956: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC37"> > </A>]</TD>
3957: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC37"> << </A>]</TD>
3958: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
3959: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
3960: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
3961: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
3962: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
3963: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
3964: </TR></TABLE>
3965: <H3> 2.4.7 Modifying Text </H3>
3966: <!--docid::SEC36::-->
3967: <P>
3968:
1.1.1.2 ! misho 3969: <A NAME="IDX318"></A>
1.1 misho 3970: <DL>
3971: <DT><U>Function:</U> int <B>rl_insert_text</B> <I>(const char *text)</I>
3972: <DD>Insert <VAR>text</VAR> into the line at the current cursor position.
3973: Returns the number of characters inserted.
3974: </DL>
3975: </P><P>
3976:
1.1.1.2 ! misho 3977: <A NAME="IDX319"></A>
1.1 misho 3978: <DL>
3979: <DT><U>Function:</U> int <B>rl_delete_text</B> <I>(int start, int end)</I>
3980: <DD>Delete the text between <VAR>start</VAR> and <VAR>end</VAR> in the current line.
3981: Returns the number of characters deleted.
3982: </DL>
3983: </P><P>
3984:
1.1.1.2 ! misho 3985: <A NAME="IDX320"></A>
1.1 misho 3986: <DL>
3987: <DT><U>Function:</U> char * <B>rl_copy_text</B> <I>(int start, int end)</I>
3988: <DD>Return a copy of the text between <VAR>start</VAR> and <VAR>end</VAR> in
3989: the current line.
3990: </DL>
3991: </P><P>
3992:
1.1.1.2 ! misho 3993: <A NAME="IDX321"></A>
1.1 misho 3994: <DL>
3995: <DT><U>Function:</U> int <B>rl_kill_text</B> <I>(int start, int end)</I>
3996: <DD>Copy the text between <VAR>start</VAR> and <VAR>end</VAR> in the current line
3997: to the kill ring, appending or prepending to the last kill if the
3998: last command was a kill command. The text is deleted.
3999: If <VAR>start</VAR> is less than <VAR>end</VAR>,
4000: the text is appended, otherwise prepended. If the last command was
4001: not a kill, a new kill ring slot is used.
4002: </DL>
4003: </P><P>
4004:
1.1.1.2 ! misho 4005: <A NAME="IDX322"></A>
1.1 misho 4006: <DL>
4007: <DT><U>Function:</U> int <B>rl_push_macro_input</B> <I>(char *macro)</I>
4008: <DD>Cause <VAR>macro</VAR> to be inserted into the line, as if it had been invoked
4009: by a key bound to a macro. Not especially useful; use
4010: <CODE>rl_insert_text()</CODE> instead.
4011: </DL>
4012: </P><P>
4013:
4014: <A NAME="Character Input"></A>
4015: <HR SIZE="6">
4016: <A NAME="SEC37"></A>
4017: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4018: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC36"> < </A>]</TD>
4019: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC38"> > </A>]</TD>
4020: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC38"> << </A>]</TD>
4021: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
4022: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
4023: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
4024: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4025: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4026: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4027: </TR></TABLE>
4028: <H3> 2.4.8 Character Input </H3>
4029: <!--docid::SEC37::-->
4030: <P>
4031:
1.1.1.2 ! misho 4032: <A NAME="IDX323"></A>
1.1 misho 4033: <DL>
4034: <DT><U>Function:</U> int <B>rl_read_key</B> <I>(void)</I>
4035: <DD>Return the next character available from Readline's current input stream.
4036: This handles input inserted into
4037: the input stream via <VAR>rl_pending_input</VAR> (see section <A HREF="readline.html#SEC28">2.3 Readline Variables</A>)
4038: and <CODE>rl_stuff_char()</CODE>, macros, and characters read from the keyboard.
4039: While waiting for input, this function will call any function assigned to
4040: the <CODE>rl_event_hook</CODE> variable.
4041: </DL>
4042: </P><P>
4043:
1.1.1.2 ! misho 4044: <A NAME="IDX324"></A>
1.1 misho 4045: <DL>
4046: <DT><U>Function:</U> int <B>rl_getc</B> <I>(FILE *stream)</I>
4047: <DD>Return the next character available from <VAR>stream</VAR>, which is assumed to
4048: be the keyboard.
4049: </DL>
4050: </P><P>
4051:
1.1.1.2 ! misho 4052: <A NAME="IDX325"></A>
1.1 misho 4053: <DL>
4054: <DT><U>Function:</U> int <B>rl_stuff_char</B> <I>(int c)</I>
4055: <DD>Insert <VAR>c</VAR> into the Readline input stream. It will be "read"
4056: before Readline attempts to read characters from the terminal with
4057: <CODE>rl_read_key()</CODE>. Up to 512 characters may be pushed back.
4058: <CODE>rl_stuff_char</CODE> returns 1 if the character was successfully inserted;
4059: 0 otherwise.
4060: </DL>
4061: </P><P>
4062:
1.1.1.2 ! misho 4063: <A NAME="IDX326"></A>
1.1 misho 4064: <DL>
4065: <DT><U>Function:</U> int <B>rl_execute_next</B> <I>(int c)</I>
4066: <DD>Make <VAR>c</VAR> be the next command to be executed when <CODE>rl_read_key()</CODE>
4067: is called. This sets <VAR>rl_pending_input</VAR>.
4068: </DL>
4069: </P><P>
4070:
1.1.1.2 ! misho 4071: <A NAME="IDX327"></A>
1.1 misho 4072: <DL>
4073: <DT><U>Function:</U> int <B>rl_clear_pending_input</B> <I>(void)</I>
4074: <DD>Unset <VAR>rl_pending_input</VAR>, effectively negating the effect of any
4075: previous call to <CODE>rl_execute_next()</CODE>. This works only if the
4076: pending input has not already been read with <CODE>rl_read_key()</CODE>.
4077: </DL>
4078: </P><P>
4079:
1.1.1.2 ! misho 4080: <A NAME="IDX328"></A>
1.1 misho 4081: <DL>
4082: <DT><U>Function:</U> int <B>rl_set_keyboard_input_timeout</B> <I>(int u)</I>
4083: <DD>While waiting for keyboard input in <CODE>rl_read_key()</CODE>, Readline will
4084: wait for <VAR>u</VAR> microseconds for input before calling any function
4085: assigned to <CODE>rl_event_hook</CODE>. <VAR>u</VAR> must be greater than or equal
4086: to zero (a zero-length timeout is equivalent to a poll).
4087: The default waiting period is one-tenth of a second.
4088: Returns the old timeout value.
4089: </DL>
4090: </P><P>
4091:
4092: <A NAME="Terminal Management"></A>
4093: <HR SIZE="6">
4094: <A NAME="SEC38"></A>
4095: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4096: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC37"> < </A>]</TD>
4097: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC39"> > </A>]</TD>
4098: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> << </A>]</TD>
4099: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
4100: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
4101: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
4102: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4103: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4104: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4105: </TR></TABLE>
4106: <H3> 2.4.9 Terminal Management </H3>
4107: <!--docid::SEC38::-->
4108: <P>
4109:
1.1.1.2 ! misho 4110: <A NAME="IDX329"></A>
1.1 misho 4111: <DL>
4112: <DT><U>Function:</U> void <B>rl_prep_terminal</B> <I>(int meta_flag)</I>
4113: <DD>Modify the terminal settings for Readline's use, so <CODE>readline()</CODE>
4114: can read a single character at a time from the keyboard.
4115: The <VAR>meta_flag</VAR> argument should be non-zero if Readline should
4116: read eight-bit input.
4117: </DL>
4118: </P><P>
4119:
1.1.1.2 ! misho 4120: <A NAME="IDX330"></A>
1.1 misho 4121: <DL>
4122: <DT><U>Function:</U> void <B>rl_deprep_terminal</B> <I>(void)</I>
4123: <DD>Undo the effects of <CODE>rl_prep_terminal()</CODE>, leaving the terminal in
4124: the state in which it was before the most recent call to
4125: <CODE>rl_prep_terminal()</CODE>.
4126: </DL>
4127: </P><P>
4128:
1.1.1.2 ! misho 4129: <A NAME="IDX331"></A>
1.1 misho 4130: <DL>
4131: <DT><U>Function:</U> void <B>rl_tty_set_default_bindings</B> <I>(Keymap kmap)</I>
4132: <DD>Read the operating system's terminal editing characters (as would be
4133: displayed by <CODE>stty</CODE>) to their Readline equivalents.
4134: The bindings are performed in <VAR>kmap</VAR>.
4135: </DL>
4136: </P><P>
4137:
1.1.1.2 ! misho 4138: <A NAME="IDX332"></A>
1.1 misho 4139: <DL>
4140: <DT><U>Function:</U> void <B>rl_tty_unset_default_bindings</B> <I>(Keymap kmap)</I>
4141: <DD>Reset the bindings manipulated by <CODE>rl_tty_set_default_bindings</CODE> so
4142: that the terminal editing characters are bound to <CODE>rl_insert</CODE>.
4143: The bindings are performed in <VAR>kmap</VAR>.
4144: </DL>
4145: </P><P>
4146:
1.1.1.2 ! misho 4147: <A NAME="IDX333"></A>
! 4148: <DL>
! 4149: <DT><U>Function:</U> int <B>rl_tty_set_echoing</B> <I>(int value)</I>
! 4150: <DD>Set Readline's idea of whether or not it is echoing output to its output
! 4151: stream (<VAR>rl_outstream</VAR>). If <VAR>value</VAR> is 0, Readline does not display
! 4152: output to <VAR>rl_outstream</VAR>; any other value enables output. The initial
! 4153: value is set when Readline initializes the terminal settings.
! 4154: This function returns the previous value.
! 4155: </DL>
! 4156: </P><P>
! 4157:
! 4158: <A NAME="IDX334"></A>
1.1 misho 4159: <DL>
4160: <DT><U>Function:</U> int <B>rl_reset_terminal</B> <I>(const char *terminal_name)</I>
4161: <DD>Reinitialize Readline's idea of the terminal settings using
4162: <VAR>terminal_name</VAR> as the terminal type (e.g., <CODE>vt100</CODE>).
4163: If <VAR>terminal_name</VAR> is <CODE>NULL</CODE>, the value of the <CODE>TERM</CODE>
4164: environment variable is used.
4165: </DL>
4166: </P><P>
4167:
4168: <A NAME="Utility Functions"></A>
4169: <HR SIZE="6">
4170: <A NAME="SEC39"></A>
4171: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4172: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC38"> < </A>]</TD>
4173: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC40"> > </A>]</TD>
4174: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> << </A>]</TD>
4175: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
4176: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
4177: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
4178: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4179: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4180: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4181: </TR></TABLE>
4182: <H3> 2.4.10 Utility Functions </H3>
4183: <!--docid::SEC39::-->
4184: <P>
4185:
1.1.1.2 ! misho 4186: <A NAME="IDX335"></A>
1.1 misho 4187: <DL>
4188: <DT><U>Function:</U> int <B>rl_save_state</B> <I>(struct readline_state *sp)</I>
4189: <DD>Save a snapshot of Readline's internal state to <VAR>sp</VAR>.
4190: The contents of the <VAR>readline_state</VAR> structure are documented
4191: in <TT>`readline.h'</TT>.
4192: The caller is responsible for allocating the structure.
4193: </DL>
4194: </P><P>
4195:
1.1.1.2 ! misho 4196: <A NAME="IDX336"></A>
1.1 misho 4197: <DL>
4198: <DT><U>Function:</U> int <B>rl_restore_state</B> <I>(struct readline_state *sp)</I>
4199: <DD>Restore Readline's internal state to that stored in <VAR>sp</VAR>, which must
4200: have been saved by a call to <CODE>rl_save_state</CODE>.
4201: The contents of the <VAR>readline_state</VAR> structure are documented
4202: in <TT>`readline.h'</TT>.
4203: The caller is responsible for freeing the structure.
4204: </DL>
4205: </P><P>
4206:
1.1.1.2 ! misho 4207: <A NAME="IDX337"></A>
1.1 misho 4208: <DL>
4209: <DT><U>Function:</U> void <B>rl_free</B> <I>(void *mem)</I>
4210: <DD>Deallocate the memory pointed to by <VAR>mem</VAR>. <VAR>mem</VAR> must have been
4211: allocated by <CODE>malloc</CODE>.
4212: </DL>
4213: </P><P>
4214:
1.1.1.2 ! misho 4215: <A NAME="IDX338"></A>
1.1 misho 4216: <DL>
4217: <DT><U>Function:</U> void <B>rl_replace_line</B> <I>(const char *text, int clear_undo)</I>
4218: <DD>Replace the contents of <CODE>rl_line_buffer</CODE> with <VAR>text</VAR>.
4219: The point and mark are preserved, if possible.
4220: If <VAR>clear_undo</VAR> is non-zero, the undo list associated with the
4221: current line is cleared.
4222: </DL>
4223: </P><P>
4224:
1.1.1.2 ! misho 4225: <A NAME="IDX339"></A>
1.1 misho 4226: <DL>
4227: <DT><U>Function:</U> void <B>rl_extend_line_buffer</B> <I>(int len)</I>
4228: <DD>Ensure that <CODE>rl_line_buffer</CODE> has enough space to hold <VAR>len</VAR>
4229: characters, possibly reallocating it if necessary.
4230: </DL>
4231: </P><P>
4232:
1.1.1.2 ! misho 4233: <A NAME="IDX340"></A>
1.1 misho 4234: <DL>
4235: <DT><U>Function:</U> int <B>rl_initialize</B> <I>(void)</I>
4236: <DD>Initialize or re-initialize Readline's internal state.
4237: It's not strictly necessary to call this; <CODE>readline()</CODE> calls it before
4238: reading any input.
4239: </DL>
4240: </P><P>
4241:
1.1.1.2 ! misho 4242: <A NAME="IDX341"></A>
1.1 misho 4243: <DL>
4244: <DT><U>Function:</U> int <B>rl_ding</B> <I>(void)</I>
4245: <DD>Ring the terminal bell, obeying the setting of <CODE>bell-style</CODE>.
4246: </DL>
4247: </P><P>
4248:
1.1.1.2 ! misho 4249: <A NAME="IDX342"></A>
1.1 misho 4250: <DL>
4251: <DT><U>Function:</U> int <B>rl_alphabetic</B> <I>(int c)</I>
4252: <DD>Return 1 if <VAR>c</VAR> is an alphabetic character.
4253: </DL>
4254: </P><P>
4255:
1.1.1.2 ! misho 4256: <A NAME="IDX343"></A>
1.1 misho 4257: <DL>
4258: <DT><U>Function:</U> void <B>rl_display_match_list</B> <I>(char **matches, int len, int max)</I>
4259: <DD>A convenience function for displaying a list of strings in
4260: columnar format on Readline's output stream. <CODE>matches</CODE> is the list
4261: of strings, in argv format, such as a list of completion matches.
4262: <CODE>len</CODE> is the number of strings in <CODE>matches</CODE>, and <CODE>max</CODE>
4263: is the length of the longest string in <CODE>matches</CODE>. This function uses
4264: the setting of <CODE>print-completions-horizontally</CODE> to select how the
4265: matches are displayed (see section <A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A>).
4266: When displaying completions, this function sets the number of columns used
4267: for display to the value of <CODE>completion-display-width</CODE>, the value of
4268: the environment variable <CODE>COLUMNS</CODE>, or the screen width, in that order.
4269: </DL>
4270: </P><P>
4271:
4272: The following are implemented as macros, defined in <CODE>chardefs.h</CODE>.
4273: Applications should refrain from using them.
4274: </P><P>
4275:
1.1.1.2 ! misho 4276: <A NAME="IDX344"></A>
1.1 misho 4277: <DL>
4278: <DT><U>Function:</U> int <B>_rl_uppercase_p</B> <I>(int c)</I>
4279: <DD>Return 1 if <VAR>c</VAR> is an uppercase alphabetic character.
4280: </DL>
4281: </P><P>
4282:
1.1.1.2 ! misho 4283: <A NAME="IDX345"></A>
1.1 misho 4284: <DL>
4285: <DT><U>Function:</U> int <B>_rl_lowercase_p</B> <I>(int c)</I>
4286: <DD>Return 1 if <VAR>c</VAR> is a lowercase alphabetic character.
4287: </DL>
4288: </P><P>
4289:
1.1.1.2 ! misho 4290: <A NAME="IDX346"></A>
1.1 misho 4291: <DL>
4292: <DT><U>Function:</U> int <B>_rl_digit_p</B> <I>(int c)</I>
4293: <DD>Return 1 if <VAR>c</VAR> is a numeric character.
4294: </DL>
4295: </P><P>
4296:
1.1.1.2 ! misho 4297: <A NAME="IDX347"></A>
1.1 misho 4298: <DL>
4299: <DT><U>Function:</U> int <B>_rl_to_upper</B> <I>(int c)</I>
4300: <DD>If <VAR>c</VAR> is a lowercase alphabetic character, return the corresponding
4301: uppercase character.
4302: </DL>
4303: </P><P>
4304:
1.1.1.2 ! misho 4305: <A NAME="IDX348"></A>
1.1 misho 4306: <DL>
4307: <DT><U>Function:</U> int <B>_rl_to_lower</B> <I>(int c)</I>
4308: <DD>If <VAR>c</VAR> is an uppercase alphabetic character, return the corresponding
4309: lowercase character.
4310: </DL>
4311: </P><P>
4312:
1.1.1.2 ! misho 4313: <A NAME="IDX349"></A>
1.1 misho 4314: <DL>
4315: <DT><U>Function:</U> int <B>_rl_digit_value</B> <I>(int c)</I>
4316: <DD>If <VAR>c</VAR> is a number, return the value it represents.
4317: </DL>
4318: </P><P>
4319:
4320: <A NAME="Miscellaneous Functions"></A>
4321: <HR SIZE="6">
4322: <A NAME="SEC40"></A>
4323: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4324: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC39"> < </A>]</TD>
4325: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC41"> > </A>]</TD>
4326: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> << </A>]</TD>
4327: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
4328: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
4329: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
4330: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4331: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4332: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4333: </TR></TABLE>
4334: <H3> 2.4.11 Miscellaneous Functions </H3>
4335: <!--docid::SEC40::-->
4336: <P>
4337:
1.1.1.2 ! misho 4338: <A NAME="IDX350"></A>
1.1 misho 4339: <DL>
4340: <DT><U>Function:</U> int <B>rl_macro_bind</B> <I>(const char *keyseq, const char *macro, Keymap map)</I>
4341: <DD>Bind the key sequence <VAR>keyseq</VAR> to invoke the macro <VAR>macro</VAR>.
4342: The binding is performed in <VAR>map</VAR>. When <VAR>keyseq</VAR> is invoked, the
4343: <VAR>macro</VAR> will be inserted into the line. This function is deprecated;
4344: use <CODE>rl_generic_bind()</CODE> instead.
4345: </DL>
4346: </P><P>
4347:
1.1.1.2 ! misho 4348: <A NAME="IDX351"></A>
1.1 misho 4349: <DL>
4350: <DT><U>Function:</U> void <B>rl_macro_dumper</B> <I>(int readable)</I>
4351: <DD>Print the key sequences bound to macros and their values, using
4352: the current keymap, to <CODE>rl_outstream</CODE>.
4353: If <VAR>readable</VAR> is non-zero, the list is formatted in such a way
4354: that it can be made part of an <CODE>inputrc</CODE> file and re-read.
4355: </DL>
4356: </P><P>
4357:
1.1.1.2 ! misho 4358: <A NAME="IDX352"></A>
1.1 misho 4359: <DL>
4360: <DT><U>Function:</U> int <B>rl_variable_bind</B> <I>(const char *variable, const char *value)</I>
4361: <DD>Make the Readline variable <VAR>variable</VAR> have <VAR>value</VAR>.
4362: This behaves as if the readline command
4363: <SAMP>`set <VAR>variable</VAR> <VAR>value</VAR>'</SAMP> had been executed in an <CODE>inputrc</CODE>
4364: file (see section <A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A>).
4365: </DL>
4366: </P><P>
4367:
1.1.1.2 ! misho 4368: <A NAME="IDX353"></A>
1.1 misho 4369: <DL>
4370: <DT><U>Function:</U> char * <B>rl_variable_value</B> <I>(const char *variable)</I>
4371: <DD>Return a string representing the value of the Readline variable <VAR>variable</VAR>.
4372: For boolean variables, this string is either <SAMP>`on'</SAMP> or <SAMP>`off'</SAMP>.
4373: </DL>
4374: </P><P>
4375:
1.1.1.2 ! misho 4376: <A NAME="IDX354"></A>
1.1 misho 4377: <DL>
4378: <DT><U>Function:</U> void <B>rl_variable_dumper</B> <I>(int readable)</I>
4379: <DD>Print the readline variable names and their current values
4380: to <CODE>rl_outstream</CODE>.
4381: If <VAR>readable</VAR> is non-zero, the list is formatted in such a way
4382: that it can be made part of an <CODE>inputrc</CODE> file and re-read.
4383: </DL>
4384: </P><P>
4385:
1.1.1.2 ! misho 4386: <A NAME="IDX355"></A>
1.1 misho 4387: <DL>
4388: <DT><U>Function:</U> int <B>rl_set_paren_blink_timeout</B> <I>(int u)</I>
4389: <DD>Set the time interval (in microseconds) that Readline waits when showing
4390: a balancing character when <CODE>blink-matching-paren</CODE> has been enabled.
4391: </DL>
4392: </P><P>
4393:
1.1.1.2 ! misho 4394: <A NAME="IDX356"></A>
1.1 misho 4395: <DL>
4396: <DT><U>Function:</U> char * <B>rl_get_termcap</B> <I>(const char *cap)</I>
4397: <DD>Retrieve the string value of the termcap capability <VAR>cap</VAR>.
4398: Readline fetches the termcap entry for the current terminal name and
4399: uses those capabilities to move around the screen line and perform other
4400: terminal-specific operations, like erasing a line. Readline does not
4401: use all of a terminal's capabilities, and this function will return
4402: values for only those capabilities Readline uses.
4403: </DL>
4404: </P><P>
4405:
1.1.1.2 ! misho 4406: <A NAME="IDX357"></A>
1.1 misho 4407: <DL>
4408: <DT><U>Function:</U> void <B>rl_clear_history</B> <I>(void)</I>
4409: <DD>Clear the history list by deleting all of the entries, in the same manner
4410: as the History library's <CODE>clear_history()</CODE> function.
4411: This differs from <CODE>clear_history</CODE> because it frees private data
4412: Readline saves in the history list.
4413: </DL>
4414: </P><P>
4415:
1.1.1.2 ! misho 4416: <A NAME="IDX358"></A>
! 4417: <DL>
! 4418: <DT><U>Function:</U> void <B>rl_activate_mark</B> <I>(void)</I>
! 4419: <DD>Enable an <EM>active</EM> mark.
! 4420: When this is enabled, the text between point and mark (the <VAR>region</VAR>) is
! 4421: displayed in the terminal's standout mode (a <VAR>face</VAR>).
! 4422: This is called by various readline functions that set the mark and insert
! 4423: text, and is available for applications to call.
! 4424: </DL>
! 4425: </P><P>
! 4426:
! 4427: <A NAME="IDX359"></A>
! 4428: <DL>
! 4429: <DT><U>Function:</U> void <B>rl_deactivate_mark</B> <I>(void)</I>
! 4430: <DD>Turn off the active mark.
! 4431: </DL>
! 4432: </P><P>
! 4433:
! 4434: <A NAME="IDX360"></A>
! 4435: <DL>
! 4436: <DT><U>Function:</U> void <B>rl_keep_mark_active</B> <I>(void)</I>
! 4437: <DD>Indicate that the mark should remain active when the current readline function
! 4438: completes and after redisplay occurs.
! 4439: In most cases, the mark remains active for only the duration of a single
! 4440: bindable readline function.
! 4441: </DL>
! 4442: </P><P>
! 4443:
! 4444: <A NAME="IDX361"></A>
! 4445: <DL>
! 4446: <DT><U>Function:</U> int <B>rl_mark_active_p</B> <I>(void)</I>
! 4447: <DD>Return a non-zero value if the mark is currently active; zero otherwise.
! 4448: </DL>
! 4449: </P><P>
! 4450:
1.1 misho 4451: <A NAME="Alternate Interface"></A>
4452: <HR SIZE="6">
4453: <A NAME="SEC41"></A>
4454: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4455: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC40"> < </A>]</TD>
4456: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC42"> > </A>]</TD>
4457: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> << </A>]</TD>
4458: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
4459: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
4460: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
4461: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4462: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4463: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4464: </TR></TABLE>
4465: <H3> 2.4.12 Alternate Interface </H3>
4466: <!--docid::SEC41::-->
4467: <P>
4468:
4469: An alternate interface is available to plain <CODE>readline()</CODE>. Some
4470: applications need to interleave keyboard I/O with file, device, or
4471: window system I/O, typically by using a main loop to <CODE>select()</CODE>
4472: on various file descriptors. To accommodate this need, readline can
4473: also be invoked as a `callback' function from an event loop. There
4474: are functions available to make this easy.
4475: </P><P>
4476:
1.1.1.2 ! misho 4477: <A NAME="IDX362"></A>
1.1 misho 4478: <DL>
4479: <DT><U>Function:</U> void <B>rl_callback_handler_install</B> <I>(const char *prompt, rl_vcpfunc_t *lhandler)</I>
4480: <DD>Set up the terminal for readline I/O and display the initial
4481: expanded value of <VAR>prompt</VAR>. Save the value of <VAR>lhandler</VAR> to
4482: use as a handler function to call when a complete line of input has been
4483: entered.
4484: The handler function receives the text of the line as an argument.
1.1.1.2 ! misho 4485: As with <CODE>readline()</CODE>, the handler function should <CODE>free</CODE> the
! 4486: line when it it finished with it.
1.1 misho 4487: </DL>
4488: </P><P>
4489:
1.1.1.2 ! misho 4490: <A NAME="IDX363"></A>
1.1 misho 4491: <DL>
4492: <DT><U>Function:</U> void <B>rl_callback_read_char</B> <I>(void)</I>
4493: <DD>Whenever an application determines that keyboard input is available, it
4494: should call <CODE>rl_callback_read_char()</CODE>, which will read the next
4495: character from the current input source.
4496: If that character completes the line, <CODE>rl_callback_read_char</CODE> will
4497: invoke the <VAR>lhandler</VAR> function installed by
4498: <CODE>rl_callback_handler_install</CODE> to process the line.
4499: Before calling the <VAR>lhandler</VAR> function, the terminal settings are
4500: reset to the values they had before calling
4501: <CODE>rl_callback_handler_install</CODE>.
4502: If the <VAR>lhandler</VAR> function returns,
4503: and the line handler remains installed,
4504: the terminal settings are modified for Readline's use again.
4505: <CODE>EOF</CODE> is indicated by calling <VAR>lhandler</VAR> with a
4506: <CODE>NULL</CODE> line.
4507: </DL>
4508: </P><P>
4509:
1.1.1.2 ! misho 4510: <A NAME="IDX364"></A>
! 4511: <DL>
! 4512: <DT><U>Function:</U> void <B>rl_callback_sigcleanup</B> <I>(void)</I>
! 4513: <DD>Clean up any internal state the callback interface uses to maintain state
! 4514: between calls to rl_callback_read_char (e.g., the state of any active
! 4515: incremental searches). This is intended to be used by applications that
! 4516: wish to perform their own signal handling; Readline's internal signal handler
! 4517: calls this when appropriate.
! 4518: </DL>
! 4519: </P><P>
! 4520:
! 4521: <A NAME="IDX365"></A>
1.1 misho 4522: <DL>
4523: <DT><U>Function:</U> void <B>rl_callback_handler_remove</B> <I>(void)</I>
4524: <DD>Restore the terminal to its initial state and remove the line handler.
1.1.1.2 ! misho 4525: You may call this function from within a callback as well as independently.
1.1 misho 4526: If the <VAR>lhandler</VAR> installed by <CODE>rl_callback_handler_install</CODE>
4527: does not exit the program, either this function or the function referred
4528: to by the value of <CODE>rl_deprep_term_function</CODE> should be called before
4529: the program exits to reset the terminal settings.
4530: </DL>
4531: </P><P>
4532:
4533: <A NAME="A Readline Example"></A>
4534: <HR SIZE="6">
4535: <A NAME="SEC42"></A>
4536: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4537: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC41"> < </A>]</TD>
4538: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> > </A>]</TD>
4539: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> << </A>]</TD>
4540: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
4541: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
4542: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
4543: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4544: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4545: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4546: </TR></TABLE>
4547: <H3> 2.4.13 A Readline Example </H3>
4548: <!--docid::SEC42::-->
4549: <P>
4550:
4551: Here is a function which changes lowercase characters to their uppercase
4552: equivalents, and uppercase characters to lowercase. If
4553: this function was bound to <SAMP>`M-c'</SAMP>, then typing <SAMP>`M-c'</SAMP> would
4554: change the case of the character under point. Typing <SAMP>`M-1 0 M-c'</SAMP>
4555: would change the case of the following 10 characters, leaving the cursor on
4556: the last character changed.
4557: </P><P>
4558:
4559: <TABLE><tr><td> </td><td class=example><pre>/* Invert the case of the COUNT following characters. */
4560: int
4561: invert_case_line (count, key)
4562: int count, key;
4563: {
4564: register int start, end, i;
4565:
4566: start = rl_point;
4567:
4568: if (rl_point >= rl_end)
4569: return (0);
4570:
4571: if (count < 0)
4572: {
4573: direction = -1;
4574: count = -count;
4575: }
4576: else
4577: direction = 1;
4578:
4579: /* Find the end of the range to modify. */
4580: end = start + (count * direction);
4581:
4582: /* Force it to be within range. */
4583: if (end > rl_end)
4584: end = rl_end;
4585: else if (end < 0)
4586: end = 0;
4587:
4588: if (start == end)
4589: return (0);
4590:
4591: if (start > end)
4592: {
4593: int temp = start;
4594: start = end;
4595: end = temp;
4596: }
4597:
4598: /* Tell readline that we are modifying the line,
4599: so it will save the undo information. */
4600: rl_modifying (start, end);
4601:
4602: for (i = start; i != end; i++)
4603: {
4604: if (_rl_uppercase_p (rl_line_buffer[i]))
4605: rl_line_buffer[i] = _rl_to_lower (rl_line_buffer[i]);
4606: else if (_rl_lowercase_p (rl_line_buffer[i]))
4607: rl_line_buffer[i] = _rl_to_upper (rl_line_buffer[i]);
4608: }
4609: /* Move point to on top of the last character changed. */
4610: rl_point = (direction == 1) ? end - 1 : start;
4611: return (0);
4612: }
4613: </pre></td></tr></table></P><P>
4614:
4615: <A NAME="Alternate Interface Example"></A>
4616: <HR SIZE="6">
4617: <A NAME="SEC43"></A>
4618: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4619: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC42"> < </A>]</TD>
4620: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> > </A>]</TD>
4621: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC31"> << </A>]</TD>
4622: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC29"> Up </A>]</TD>
4623: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> >> </A>]</TD>
4624: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
4625: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4626: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4627: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4628: </TR></TABLE>
4629: <H3> 2.4.14 Alternate Interface Example </H3>
4630: <!--docid::SEC43::-->
4631: <P>
4632:
4633: Here is a complete program that illustrates Readline's alternate interface.
4634: It reads lines from the terminal and displays them, providing the
4635: standard history and TAB completion functions.
4636: It understands the EOF character or "exit" to exit the program.
4637: </P><P>
4638:
4639: <TABLE><tr><td> </td><td class=example><pre>/* Standard include files. stdio.h is required. */
4640: #include <stdlib.h>
1.1.1.2 ! misho 4641: #include <string.h>
1.1 misho 4642: #include <unistd.h>
1.1.1.2 ! misho 4643: #include <locale.h>
1.1 misho 4644:
4645: /* Used for select(2) */
4646: #include <sys/types.h>
4647: #include <sys/select.h>
4648:
1.1.1.2 ! misho 4649: #include <signal.h>
! 4650:
1.1 misho 4651: #include <stdio.h>
4652:
4653: /* Standard readline include files. */
4654: #include <readline/readline.h>
4655: #include <readline/history.h>
4656:
4657: static void cb_linehandler (char *);
1.1.1.2 ! misho 4658: static void sighandler (int);
1.1 misho 4659:
4660: int running;
1.1.1.2 ! misho 4661: int sigwinch_received;
1.1 misho 4662: const char *prompt = "rltest$ ";
4663:
1.1.1.2 ! misho 4664: /* Handle SIGWINCH and window size changes when readline is not active and
! 4665: reading a character. */
! 4666: static void
! 4667: sighandler (int sig)
! 4668: {
! 4669: sigwinch_received = 1;
! 4670: }
! 4671:
1.1 misho 4672: /* Callback function called for each line when accept-line executed, EOF
4673: seen, or EOF character read. This sets a flag and returns; it could
4674: also call exit(3). */
4675: static void
4676: cb_linehandler (char *line)
4677: {
4678: /* Can use ^D (stty eof) or `exit' to exit. */
4679: if (line == NULL || strcmp (line, "exit") == 0)
4680: {
4681: if (line == 0)
4682: printf ("\n");
4683: printf ("exit\n");
4684: /* This function needs to be called to reset the terminal settings,
4685: and calling it from the line handler keeps one extra prompt from
4686: being displayed. */
4687: rl_callback_handler_remove ();
4688:
4689: running = 0;
4690: }
4691: else
4692: {
4693: if (*line)
4694: add_history (line);
4695: printf ("input line: %s\n", line);
4696: free (line);
4697: }
4698: }
4699:
4700: int
4701: main (int c, char **v)
4702: {
4703: fd_set fds;
4704: int r;
4705:
1.1.1.2 ! misho 4706: /* Set the default locale values according to environment variables. */
! 4707: setlocale (LC_ALL, "");
! 4708:
! 4709: /* Handle window size changes when readline is not active and reading
! 4710: characters. */
! 4711: signal (SIGWINCH, sighandler);
! 4712:
1.1 misho 4713: /* Install the line handler. */
4714: rl_callback_handler_install (prompt, cb_linehandler);
4715:
4716: /* Enter a simple event loop. This waits until something is available
4717: to read on readline's input stream (defaults to standard input) and
4718: calls the builtin character read callback to read it. It does not
4719: have to modify the user's terminal settings. */
4720: running = 1;
4721: while (running)
4722: {
4723: FD_ZERO (&fds);
4724: FD_SET (fileno (rl_instream), &fds);
4725:
4726: r = select (FD_SETSIZE, &fds, NULL, NULL, NULL);
1.1.1.2 ! misho 4727: if (r < 0 && errno != EINTR)
1.1 misho 4728: {
4729: perror ("rltest: select");
4730: rl_callback_handler_remove ();
4731: break;
4732: }
1.1.1.2 ! misho 4733: if (sigwinch_received)
! 4734: {
! 4735: rl_resize_terminal ();
! 4736: sigwinch_received = 0;
! 4737: }
! 4738: if (r < 0)
! 4739: continue;
1.1 misho 4740:
4741: if (FD_ISSET (fileno (rl_instream), &fds))
4742: rl_callback_read_char ();
4743: }
4744:
4745: printf ("rltest: Event loop has exited\n");
4746: return 0;
4747: }
4748: </pre></td></tr></table></P><P>
4749:
4750: <A NAME="Readline Signal Handling"></A>
4751: <HR SIZE="6">
4752: <A NAME="SEC44"></A>
4753: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4754: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC43"> < </A>]</TD>
4755: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC45"> > </A>]</TD>
4756: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC45"> << </A>]</TD>
4757: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
4758: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> >> </A>]</TD>
4759: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
4760: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
4761: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
4762: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
4763: </TR></TABLE>
4764: <H2> 2.5 Readline Signal Handling </H2>
4765: <!--docid::SEC44::-->
4766: <P>
4767:
4768: Signals are asynchronous events sent to a process by the Unix kernel,
4769: sometimes on behalf of another process. They are intended to indicate
4770: exceptional events, like a user pressing the interrupt key on his terminal,
4771: or a network connection being broken. There is a class of signals that can
4772: be sent to the process currently reading input from the keyboard. Since
4773: Readline changes the terminal attributes when it is called, it needs to
4774: perform special processing when such a signal is received in order to
4775: restore the terminal to a sane state, or provide application writers with
4776: functions to do so manually.
4777: </P><P>
4778:
4779: Readline contains an internal signal handler that is installed for a
4780: number of signals (<CODE>SIGINT</CODE>, <CODE>SIGQUIT</CODE>, <CODE>SIGTERM</CODE>,
4781: <CODE>SIGHUP</CODE>,
4782: <CODE>SIGALRM</CODE>, <CODE>SIGTSTP</CODE>, <CODE>SIGTTIN</CODE>, and <CODE>SIGTTOU</CODE>).
4783: When one of these signals is received, the signal handler
4784: will reset the terminal attributes to those that were in effect before
4785: <CODE>readline()</CODE> was called, reset the signal handling to what it was
4786: before <CODE>readline()</CODE> was called, and resend the signal to the calling
4787: application.
4788: If and when the calling application's signal handler returns, Readline
4789: will reinitialize the terminal and continue to accept input.
4790: When a <CODE>SIGINT</CODE> is received, the Readline signal handler performs
4791: some additional work, which will cause any partially-entered line to be
4792: aborted (see the description of <CODE>rl_free_line_state()</CODE> below).
4793: </P><P>
4794:
4795: There is an additional Readline signal handler, for <CODE>SIGWINCH</CODE>, which
4796: the kernel sends to a process whenever the terminal's size changes (for
4797: example, if a user resizes an <CODE>xterm</CODE>). The Readline <CODE>SIGWINCH</CODE>
4798: handler updates Readline's internal screen size information, and then calls
4799: any <CODE>SIGWINCH</CODE> signal handler the calling application has installed.
4800: Readline calls the application's <CODE>SIGWINCH</CODE> signal handler without
4801: resetting the terminal to its original state. If the application's signal
4802: handler does more than update its idea of the terminal size and return (for
4803: example, a <CODE>longjmp</CODE> back to a main processing loop), it <EM>must</EM>
4804: call <CODE>rl_cleanup_after_signal()</CODE> (described below), to restore the
1.1.1.2 ! misho 4805: terminal state.
! 4806: </P><P>
! 4807:
! 4808: When an application is using the callback interface
! 4809: (see section <A HREF="readline.html#SEC41">2.4.12 Alternate Interface</A>), Readline installs signal handlers only for
! 4810: the duration of the call to <CODE>rl_callback_read_char</CODE>. Applications
! 4811: using the callback interface should be prepared to clean up Readline's
! 4812: state if they wish to handle the signal before the line handler completes
! 4813: and restores the terminal state.
! 4814: </P><P>
! 4815:
! 4816: If an application using the callback interface wishes to have Readline
! 4817: install its signal handlers at the time the application calls
! 4818: <CODE>rl_callback_handler_install</CODE> and remove them only when a complete
! 4819: line of input has been read, it should set the
! 4820: <CODE>rl_persistent_signal_handlers</CODE> variable to a non-zero value.
! 4821: This allows an application to defer all of the handling of the signals
! 4822: Readline catches to Readline.
! 4823: Applications should use this variable with care; it can result in Readline
! 4824: catching signals and not acting on them (or allowing the application to react
! 4825: to them) until the application calls <CODE>rl_callback_read_char</CODE>. This
! 4826: can result in an application becoming less responsive to keyboard signals
! 4827: like SIGINT.
! 4828: If an application does not want or need to perform any signal handling, or
! 4829: does not need to do any processing between calls to <CODE>rl_callback_read_char</CODE>,
! 4830: setting this variable may be desirable.
1.1 misho 4831: </P><P>
4832:
4833: Readline provides two variables that allow application writers to
4834: control whether or not it will catch certain signals and act on them
4835: when they are received. It is important that applications change the
4836: values of these variables only when calling <CODE>readline()</CODE>, not in
4837: a signal handler, so Readline's internal signal state is not corrupted.
4838: </P><P>
4839:
1.1.1.2 ! misho 4840: <A NAME="IDX366"></A>
1.1 misho 4841: <DL>
4842: <DT><U>Variable:</U> int <B>rl_catch_signals</B>
4843: <DD>If this variable is non-zero, Readline will install signal handlers for
4844: <CODE>SIGINT</CODE>, <CODE>SIGQUIT</CODE>, <CODE>SIGTERM</CODE>, <CODE>SIGHUP</CODE>, <CODE>SIGALRM</CODE>,
4845: <CODE>SIGTSTP</CODE>, <CODE>SIGTTIN</CODE>, and <CODE>SIGTTOU</CODE>.
4846: </P><P>
4847:
4848: The default value of <CODE>rl_catch_signals</CODE> is 1.
4849: </DL>
4850: </P><P>
4851:
1.1.1.2 ! misho 4852: <A NAME="IDX367"></A>
1.1 misho 4853: <DL>
4854: <DT><U>Variable:</U> int <B>rl_catch_sigwinch</B>
4855: <DD>If this variable is set to a non-zero value,
4856: Readline will install a signal handler for <CODE>SIGWINCH</CODE>.
4857: </P><P>
4858:
4859: The default value of <CODE>rl_catch_sigwinch</CODE> is 1.
4860: </DL>
4861: </P><P>
4862:
1.1.1.2 ! misho 4863: <A NAME="IDX368"></A>
! 4864: <DL>
! 4865: <DT><U>Variable:</U> int <B>rl_persistent_signal_handlers</B>
! 4866: <DD>If an application using the callback interface wishes Readline's signal
! 4867: handlers to be installed and active during the set of calls to
! 4868: <CODE>rl_callback_read_char</CODE> that constitutes an entire single line,
! 4869: it should set this variable to a non-zero value.
! 4870: </P><P>
! 4871:
! 4872: The default value of <CODE>rl_persistent_signal_handlers</CODE> is 0.
! 4873: </DL>
! 4874: </P><P>
! 4875:
! 4876: <A NAME="IDX369"></A>
1.1 misho 4877: <DL>
4878: <DT><U>Variable:</U> int <B>rl_change_environment</B>
4879: <DD>If this variable is set to a non-zero value,
4880: and Readline is handling <CODE>SIGWINCH</CODE>, Readline will modify the
4881: <VAR>LINES</VAR> and <VAR>COLUMNS</VAR> environment variables upon receipt of a
4882: <CODE>SIGWINCH</CODE>
4883: </P><P>
4884:
4885: The default value of <CODE>rl_change_environment</CODE> is 1.
4886: </DL>
4887: </P><P>
4888:
4889: If an application does not wish to have Readline catch any signals, or
4890: to handle signals other than those Readline catches (<CODE>SIGHUP</CODE>,
4891: for example),
4892: Readline provides convenience functions to do the necessary terminal
4893: and internal state cleanup upon receipt of a signal.
4894: </P><P>
4895:
1.1.1.2 ! misho 4896: <A NAME="IDX370"></A>
! 4897: <DL>
! 4898: <DT><U>Function:</U> int <B>rl_pending_signal</B> <I>(void)</I>
! 4899: <DD>Return the signal number of the most recent signal Readline received but
! 4900: has not yet handled, or 0 if there is no pending signal.
! 4901: </DL>
! 4902: </P><P>
! 4903:
! 4904: <A NAME="IDX371"></A>
1.1 misho 4905: <DL>
4906: <DT><U>Function:</U> void <B>rl_cleanup_after_signal</B> <I>(void)</I>
4907: <DD>This function will reset the state of the terminal to what it was before
4908: <CODE>readline()</CODE> was called, and remove the Readline signal handlers for
4909: all signals, depending on the values of <CODE>rl_catch_signals</CODE> and
4910: <CODE>rl_catch_sigwinch</CODE>.
4911: </DL>
4912: </P><P>
4913:
1.1.1.2 ! misho 4914: <A NAME="IDX372"></A>
1.1 misho 4915: <DL>
4916: <DT><U>Function:</U> void <B>rl_free_line_state</B> <I>(void)</I>
4917: <DD>This will free any partial state associated with the current input line
4918: (undo information, any partial history entry, any partially-entered
4919: keyboard macro, and any partially-entered numeric argument). This
4920: should be called before <CODE>rl_cleanup_after_signal()</CODE>. The
4921: Readline signal handler for <CODE>SIGINT</CODE> calls this to abort the
4922: current input line.
4923: </DL>
4924: </P><P>
4925:
1.1.1.2 ! misho 4926: <A NAME="IDX373"></A>
1.1 misho 4927: <DL>
4928: <DT><U>Function:</U> void <B>rl_reset_after_signal</B> <I>(void)</I>
4929: <DD>This will reinitialize the terminal and reinstall any Readline signal
4930: handlers, depending on the values of <CODE>rl_catch_signals</CODE> and
4931: <CODE>rl_catch_sigwinch</CODE>.
4932: </DL>
4933: </P><P>
4934:
1.1.1.2 ! misho 4935: If an application wants to force Readline to handle any signals that
! 4936: have arrived while it has been executing, <CODE>rl_check_signals()</CODE>
! 4937: will call Readline's internal signal handler if there are any pending
! 4938: signals. This is primarily intended for those applications that use
! 4939: a custom <CODE>rl_getc_function</CODE> (see section <A HREF="readline.html#SEC28">2.3 Readline Variables</A>) and wish
! 4940: to handle signals received while waiting for input.
! 4941: </P><P>
! 4942:
! 4943: <A NAME="IDX374"></A>
! 4944: <DL>
! 4945: <DT><U>Function:</U> void <B>rl_check_signals</B> <I>(void)</I>
! 4946: <DD>If there are any pending signals, call Readline's internal signal handling
! 4947: functions to process them. <CODE>rl_pending_signal()</CODE> can be used independently
! 4948: to determine whether or not there are any pending signals.
! 4949: </DL>
! 4950: </P><P>
! 4951:
1.1 misho 4952: If an application does not wish Readline to catch <CODE>SIGWINCH</CODE>, it may
4953: call <CODE>rl_resize_terminal()</CODE> or <CODE>rl_set_screen_size()</CODE> to force
1.1.1.2 ! misho 4954: Readline to update its idea of the terminal size when it receives
! 4955: a <CODE>SIGWINCH</CODE>.
1.1 misho 4956: </P><P>
4957:
1.1.1.2 ! misho 4958: <A NAME="IDX375"></A>
1.1 misho 4959: <DL>
4960: <DT><U>Function:</U> void <B>rl_echo_signal_char</B> <I>(int sig)</I>
4961: <DD>If an application wishes to install its own signal handlers, but still
4962: have readline display characters that generate signals, calling this
4963: function with <VAR>sig</VAR> set to <CODE>SIGINT</CODE>, <CODE>SIGQUIT</CODE>, or
4964: <CODE>SIGTSTP</CODE> will display the character generating that signal.
4965: </DL>
4966: </P><P>
4967:
1.1.1.2 ! misho 4968: <A NAME="IDX376"></A>
1.1 misho 4969: <DL>
4970: <DT><U>Function:</U> void <B>rl_resize_terminal</B> <I>(void)</I>
4971: <DD>Update Readline's internal screen size by reading values from the kernel.
4972: </DL>
4973: </P><P>
4974:
1.1.1.2 ! misho 4975: <A NAME="IDX377"></A>
1.1 misho 4976: <DL>
4977: <DT><U>Function:</U> void <B>rl_set_screen_size</B> <I>(int rows, int cols)</I>
4978: <DD>Set Readline's idea of the terminal size to <VAR>rows</VAR> rows and
4979: <VAR>cols</VAR> columns. If either <VAR>rows</VAR> or <VAR>columns</VAR> is less than
4980: or equal to 0, Readline's idea of that terminal dimension is unchanged.
1.1.1.2 ! misho 4981: This is intended to tell Readline the physical dimensions of the terminal,
! 4982: and is used internally to calculate the maximum number of characters that
! 4983: may appear on a single line and on the screen.
1.1 misho 4984: </DL>
4985: </P><P>
4986:
4987: If an application does not want to install a <CODE>SIGWINCH</CODE> handler, but
1.1.1.2 ! misho 4988: is still interested in the screen dimensions, it may query Readline's idea
! 4989: of the screen size.
1.1 misho 4990: </P><P>
4991:
1.1.1.2 ! misho 4992: <A NAME="IDX378"></A>
1.1 misho 4993: <DL>
4994: <DT><U>Function:</U> void <B>rl_get_screen_size</B> <I>(int *rows, int *cols)</I>
4995: <DD>Return Readline's idea of the terminal's size in the
4996: variables pointed to by the arguments.
4997: </DL>
4998: </P><P>
4999:
1.1.1.2 ! misho 5000: <A NAME="IDX379"></A>
1.1 misho 5001: <DL>
5002: <DT><U>Function:</U> void <B>rl_reset_screen_size</B> <I>(void)</I>
5003: <DD>Cause Readline to reobtain the screen size and recalculate its dimensions.
5004: </DL>
5005: </P><P>
5006:
5007: The following functions install and remove Readline's signal handlers.
5008: </P><P>
5009:
1.1.1.2 ! misho 5010: <A NAME="IDX380"></A>
1.1 misho 5011: <DL>
5012: <DT><U>Function:</U> int <B>rl_set_signals</B> <I>(void)</I>
5013: <DD>Install Readline's signal handler for <CODE>SIGINT</CODE>, <CODE>SIGQUIT</CODE>,
5014: <CODE>SIGTERM</CODE>, <CODE>SIGHUP</CODE>, <CODE>SIGALRM</CODE>, <CODE>SIGTSTP</CODE>, <CODE>SIGTTIN</CODE>,
5015: <CODE>SIGTTOU</CODE>, and <CODE>SIGWINCH</CODE>, depending on the values of
5016: <CODE>rl_catch_signals</CODE> and <CODE>rl_catch_sigwinch</CODE>.
5017: </DL>
5018: </P><P>
5019:
1.1.1.2 ! misho 5020: <A NAME="IDX381"></A>
1.1 misho 5021: <DL>
5022: <DT><U>Function:</U> int <B>rl_clear_signals</B> <I>(void)</I>
5023: <DD>Remove all of the Readline signal handlers installed by
5024: <CODE>rl_set_signals()</CODE>.
5025: </DL>
5026: </P><P>
5027:
5028: <A NAME="Custom Completers"></A>
5029: <HR SIZE="6">
5030: <A NAME="SEC45"></A>
5031: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5032: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC44"> < </A>]</TD>
5033: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC46"> > </A>]</TD>
5034: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
5035: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> Up </A>]</TD>
5036: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> >> </A>]</TD>
5037: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
5038: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5039: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5040: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5041: </TR></TABLE>
5042: <H2> 2.6 Custom Completers </H2>
5043: <!--docid::SEC45::-->
5044: <P>
5045:
5046: Typically, a program that reads commands from the user has a way of
5047: disambiguating commands and data. If your program is one of these, then
5048: it can provide completion for commands, data, or both.
5049: The following sections describe how your program and Readline
5050: cooperate to provide this service.
5051: </P><P>
5052:
5053: <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
5054: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC46">2.6.1 How Completing Works</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">The logic used to do completion.</TD></TR>
5055: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC47">2.6.2 Completion Functions</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Functions provided by Readline.</TD></TR>
5056: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Variables which control completion.</TD></TR>
5057: <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="readline.html#SEC49">2.6.4 A Short Completion Example</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">An example of writing completer subroutines.</TD></TR>
5058: </TABLE></BLOCKQUOTE>
5059: <P>
5060:
5061: <A NAME="How Completing Works"></A>
5062: <HR SIZE="6">
5063: <A NAME="SEC46"></A>
5064: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5065: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC45"> < </A>]</TD>
5066: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC47"> > </A>]</TD>
5067: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
5068: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC45"> Up </A>]</TD>
5069: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> >> </A>]</TD>
5070: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
5071: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5072: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5073: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5074: </TR></TABLE>
5075: <H3> 2.6.1 How Completing Works </H3>
5076: <!--docid::SEC46::-->
5077: <P>
5078:
5079: In order to complete some text, the full list of possible completions
5080: must be available. That is, it is not possible to accurately
5081: expand a partial word without knowing all of the possible words
5082: which make sense in that context. The Readline library provides
5083: the user interface to completion, and two of the most common
5084: completion functions: filename and username. For completing other types
5085: of text, you must write your own completion function. This section
5086: describes exactly what such functions must do, and provides an example.
5087: </P><P>
5088:
5089: There are three major functions used to perform completion:
5090: </P><P>
5091:
5092: <OL>
5093: <LI>
5094: The user-interface function <CODE>rl_complete()</CODE>. This function is
5095: called with the same arguments as other bindable Readline functions:
5096: <VAR>count</VAR> and <VAR>invoking_key</VAR>.
5097: It isolates the word to be completed and calls
5098: <CODE>rl_completion_matches()</CODE> to generate a list of possible completions.
5099: It then either lists the possible completions, inserts the possible
5100: completions, or actually performs the
5101: completion, depending on which behavior is desired.
5102: <P>
5103:
5104: <LI>
5105: The internal function <CODE>rl_completion_matches()</CODE> uses an
5106: application-supplied <EM>generator</EM> function to generate the list of
5107: possible matches, and then returns the array of these matches.
5108: The caller should place the address of its generator function in
5109: <CODE>rl_completion_entry_function</CODE>.
5110: <P>
5111:
5112: <LI>
5113: The generator function is called repeatedly from
5114: <CODE>rl_completion_matches()</CODE>, returning a string each time. The
5115: arguments to the generator function are <VAR>text</VAR> and <VAR>state</VAR>.
5116: <VAR>text</VAR> is the partial word to be completed. <VAR>state</VAR> is zero the
5117: first time the function is called, allowing the generator to perform
5118: any necessary initialization, and a positive non-zero integer for
5119: each subsequent call. The generator function returns
5120: <CODE>(char *)NULL</CODE> to inform <CODE>rl_completion_matches()</CODE> that there are
5121: no more possibilities left. Usually the generator function computes the
5122: list of possible completions when <VAR>state</VAR> is zero, and returns them
5123: one at a time on subsequent calls. Each string the generator function
5124: returns as a match must be allocated with <CODE>malloc()</CODE>; Readline
5125: frees the strings when it has finished with them.
5126: Such a generator function is referred to as an
5127: <EM>application-specific completion function</EM>.
5128: <P>
5129:
5130: </OL>
5131: <P>
5132:
1.1.1.2 ! misho 5133: <A NAME="IDX382"></A>
1.1 misho 5134: <DL>
5135: <DT><U>Function:</U> int <B>rl_complete</B> <I>(int ignore, int invoking_key)</I>
5136: <DD>Complete the word at or before point. You have supplied the function
5137: that does the initial simple matching selection algorithm (see
5138: <CODE>rl_completion_matches()</CODE>). The default is to do filename completion.
5139: </DL>
5140: </P><P>
5141:
1.1.1.2 ! misho 5142: <A NAME="IDX383"></A>
1.1 misho 5143: <DL>
5144: <DT><U>Variable:</U> rl_compentry_func_t * <B>rl_completion_entry_function</B>
5145: <DD>This is a pointer to the generator function for
5146: <CODE>rl_completion_matches()</CODE>.
5147: If the value of <CODE>rl_completion_entry_function</CODE> is
5148: <CODE>NULL</CODE> then the default filename generator
5149: function, <CODE>rl_filename_completion_function()</CODE>, is used.
5150: An <EM>application-specific completion function</EM> is a function whose
5151: address is assigned to <CODE>rl_completion_entry_function</CODE> and whose
5152: return values are used to generate possible completions.
5153: </DL>
5154: </P><P>
5155:
5156: <A NAME="Completion Functions"></A>
5157: <HR SIZE="6">
5158: <A NAME="SEC47"></A>
5159: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5160: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC46"> < </A>]</TD>
5161: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC48"> > </A>]</TD>
5162: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC48"> << </A>]</TD>
5163: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC45"> Up </A>]</TD>
5164: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> >> </A>]</TD>
5165: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
5166: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5167: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5168: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5169: </TR></TABLE>
5170: <H3> 2.6.2 Completion Functions </H3>
5171: <!--docid::SEC47::-->
5172: <P>
5173:
5174: Here is the complete list of callable completion functions present in
5175: Readline.
5176: </P><P>
5177:
1.1.1.2 ! misho 5178: <A NAME="IDX384"></A>
1.1 misho 5179: <DL>
5180: <DT><U>Function:</U> int <B>rl_complete_internal</B> <I>(int what_to_do)</I>
5181: <DD>Complete the word at or before point. <VAR>what_to_do</VAR> says what to do
5182: with the completion. A value of <SAMP>`?'</SAMP> means list the possible
5183: completions. <SAMP>`TAB'</SAMP> means do standard completion. <SAMP>`*'</SAMP> means
5184: insert all of the possible completions. <SAMP>`!'</SAMP> means to display
5185: all of the possible completions, if there is more than one, as well as
5186: performing partial completion. <SAMP>`@'</SAMP> is similar to <SAMP>`!'</SAMP>, but
5187: possible completions are not listed if the possible completions share
5188: a common prefix.
5189: </DL>
5190: </P><P>
5191:
1.1.1.2 ! misho 5192: <A NAME="IDX385"></A>
1.1 misho 5193: <DL>
5194: <DT><U>Function:</U> int <B>rl_complete</B> <I>(int ignore, int invoking_key)</I>
5195: <DD>Complete the word at or before point. You have supplied the function
5196: that does the initial simple matching selection algorithm (see
5197: <CODE>rl_completion_matches()</CODE> and <CODE>rl_completion_entry_function</CODE>).
5198: The default is to do filename
5199: completion. This calls <CODE>rl_complete_internal()</CODE> with an
5200: argument depending on <VAR>invoking_key</VAR>.
5201: </DL>
5202: </P><P>
5203:
1.1.1.2 ! misho 5204: <A NAME="IDX386"></A>
1.1 misho 5205: <DL>
5206: <DT><U>Function:</U> int <B>rl_possible_completions</B> <I>(int count, int invoking_key)</I>
5207: <DD>List the possible completions. See description of <CODE>rl_complete
5208: ()</CODE>. This calls <CODE>rl_complete_internal()</CODE> with an argument of
5209: <SAMP>`?'</SAMP>.
5210: </DL>
5211: </P><P>
5212:
1.1.1.2 ! misho 5213: <A NAME="IDX387"></A>
1.1 misho 5214: <DL>
5215: <DT><U>Function:</U> int <B>rl_insert_completions</B> <I>(int count, int invoking_key)</I>
5216: <DD>Insert the list of possible completions into the line, deleting the
5217: partially-completed word. See description of <CODE>rl_complete()</CODE>.
5218: This calls <CODE>rl_complete_internal()</CODE> with an argument of <SAMP>`*'</SAMP>.
5219: </DL>
5220: </P><P>
5221:
1.1.1.2 ! misho 5222: <A NAME="IDX388"></A>
1.1 misho 5223: <DL>
5224: <DT><U>Function:</U> int <B>rl_completion_mode</B> <I>(rl_command_func_t *cfunc)</I>
5225: <DD>Returns the appropriate value to pass to <CODE>rl_complete_internal()</CODE>
5226: depending on whether <VAR>cfunc</VAR> was called twice in succession and
5227: the values of the <CODE>show-all-if-ambiguous</CODE> and
5228: <CODE>show-all-if-unmodified</CODE> variables.
5229: Application-specific completion functions may use this function to present
5230: the same interface as <CODE>rl_complete()</CODE>.
5231: </DL>
5232: </P><P>
5233:
1.1.1.2 ! misho 5234: <A NAME="IDX389"></A>
1.1 misho 5235: <DL>
5236: <DT><U>Function:</U> char ** <B>rl_completion_matches</B> <I>(const char *text, rl_compentry_func_t *entry_func)</I>
5237: <DD>Returns an array of strings which is a list of completions for
5238: <VAR>text</VAR>. If there are no completions, returns <CODE>NULL</CODE>.
5239: The first entry in the returned array is the substitution for <VAR>text</VAR>.
5240: The remaining entries are the possible completions. The array is
5241: terminated with a <CODE>NULL</CODE> pointer.
5242: </P><P>
5243:
5244: <VAR>entry_func</VAR> is a function of two args, and returns a
5245: <CODE>char *</CODE>. The first argument is <VAR>text</VAR>. The second is a
5246: state argument; it is zero on the first call, and non-zero on subsequent
5247: calls. <VAR>entry_func</VAR> returns a <CODE>NULL</CODE> pointer to the caller
5248: when there are no more matches.
5249: </DL>
5250: </P><P>
5251:
1.1.1.2 ! misho 5252: <A NAME="IDX390"></A>
1.1 misho 5253: <DL>
5254: <DT><U>Function:</U> char * <B>rl_filename_completion_function</B> <I>(const char *text, int state)</I>
5255: <DD>A generator function for filename completion in the general case.
5256: <VAR>text</VAR> is a partial filename.
5257: The Bash source is a useful reference for writing application-specific
5258: completion functions (the Bash completion functions call this and other
5259: Readline functions).
5260: </DL>
5261: </P><P>
5262:
1.1.1.2 ! misho 5263: <A NAME="IDX391"></A>
1.1 misho 5264: <DL>
5265: <DT><U>Function:</U> char * <B>rl_username_completion_function</B> <I>(const char *text, int state)</I>
5266: <DD>A completion generator for usernames. <VAR>text</VAR> contains a partial
5267: username preceded by a random character (usually <SAMP>`~'</SAMP>). As with all
5268: completion generators, <VAR>state</VAR> is zero on the first call and non-zero
5269: for subsequent calls.
5270: </DL>
5271: </P><P>
5272:
5273: <A NAME="Completion Variables"></A>
5274: <HR SIZE="6">
5275: <A NAME="SEC48"></A>
5276: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5277: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC47"> < </A>]</TD>
5278: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> > </A>]</TD>
5279: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> << </A>]</TD>
5280: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC45"> Up </A>]</TD>
5281: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> >> </A>]</TD>
5282: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
5283: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5284: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5285: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5286: </TR></TABLE>
5287: <H3> 2.6.3 Completion Variables </H3>
5288: <!--docid::SEC48::-->
5289: <P>
5290:
1.1.1.2 ! misho 5291: <A NAME="IDX392"></A>
1.1 misho 5292: <DL>
5293: <DT><U>Variable:</U> rl_compentry_func_t * <B>rl_completion_entry_function</B>
5294: <DD>A pointer to the generator function for <CODE>rl_completion_matches()</CODE>.
5295: <CODE>NULL</CODE> means to use <CODE>rl_filename_completion_function()</CODE>,
5296: the default filename completer.
5297: </DL>
5298: </P><P>
5299:
1.1.1.2 ! misho 5300: <A NAME="IDX393"></A>
1.1 misho 5301: <DL>
5302: <DT><U>Variable:</U> rl_completion_func_t * <B>rl_attempted_completion_function</B>
5303: <DD>A pointer to an alternative function to create matches.
5304: The function is called with <VAR>text</VAR>, <VAR>start</VAR>, and <VAR>end</VAR>.
5305: <VAR>start</VAR> and <VAR>end</VAR> are indices in <CODE>rl_line_buffer</CODE> defining
5306: the boundaries of <VAR>text</VAR>, which is a character string.
5307: If this function exists and returns <CODE>NULL</CODE>, or if this variable is
5308: set to <CODE>NULL</CODE>, then <CODE>rl_complete()</CODE> will call the value of
5309: <CODE>rl_completion_entry_function</CODE> to generate matches, otherwise the
5310: array of strings returned will be used.
5311: If this function sets the <CODE>rl_attempted_completion_over</CODE>
5312: variable to a non-zero value, Readline will not perform its default
5313: completion even if this function returns no matches.
5314: </DL>
5315: </P><P>
5316:
1.1.1.2 ! misho 5317: <A NAME="IDX394"></A>
1.1 misho 5318: <DL>
5319: <DT><U>Variable:</U> rl_quote_func_t * <B>rl_filename_quoting_function</B>
5320: <DD>A pointer to a function that will quote a filename in an
5321: application-specific fashion. This is called if filename completion is being
5322: attempted and one of the characters in <CODE>rl_filename_quote_characters</CODE>
5323: appears in a completed filename. The function is called with
5324: <VAR>text</VAR>, <VAR>match_type</VAR>, and <VAR>quote_pointer</VAR>. The <VAR>text</VAR>
5325: is the filename to be quoted. The <VAR>match_type</VAR> is either
5326: <CODE>SINGLE_MATCH</CODE>, if there is only one completion match, or
5327: <CODE>MULT_MATCH</CODE>. Some functions use this to decide whether or not to
5328: insert a closing quote character. The <VAR>quote_pointer</VAR> is a pointer
5329: to any opening quote character the user typed. Some functions choose
5330: to reset this character.
5331: </DL>
5332: </P><P>
5333:
1.1.1.2 ! misho 5334: <A NAME="IDX395"></A>
1.1 misho 5335: <DL>
5336: <DT><U>Variable:</U> rl_dequote_func_t * <B>rl_filename_dequoting_function</B>
5337: <DD>A pointer to a function that will remove application-specific quoting
5338: characters from a filename before completion is attempted, so those
5339: characters do not interfere with matching the text against names in
5340: the filesystem. It is called with <VAR>text</VAR>, the text of the word
5341: to be dequoted, and <VAR>quote_char</VAR>, which is the quoting character
5342: that delimits the filename (usually <SAMP>`''</SAMP> or <SAMP>`"'</SAMP>). If
5343: <VAR>quote_char</VAR> is zero, the filename was not in an embedded string.
5344: </DL>
5345: </P><P>
5346:
1.1.1.2 ! misho 5347: <A NAME="IDX396"></A>
1.1 misho 5348: <DL>
5349: <DT><U>Variable:</U> rl_linebuf_func_t * <B>rl_char_is_quoted_p</B>
5350: <DD>A pointer to a function to call that determines whether or not a specific
5351: character in the line buffer is quoted, according to whatever quoting
5352: mechanism the program calling Readline uses. The function is called with
5353: two arguments: <VAR>text</VAR>, the text of the line, and <VAR>index</VAR>, the
5354: index of the character in the line. It is used to decide whether a
5355: character found in <CODE>rl_completer_word_break_characters</CODE> should be
5356: used to break words for the completer.
5357: </DL>
5358: </P><P>
5359:
1.1.1.2 ! misho 5360: <A NAME="IDX397"></A>
1.1 misho 5361: <DL>
5362: <DT><U>Variable:</U> rl_compignore_func_t * <B>rl_ignore_some_completions_function</B>
5363: <DD>This function, if defined, is called by the completer when real filename
5364: completion is done, after all the matching names have been generated.
5365: It is passed a <CODE>NULL</CODE> terminated array of matches.
5366: The first element (<CODE>matches[0]</CODE>) is the
5367: maximal substring common to all matches. This function can
5368: re-arrange the list of matches as required, but each element deleted
5369: from the array must be freed.
5370: </DL>
5371: </P><P>
5372:
1.1.1.2 ! misho 5373: <A NAME="IDX398"></A>
1.1 misho 5374: <DL>
5375: <DT><U>Variable:</U> rl_icppfunc_t * <B>rl_directory_completion_hook</B>
5376: <DD>This function, if defined, is allowed to modify the directory portion
5377: of filenames Readline completes.
5378: It could be used to expand symbolic links or shell variables in pathnames.
5379: It is called with the address of a string (the current directory name) as an
5380: argument, and may modify that string.
5381: If the string is replaced with a new string, the old value should be freed.
5382: Any modified directory name should have a trailing slash.
5383: The modified value will be used as part of the completion, replacing
5384: the directory portion of the pathname the user typed.
5385: At the least, even if no other expansion is performed, this function should
5386: remove any quote characters from the directory name, because its result will
5387: be passed directly to <CODE>opendir()</CODE>.
5388: </P><P>
5389:
5390: The directory completion hook returns an integer that should be non-zero if
5391: the function modifies its directory argument.
5392: The function should not modify the directory argument if it returns 0.
5393: </DL>
5394: </P><P>
5395:
1.1.1.2 ! misho 5396: <A NAME="IDX399"></A>
1.1 misho 5397: <DL>
5398: <DT><U>Variable:</U> rl_icppfunc_t * <B>rl_directory_rewrite_hook;</B>
5399: <DD>If non-zero, this is the address of a function to call when completing
5400: a directory name. This function takes the address of the directory name
5401: to be modified as an argument. Unlike <CODE>rl_directory_completion_hook</CODE>,
5402: it only modifies the directory name used in <CODE>opendir</CODE>, not what is
5403: displayed when the possible completions are printed or inserted. It is
5404: called before rl_directory_completion_hook.
5405: At the least, even if no other expansion is performed, this function should
5406: remove any quote characters from the directory name, because its result will
5407: be passed directly to <CODE>opendir()</CODE>.
5408: </P><P>
5409:
5410: The directory rewrite hook returns an integer that should be non-zero if
1.1.1.2 ! misho 5411: the function modifies its directory argument.
1.1 misho 5412: The function should not modify the directory argument if it returns 0.
5413: </DL>
5414: </P><P>
5415:
1.1.1.2 ! misho 5416: <A NAME="IDX400"></A>
1.1 misho 5417: <DL>
5418: <DT><U>Variable:</U> rl_icppfunc_t * <B>rl_filename_stat_hook</B>
5419: <DD>If non-zero, this is the address of a function for the completer to
5420: call before deciding which character to append to a completed name.
5421: This function modifies its filename name argument, and the modified value
5422: is passed to <CODE>stat()</CODE> to determine the file's type and characteristics.
5423: This function does not need to remove quote characters from the filename.
5424: </P><P>
5425:
5426: The stat hook returns an integer that should be non-zero if
1.1.1.2 ! misho 5427: the function modifies its directory argument.
1.1 misho 5428: The function should not modify the directory argument if it returns 0.
5429: </DL>
5430: </P><P>
5431:
1.1.1.2 ! misho 5432: <A NAME="IDX401"></A>
1.1 misho 5433: <DL>
5434: <DT><U>Variable:</U> rl_dequote_func_t * <B>rl_filename_rewrite_hook</B>
5435: <DD>If non-zero, this is the address of a function called when reading
5436: directory entries from the filesystem for completion and comparing
5437: them to the partial word to be completed. The function should
5438: perform any necessary application or system-specific conversion on
5439: the filename, such as converting between character sets or converting
5440: from a filesystem format to a character input format.
5441: The function takes two arguments: <VAR>fname</VAR>, the filename to be converted,
5442: and <VAR>fnlen</VAR>, its length in bytes.
5443: It must either return its first argument (if no conversion takes place)
5444: or the converted filename in newly-allocated memory. The converted
5445: form is used to compare against the word to be completed, and, if it
5446: matches, is added to the list of matches. Readline will free the
5447: allocated string.
5448: </DL>
5449: </P><P>
5450:
1.1.1.2 ! misho 5451: <A NAME="IDX402"></A>
1.1 misho 5452: <DL>
5453: <DT><U>Variable:</U> rl_compdisp_func_t * <B>rl_completion_display_matches_hook</B>
5454: <DD>If non-zero, then this is the address of a function to call when
5455: completing a word would normally display the list of possible matches.
5456: This function is called in lieu of Readline displaying the list.
5457: It takes three arguments:
5458: (<CODE>char **</CODE><VAR>matches</VAR>, <CODE>int</CODE> <VAR>num_matches</VAR>, <CODE>int</CODE> <VAR>max_length</VAR>)
5459: where <VAR>matches</VAR> is the array of matching strings,
5460: <VAR>num_matches</VAR> is the number of strings in that array, and
5461: <VAR>max_length</VAR> is the length of the longest string in that array.
5462: Readline provides a convenience function, <CODE>rl_display_match_list</CODE>,
1.1.1.2 ! misho 5463: that takes care of doing the display to Readline's output stream.
! 5464: You may call that function from this hook.
1.1 misho 5465: </DL>
5466: </P><P>
5467:
1.1.1.2 ! misho 5468: <A NAME="IDX403"></A>
1.1 misho 5469: <DL>
5470: <DT><U>Variable:</U> const char * <B>rl_basic_word_break_characters</B>
5471: <DD>The basic list of characters that signal a break between words for the
5472: completer routine. The default value of this variable is the characters
5473: which break words for completion in Bash:
5474: <CODE>" \t\n\"\\'`@$><=;|&{("</CODE>.
5475: </DL>
5476: </P><P>
5477:
1.1.1.2 ! misho 5478: <A NAME="IDX404"></A>
1.1 misho 5479: <DL>
5480: <DT><U>Variable:</U> const char * <B>rl_basic_quote_characters</B>
5481: <DD>A list of quote characters which can cause a word break.
5482: </DL>
5483: </P><P>
5484:
1.1.1.2 ! misho 5485: <A NAME="IDX405"></A>
1.1 misho 5486: <DL>
5487: <DT><U>Variable:</U> const char * <B>rl_completer_word_break_characters</B>
5488: <DD>The list of characters that signal a break between words for
5489: <CODE>rl_complete_internal()</CODE>. The default list is the value of
5490: <CODE>rl_basic_word_break_characters</CODE>.
5491: </DL>
5492: </P><P>
5493:
1.1.1.2 ! misho 5494: <A NAME="IDX406"></A>
1.1 misho 5495: <DL>
5496: <DT><U>Variable:</U> rl_cpvfunc_t * <B>rl_completion_word_break_hook</B>
5497: <DD>If non-zero, this is the address of a function to call when Readline is
5498: deciding where to separate words for word completion. It should return
5499: a character string like <CODE>rl_completer_word_break_characters</CODE> to be
5500: used to perform the current completion. The function may choose to set
5501: <CODE>rl_completer_word_break_characters</CODE> itself. If the function
5502: returns <CODE>NULL</CODE>, <CODE>rl_completer_word_break_characters</CODE> is used.
5503: </DL>
5504: </P><P>
5505:
1.1.1.2 ! misho 5506: <A NAME="IDX407"></A>
1.1 misho 5507: <DL>
5508: <DT><U>Variable:</U> const char * <B>rl_completer_quote_characters</B>
5509: <DD>A list of characters which can be used to quote a substring of the line.
5510: Completion occurs on the entire substring, and within the substring
5511: <CODE>rl_completer_word_break_characters</CODE> are treated as any other character,
5512: unless they also appear within this list.
5513: </DL>
5514: </P><P>
5515:
1.1.1.2 ! misho 5516: <A NAME="IDX408"></A>
1.1 misho 5517: <DL>
5518: <DT><U>Variable:</U> const char * <B>rl_filename_quote_characters</B>
5519: <DD>A list of characters that cause a filename to be quoted by the completer
5520: when they appear in a completed filename. The default is the null string.
5521: </DL>
5522: </P><P>
5523:
1.1.1.2 ! misho 5524: <A NAME="IDX409"></A>
1.1 misho 5525: <DL>
5526: <DT><U>Variable:</U> const char * <B>rl_special_prefixes</B>
5527: <DD>The list of characters that are word break characters, but should be
5528: left in <VAR>text</VAR> when it is passed to the completion function.
5529: Programs can use this to help determine what kind of completing to do.
5530: For instance, Bash sets this variable to "$@" so that it can complete
5531: shell variables and hostnames.
5532: </DL>
5533: </P><P>
5534:
1.1.1.2 ! misho 5535: <A NAME="IDX410"></A>
1.1 misho 5536: <DL>
5537: <DT><U>Variable:</U> int <B>rl_completion_query_items</B>
5538: <DD>Up to this many items will be displayed in response to a
5539: possible-completions call. After that, readline asks the user if she is sure
5540: she wants to see them all. The default value is 100. A negative value
5541: indicates that Readline should never ask the user.
5542: </DL>
5543: </P><P>
5544:
1.1.1.2 ! misho 5545: <A NAME="IDX411"></A>
1.1 misho 5546: <DL>
5547: <DT><U>Variable:</U> int <B>rl_completion_append_character</B>
5548: <DD>When a single completion alternative matches at the end of the command
5549: line, this character is appended to the inserted completion text. The
5550: default is a space character (<SAMP>` '</SAMP>). Setting this to the null
5551: character (<SAMP>`\0'</SAMP>) prevents anything being appended automatically.
5552: This can be changed in application-specific completion functions to
5553: provide the "most sensible word separator character" according to
5554: an application-specific command line syntax specification.
1.1.1.2 ! misho 5555: It is set to the default before any application-specific completion function
! 5556: is called, and may only be changed within such a function.
1.1 misho 5557: </DL>
5558: </P><P>
5559:
1.1.1.2 ! misho 5560: <A NAME="IDX412"></A>
1.1 misho 5561: <DL>
5562: <DT><U>Variable:</U> int <B>rl_completion_suppress_append</B>
5563: <DD>If non-zero, <VAR>rl_completion_append_character</VAR> is not appended to
5564: matches at the end of the command line, as described above.
5565: It is set to 0 before any application-specific completion function
5566: is called, and may only be changed within such a function.
5567: </DL>
5568: </P><P>
5569:
1.1.1.2 ! misho 5570: <A NAME="IDX413"></A>
1.1 misho 5571: <DL>
5572: <DT><U>Variable:</U> int <B>rl_completion_quote_character</B>
5573: <DD>When Readline is completing quoted text, as delimited by one of the
5574: characters in <VAR>rl_completer_quote_characters</VAR>, it sets this variable
5575: to the quoting character found.
5576: This is set before any application-specific completion function is called.
5577: </DL>
5578: </P><P>
5579:
1.1.1.2 ! misho 5580: <A NAME="IDX414"></A>
1.1 misho 5581: <DL>
5582: <DT><U>Variable:</U> int <B>rl_completion_suppress_quote</B>
5583: <DD>If non-zero, Readline does not append a matching quote character when
5584: performing completion on a quoted string.
5585: It is set to 0 before any application-specific completion function
5586: is called, and may only be changed within such a function.
5587: </DL>
5588: </P><P>
5589:
1.1.1.2 ! misho 5590: <A NAME="IDX415"></A>
1.1 misho 5591: <DL>
5592: <DT><U>Variable:</U> int <B>rl_completion_found_quote</B>
5593: <DD>When Readline is completing quoted text, it sets this variable
5594: to a non-zero value if the word being completed contains or is delimited
5595: by any quoting characters, including backslashes.
5596: This is set before any application-specific completion function is called.
5597: </DL>
5598: </P><P>
5599:
1.1.1.2 ! misho 5600: <A NAME="IDX416"></A>
1.1 misho 5601: <DL>
5602: <DT><U>Variable:</U> int <B>rl_completion_mark_symlink_dirs</B>
5603: <DD>If non-zero, a slash will be appended to completed filenames that are
5604: symbolic links to directory names, subject to the value of the
5605: user-settable <VAR>mark-directories</VAR> variable.
5606: This variable exists so that application-specific completion functions
5607: can override the user's global preference (set via the
5608: <VAR>mark-symlinked-directories</VAR> Readline variable) if appropriate.
5609: This variable is set to the user's preference before any
5610: application-specific completion function is called, so unless that
5611: function modifies the value, the user's preferences are honored.
5612: </DL>
5613: </P><P>
5614:
1.1.1.2 ! misho 5615: <A NAME="IDX417"></A>
1.1 misho 5616: <DL>
5617: <DT><U>Variable:</U> int <B>rl_ignore_completion_duplicates</B>
5618: <DD>If non-zero, then duplicates in the matches are removed.
5619: The default is 1.
5620: </DL>
5621: </P><P>
5622:
1.1.1.2 ! misho 5623: <A NAME="IDX418"></A>
1.1 misho 5624: <DL>
5625: <DT><U>Variable:</U> int <B>rl_filename_completion_desired</B>
5626: <DD>Non-zero means that the results of the matches are to be treated as
5627: filenames. This is <EM>always</EM> zero when completion is attempted,
5628: and can only be changed
5629: within an application-specific completion function. If it is set to a
5630: non-zero value by such a function, directory names have a slash appended
5631: and Readline attempts to quote completed filenames if they contain any
5632: characters in <CODE>rl_filename_quote_characters</CODE> and
5633: <CODE>rl_filename_quoting_desired</CODE> is set to a non-zero value.
5634: </DL>
5635: </P><P>
5636:
1.1.1.2 ! misho 5637: <A NAME="IDX419"></A>
1.1 misho 5638: <DL>
5639: <DT><U>Variable:</U> int <B>rl_filename_quoting_desired</B>
5640: <DD>Non-zero means that the results of the matches are to be quoted using
5641: double quotes (or an application-specific quoting mechanism) if the
5642: completed filename contains any characters in
5643: <CODE>rl_filename_quote_chars</CODE>. This is <EM>always</EM> non-zero
5644: when completion is attempted, and can only be changed within an
5645: application-specific completion function.
5646: The quoting is effected via a call to the function pointed to
5647: by <CODE>rl_filename_quoting_function</CODE>.
5648: </DL>
5649: </P><P>
5650:
1.1.1.2 ! misho 5651: <A NAME="IDX420"></A>
1.1 misho 5652: <DL>
5653: <DT><U>Variable:</U> int <B>rl_attempted_completion_over</B>
5654: <DD>If an application-specific completion function assigned to
5655: <CODE>rl_attempted_completion_function</CODE> sets this variable to a non-zero
5656: value, Readline will not perform its default filename completion even
5657: if the application's completion function returns no matches.
5658: It should be set only by an application's completion function.
5659: </DL>
5660: </P><P>
5661:
1.1.1.2 ! misho 5662: <A NAME="IDX421"></A>
1.1 misho 5663: <DL>
5664: <DT><U>Variable:</U> int <B>rl_sort_completion_matches</B>
5665: <DD>If an application sets this variable to 0, Readline will not sort the
5666: list of completions (which implies that it cannot remove any duplicate
5667: completions). The default value is 1, which means that Readline will
5668: sort the completions and, depending on the value of
5669: <CODE>rl_ignore_completion_duplicates</CODE>, will attempt to remove duplicate
5670: matches.
5671: </DL>
5672: </P><P>
5673:
1.1.1.2 ! misho 5674: <A NAME="IDX422"></A>
1.1 misho 5675: <DL>
5676: <DT><U>Variable:</U> int <B>rl_completion_type</B>
5677: <DD>Set to a character describing the type of completion Readline is currently
5678: attempting; see the description of <CODE>rl_complete_internal()</CODE>
5679: (see section <A HREF="readline.html#SEC47">2.6.2 Completion Functions</A>) for the list of characters.
5680: This is set to the appropriate value before any application-specific
5681: completion function is called, allowing such functions to present
5682: the same interface as <CODE>rl_complete()</CODE>.
5683: </DL>
5684: </P><P>
5685:
1.1.1.2 ! misho 5686: <A NAME="IDX423"></A>
1.1 misho 5687: <DL>
5688: <DT><U>Variable:</U> int <B>rl_completion_invoking_key</B>
5689: <DD>Set to the final character in the key sequence that invoked one of the
5690: completion functions that call <CODE>rl_complete_internal()</CODE>. This is
5691: set to the appropriate value before any application-specific completion
5692: function is called.
5693: </DL>
5694: </P><P>
5695:
1.1.1.2 ! misho 5696: <A NAME="IDX424"></A>
1.1 misho 5697: <DL>
5698: <DT><U>Variable:</U> int <B>rl_inhibit_completion</B>
5699: <DD>If this variable is non-zero, completion is inhibited. The completion
5700: character will be inserted as any other bound to <CODE>self-insert</CODE>.
5701: </DL>
5702: </P><P>
5703:
5704: <A NAME="A Short Completion Example"></A>
5705: <HR SIZE="6">
5706: <A NAME="SEC49"></A>
5707: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5708: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC48"> < </A>]</TD>
5709: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> > </A>]</TD>
5710: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
5711: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC45"> Up </A>]</TD>
5712: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> >> </A>]</TD>
5713: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
5714: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
5715: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
5716: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
5717: </TR></TABLE>
5718: <H3> 2.6.4 A Short Completion Example </H3>
5719: <!--docid::SEC49::-->
5720: <P>
5721:
5722: Here is a small application demonstrating the use of the GNU Readline
5723: library. It is called <CODE>fileman</CODE>, and the source code resides in
5724: <TT>`examples/fileman.c'</TT>. This sample application provides
5725: completion of command names, line editing features, and access to the
5726: history list.
5727: </P><P>
5728:
5729: <TABLE><tr><td> </td><td class=smallexample><FONT SIZE=-1><pre>/* fileman.c -- A tiny application which demonstrates how to use the
5730: GNU Readline library. This application interactively allows users
5731: to manipulate files and their modes. */
5732:
5733: #ifdef HAVE_CONFIG_H
5734: # include <config.h>
5735: #endif
5736:
5737: #include <sys/types.h>
5738: #ifdef HAVE_SYS_FILE_H
5739: # include <sys/file.h>
5740: #endif
5741: #include <sys/stat.h>
5742:
5743: #ifdef HAVE_UNISTD_H
5744: # include <unistd.h>
5745: #endif
5746:
5747: #include <fcntl.h>
5748: #include <stdio.h>
5749: #include <errno.h>
5750:
5751: #if defined (HAVE_STRING_H)
5752: # include <string.h>
5753: #else /* !HAVE_STRING_H */
5754: # include <strings.h>
5755: #endif /* !HAVE_STRING_H */
5756:
5757: #ifdef HAVE_STDLIB_H
5758: # include <stdlib.h>
5759: #endif
5760:
5761: #include <time.h>
5762:
5763: #include <readline/readline.h>
5764: #include <readline/history.h>
5765:
5766: extern char *xmalloc PARAMS((size_t));
5767:
5768: /* The names of functions that actually do the manipulation. */
5769: int com_list PARAMS((char *));
5770: int com_view PARAMS((char *));
5771: int com_rename PARAMS((char *));
5772: int com_stat PARAMS((char *));
5773: int com_pwd PARAMS((char *));
5774: int com_delete PARAMS((char *));
5775: int com_help PARAMS((char *));
5776: int com_cd PARAMS((char *));
5777: int com_quit PARAMS((char *));
5778:
5779: /* A structure which contains information on the commands this program
5780: can understand. */
5781:
5782: typedef struct {
5783: char *name; /* User printable name of the function. */
5784: rl_icpfunc_t *func; /* Function to call to do the job. */
5785: char *doc; /* Documentation for this function. */
5786: } COMMAND;
5787:
5788: COMMAND commands[] = {
5789: { "cd", com_cd, "Change to directory DIR" },
5790: { "delete", com_delete, "Delete FILE" },
5791: { "help", com_help, "Display this text" },
5792: { "?", com_help, "Synonym for `help'" },
5793: { "list", com_list, "List files in DIR" },
5794: { "ls", com_list, "Synonym for `list'" },
5795: { "pwd", com_pwd, "Print the current working directory" },
5796: { "quit", com_quit, "Quit using Fileman" },
5797: { "rename", com_rename, "Rename FILE to NEWNAME" },
5798: { "stat", com_stat, "Print out statistics on FILE" },
5799: { "view", com_view, "View the contents of FILE" },
5800: { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL }
5801: };
5802:
5803: /* Forward declarations. */
5804: char *stripwhite ();
5805: COMMAND *find_command ();
5806:
5807: /* The name of this program, as taken from argv[0]. */
5808: char *progname;
5809:
5810: /* When non-zero, this global means the user is done using this program. */
5811: int done;
5812:
5813: char *
5814: dupstr (s)
5815: char *s;
5816: {
5817: char *r;
5818:
5819: r = xmalloc (strlen (s) + 1);
5820: strcpy (r, s);
5821: return (r);
5822: }
5823:
5824: main (argc, argv)
5825: int argc;
5826: char **argv;
5827: {
5828: char *line, *s;
5829:
5830: progname = argv[0];
5831:
5832: initialize_readline (); /* Bind our completer. */
5833:
5834: /* Loop reading and executing lines until the user quits. */
5835: for ( ; done == 0; )
5836: {
5837: line = readline ("FileMan: ");
5838:
5839: if (!line)
5840: break;
5841:
5842: /* Remove leading and trailing whitespace from the line.
5843: Then, if there is anything left, add it to the history list
5844: and execute it. */
5845: s = stripwhite (line);
5846:
5847: if (*s)
5848: {
5849: add_history (s);
5850: execute_line (s);
5851: }
5852:
5853: free (line);
5854: }
5855: exit (0);
5856: }
5857:
5858: /* Execute a command line. */
5859: int
5860: execute_line (line)
5861: char *line;
5862: {
5863: register int i;
5864: COMMAND *command;
5865: char *word;
5866:
5867: /* Isolate the command word. */
5868: i = 0;
5869: while (line[i] && whitespace (line[i]))
5870: i++;
5871: word = line + i;
5872:
5873: while (line[i] && !whitespace (line[i]))
5874: i++;
5875:
5876: if (line[i])
5877: line[i++] = '\0';
5878:
5879: command = find_command (word);
5880:
5881: if (!command)
5882: {
5883: fprintf (stderr, "%s: No such command for FileMan.\n", word);
5884: return (-1);
5885: }
5886:
5887: /* Get argument to command, if any. */
5888: while (whitespace (line[i]))
5889: i++;
5890:
5891: word = line + i;
5892:
5893: /* Call the function. */
5894: return ((*(command->func)) (word));
5895: }
5896:
5897: /* Look up NAME as the name of a command, and return a pointer to that
5898: command. Return a NULL pointer if NAME isn't a command name. */
5899: COMMAND *
5900: find_command (name)
5901: char *name;
5902: {
5903: register int i;
5904:
5905: for (i = 0; commands[i].name; i++)
5906: if (strcmp (name, commands[i].name) == 0)
5907: return (&commands[i]);
5908:
5909: return ((COMMAND *)NULL);
5910: }
5911:
5912: /* Strip whitespace from the start and end of STRING. Return a pointer
5913: into STRING. */
5914: char *
5915: stripwhite (string)
5916: char *string;
5917: {
5918: register char *s, *t;
5919:
5920: for (s = string; whitespace (*s); s++)
5921: ;
5922:
5923: if (*s == 0)
5924: return (s);
5925:
5926: t = s + strlen (s) - 1;
5927: while (t > s && whitespace (*t))
5928: t--;
5929: *++t = '\0';
5930:
5931: return s;
5932: }
5933:
5934: /* **************************************************************** */
5935: /* */
5936: /* Interface to Readline Completion */
5937: /* */
5938: /* **************************************************************** */
5939:
5940: char *command_generator PARAMS((const char *, int));
5941: char **fileman_completion PARAMS((const char *, int, int));
5942:
5943: /* Tell the GNU Readline library how to complete. We want to try to complete
5944: on command names if this is the first word in the line, or on filenames
5945: if not. */
5946: initialize_readline ()
5947: {
5948: /* Allow conditional parsing of the ~/.inputrc file. */
5949: rl_readline_name = "FileMan";
5950:
5951: /* Tell the completer that we want a crack first. */
5952: rl_attempted_completion_function = fileman_completion;
5953: }
5954:
5955: /* Attempt to complete on the contents of TEXT. START and END bound the
5956: region of rl_line_buffer that contains the word to complete. TEXT is
5957: the word to complete. We can use the entire contents of rl_line_buffer
5958: in case we want to do some simple parsing. Return the array of matches,
5959: or NULL if there aren't any. */
5960: char **
5961: fileman_completion (text, start, end)
5962: const char *text;
5963: int start, end;
5964: {
5965: char **matches;
5966:
5967: matches = (char **)NULL;
5968:
5969: /* If this word is at the start of the line, then it is a command
5970: to complete. Otherwise it is the name of a file in the current
5971: directory. */
5972: if (start == 0)
5973: matches = rl_completion_matches (text, command_generator);
5974:
5975: return (matches);
5976: }
5977:
5978: /* Generator function for command completion. STATE lets us know whether
5979: to start from scratch; without any state (i.e. STATE == 0), then we
5980: start at the top of the list. */
5981: char *
5982: command_generator (text, state)
5983: const char *text;
5984: int state;
5985: {
5986: static int list_index, len;
5987: char *name;
5988:
5989: /* If this is a new word to complete, initialize now. This includes
5990: saving the length of TEXT for efficiency, and initializing the index
5991: variable to 0. */
5992: if (!state)
5993: {
5994: list_index = 0;
5995: len = strlen (text);
5996: }
5997:
5998: /* Return the next name which partially matches from the command list. */
5999: while (name = commands[list_index].name)
6000: {
6001: list_index++;
6002:
6003: if (strncmp (name, text, len) == 0)
6004: return (dupstr(name));
6005: }
6006:
6007: /* If no names matched, then return NULL. */
6008: return ((char *)NULL);
6009: }
6010:
6011: /* **************************************************************** */
6012: /* */
6013: /* FileMan Commands */
6014: /* */
6015: /* **************************************************************** */
6016:
6017: /* String to pass to system (). This is for the LIST, VIEW and RENAME
6018: commands. */
6019: static char syscom[1024];
6020:
6021: /* List the file(s) named in arg. */
6022: com_list (arg)
6023: char *arg;
6024: {
6025: if (!arg)
6026: arg = "";
6027:
6028: sprintf (syscom, "ls -FClg %s", arg);
6029: return (system (syscom));
6030: }
6031:
6032: com_view (arg)
6033: char *arg;
6034: {
6035: if (!valid_argument ("view", arg))
6036: return 1;
6037:
6038: #if defined (__MSDOS__)
6039: /* more.com doesn't grok slashes in pathnames */
6040: sprintf (syscom, "less %s", arg);
6041: #else
6042: sprintf (syscom, "more %s", arg);
6043: #endif
6044: return (system (syscom));
6045: }
6046:
6047: com_rename (arg)
6048: char *arg;
6049: {
6050: too_dangerous ("rename");
6051: return (1);
6052: }
6053:
6054: com_stat (arg)
6055: char *arg;
6056: {
6057: struct stat finfo;
6058:
6059: if (!valid_argument ("stat", arg))
6060: return (1);
6061:
6062: if (stat (arg, &finfo) == -1)
6063: {
6064: perror (arg);
6065: return (1);
6066: }
6067:
6068: printf ("Statistics for `%s':\n", arg);
6069:
6070: printf ("%s has %d link%s, and is %d byte%s in length.\n",
6071: arg,
6072: finfo.st_nlink,
6073: (finfo.st_nlink == 1) ? "" : "s",
6074: finfo.st_size,
6075: (finfo.st_size == 1) ? "" : "s");
6076: printf ("Inode Last Change at: %s", ctime (&finfo.st_ctime));
6077: printf (" Last access at: %s", ctime (&finfo.st_atime));
6078: printf (" Last modified at: %s", ctime (&finfo.st_mtime));
6079: return (0);
6080: }
6081:
6082: com_delete (arg)
6083: char *arg;
6084: {
6085: too_dangerous ("delete");
6086: return (1);
6087: }
6088:
6089: /* Print out help for ARG, or for all of the commands if ARG is
6090: not present. */
6091: com_help (arg)
6092: char *arg;
6093: {
6094: register int i;
6095: int printed = 0;
6096:
6097: for (i = 0; commands[i].name; i++)
6098: {
6099: if (!*arg || (strcmp (arg, commands[i].name) == 0))
6100: {
6101: printf ("%s\t\t%s.\n", commands[i].name, commands[i].doc);
6102: printed++;
6103: }
6104: }
6105:
6106: if (!printed)
6107: {
1.1.1.2 ! misho 6108: printf ("No commands match `%s'. Possibilities are:\n", arg);
1.1 misho 6109:
6110: for (i = 0; commands[i].name; i++)
6111: {
6112: /* Print in six columns. */
6113: if (printed == 6)
6114: {
6115: printed = 0;
6116: printf ("\n");
6117: }
6118:
6119: printf ("%s\t", commands[i].name);
6120: printed++;
6121: }
6122:
6123: if (printed)
6124: printf ("\n");
6125: }
6126: return (0);
6127: }
6128:
6129: /* Change to the directory ARG. */
6130: com_cd (arg)
6131: char *arg;
6132: {
6133: if (chdir (arg) == -1)
6134: {
6135: perror (arg);
6136: return 1;
6137: }
6138:
6139: com_pwd ("");
6140: return (0);
6141: }
6142:
6143: /* Print out the current working directory. */
6144: com_pwd (ignore)
6145: char *ignore;
6146: {
6147: char dir[1024], *s;
6148:
6149: s = getcwd (dir, sizeof(dir) - 1);
6150: if (s == 0)
6151: {
6152: printf ("Error getting pwd: %s\n", dir);
6153: return 1;
6154: }
6155:
6156: printf ("Current directory is %s\n", dir);
6157: return 0;
6158: }
6159:
6160: /* The user wishes to quit using this program. Just set DONE non-zero. */
6161: com_quit (arg)
6162: char *arg;
6163: {
6164: done = 1;
6165: return (0);
6166: }
6167:
6168: /* Function which tells you that you can't do this. */
6169: too_dangerous (caller)
6170: char *caller;
6171: {
6172: fprintf (stderr,
6173: "%s: Too dangerous for me to distribute. Write it yourself.\n",
6174: caller);
6175: }
6176:
6177: /* Return non-zero if ARG is a valid argument for CALLER, else print
6178: an error message and return zero. */
6179: int
6180: valid_argument (caller, arg)
6181: char *caller, *arg;
6182: {
6183: if (!arg || !*arg)
6184: {
6185: fprintf (stderr, "%s: Argument required.\n", caller);
6186: return (0);
6187: }
6188:
6189: return (1);
6190: }
6191: </FONT></pre></td></tr></table></P><P>
6192:
6193: <A NAME="GNU Free Documentation License"></A>
6194: <HR SIZE="6">
6195: <A NAME="SEC50"></A>
6196: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6197: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC49"> < </A>]</TD>
6198: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52"> > </A>]</TD>
6199: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC23"> << </A>]</TD>
6200: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> Up </A>]</TD>
6201: <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
6202: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
6203: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
6204: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
6205: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
6206: </TR></TABLE>
6207: <H1> A. GNU Free Documentation License </H1>
6208: <!--docid::SEC50::-->
6209: <P>
6210:
6211: <center>
6212: Version 1.3, 3 November 2008
6213: </center>
6214: </P><P>
6215:
6216: <TABLE><tr><td> </td><td class=display><pre style="font-family: serif">Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
6217: <A HREF="http://fsf.org/">http://fsf.org/</A>
6218:
6219: Everyone is permitted to copy and distribute verbatim copies
6220: of this license document, but changing it is not allowed.
6221: </pre></td></tr></table></P><P>
6222:
6223: <OL>
6224: <LI>
6225: PREAMBLE
6226: <P>
6227:
6228: The purpose of this License is to make a manual, textbook, or other
6229: functional and useful document <EM>free</EM> in the sense of freedom: to
6230: assure everyone the effective freedom to copy and redistribute it,
6231: with or without modifying it, either commercially or noncommercially.
6232: Secondarily, this License preserves for the author and publisher a way
6233: to get credit for their work, while not being considered responsible
6234: for modifications made by others.
6235: </P><P>
6236:
6237: This License is a kind of "copyleft", which means that derivative
6238: works of the document must themselves be free in the same sense. It
6239: complements the GNU General Public License, which is a copyleft
6240: license designed for free software.
6241: </P><P>
6242:
6243: We have designed this License in order to use it for manuals for free
6244: software, because free software needs free documentation: a free
6245: program should come with manuals providing the same freedoms that the
6246: software does. But this License is not limited to software manuals;
6247: it can be used for any textual work, regardless of subject matter or
6248: whether it is published as a printed book. We recommend this License
6249: principally for works whose purpose is instruction or reference.
6250: </P><P>
6251:
6252: <LI>
6253: APPLICABILITY AND DEFINITIONS
6254: <P>
6255:
6256: This License applies to any manual or other work, in any medium, that
6257: contains a notice placed by the copyright holder saying it can be
6258: distributed under the terms of this License. Such a notice grants a
6259: world-wide, royalty-free license, unlimited in duration, to use that
6260: work under the conditions stated herein. The "Document", below,
6261: refers to any such manual or work. Any member of the public is a
6262: licensee, and is addressed as "you". You accept the license if you
6263: copy, modify or distribute the work in a way requiring permission
6264: under copyright law.
6265: </P><P>
6266:
6267: A "Modified Version" of the Document means any work containing the
6268: Document or a portion of it, either copied verbatim, or with
6269: modifications and/or translated into another language.
6270: </P><P>
6271:
6272: A "Secondary Section" is a named appendix or a front-matter section
6273: of the Document that deals exclusively with the relationship of the
6274: publishers or authors of the Document to the Document's overall
6275: subject (or to related matters) and contains nothing that could fall
6276: directly within that overall subject. (Thus, if the Document is in
6277: part a textbook of mathematics, a Secondary Section may not explain
6278: any mathematics.) The relationship could be a matter of historical
6279: connection with the subject or with related matters, or of legal,
6280: commercial, philosophical, ethical or political position regarding
6281: them.
6282: </P><P>
6283:
6284: The "Invariant Sections" are certain Secondary Sections whose titles
6285: are designated, as being those of Invariant Sections, in the notice
6286: that says that the Document is released under this License. If a
6287: section does not fit the above definition of Secondary then it is not
6288: allowed to be designated as Invariant. The Document may contain zero
6289: Invariant Sections. If the Document does not identify any Invariant
6290: Sections then there are none.
6291: </P><P>
6292:
6293: The "Cover Texts" are certain short passages of text that are listed,
6294: as Front-Cover Texts or Back-Cover Texts, in the notice that says that
6295: the Document is released under this License. A Front-Cover Text may
6296: be at most 5 words, and a Back-Cover Text may be at most 25 words.
6297: </P><P>
6298:
6299: A "Transparent" copy of the Document means a machine-readable copy,
6300: represented in a format whose specification is available to the
6301: general public, that is suitable for revising the document
6302: straightforwardly with generic text editors or (for images composed of
6303: pixels) generic paint programs or (for drawings) some widely available
6304: drawing editor, and that is suitable for input to text formatters or
6305: for automatic translation to a variety of formats suitable for input
6306: to text formatters. A copy made in an otherwise Transparent file
6307: format whose markup, or absence of markup, has been arranged to thwart
6308: or discourage subsequent modification by readers is not Transparent.
6309: An image format is not Transparent if used for any substantial amount
6310: of text. A copy that is not "Transparent" is called "Opaque".
6311: </P><P>
6312:
6313: Examples of suitable formats for Transparent copies include plain
6314: ASCII without markup, Texinfo input format, LaTeX input
6315: format, <FONT SIZE="-1">SGML</FONT> or <FONT SIZE="-1">XML</FONT> using a publicly available
6316: <FONT SIZE="-1">DTD</FONT>, and standard-conforming simple <FONT SIZE="-1">HTML</FONT>,
6317: PostScript or <FONT SIZE="-1">PDF</FONT> designed for human modification. Examples
6318: of transparent image formats include <FONT SIZE="-1">PNG</FONT>, <FONT SIZE="-1">XCF</FONT> and
6319: <FONT SIZE="-1">JPG</FONT>. Opaque formats include proprietary formats that can be
6320: read and edited only by proprietary word processors, <FONT SIZE="-1">SGML</FONT> or
6321: <FONT SIZE="-1">XML</FONT> for which the <FONT SIZE="-1">DTD</FONT> and/or processing tools are
6322: not generally available, and the machine-generated <FONT SIZE="-1">HTML</FONT>,
6323: PostScript or <FONT SIZE="-1">PDF</FONT> produced by some word processors for
6324: output purposes only.
6325: </P><P>
6326:
6327: The "Title Page" means, for a printed book, the title page itself,
6328: plus such following pages as are needed to hold, legibly, the material
6329: this License requires to appear in the title page. For works in
6330: formats which do not have any title page as such, "Title Page" means
6331: the text near the most prominent appearance of the work's title,
6332: preceding the beginning of the body of the text.
6333: </P><P>
6334:
6335: The "publisher" means any person or entity that distributes copies
6336: of the Document to the public.
6337: </P><P>
6338:
6339: A section "Entitled XYZ" means a named subunit of the Document whose
6340: title either is precisely XYZ or contains XYZ in parentheses following
6341: text that translates XYZ in another language. (Here XYZ stands for a
6342: specific section name mentioned below, such as "Acknowledgements",
6343: "Dedications", "Endorsements", or "History".) To "Preserve the Title"
6344: of such a section when you modify the Document means that it remains a
6345: section "Entitled XYZ" according to this definition.
6346: </P><P>
6347:
6348: The Document may include Warranty Disclaimers next to the notice which
6349: states that this License applies to the Document. These Warranty
6350: Disclaimers are considered to be included by reference in this
6351: License, but only as regards disclaiming warranties: any other
6352: implication that these Warranty Disclaimers may have is void and has
6353: no effect on the meaning of this License.
6354: </P><P>
6355:
6356: <LI>
6357: VERBATIM COPYING
6358: <P>
6359:
6360: You may copy and distribute the Document in any medium, either
6361: commercially or noncommercially, provided that this License, the
6362: copyright notices, and the license notice saying this License applies
6363: to the Document are reproduced in all copies, and that you add no other
6364: conditions whatsoever to those of this License. You may not use
6365: technical measures to obstruct or control the reading or further
6366: copying of the copies you make or distribute. However, you may accept
6367: compensation in exchange for copies. If you distribute a large enough
6368: number of copies you must also follow the conditions in section 3.
6369: </P><P>
6370:
6371: You may also lend copies, under the same conditions stated above, and
6372: you may publicly display copies.
6373: </P><P>
6374:
6375: <LI>
6376: COPYING IN QUANTITY
6377: <P>
6378:
6379: If you publish printed copies (or copies in media that commonly have
6380: printed covers) of the Document, numbering more than 100, and the
6381: Document's license notice requires Cover Texts, you must enclose the
6382: copies in covers that carry, clearly and legibly, all these Cover
6383: Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
6384: the back cover. Both covers must also clearly and legibly identify
6385: you as the publisher of these copies. The front cover must present
6386: the full title with all words of the title equally prominent and
6387: visible. You may add other material on the covers in addition.
6388: Copying with changes limited to the covers, as long as they preserve
6389: the title of the Document and satisfy these conditions, can be treated
6390: as verbatim copying in other respects.
6391: </P><P>
6392:
6393: If the required texts for either cover are too voluminous to fit
6394: legibly, you should put the first ones listed (as many as fit
6395: reasonably) on the actual cover, and continue the rest onto adjacent
6396: pages.
6397: </P><P>
6398:
6399: If you publish or distribute Opaque copies of the Document numbering
6400: more than 100, you must either include a machine-readable Transparent
6401: copy along with each Opaque copy, or state in or with each Opaque copy
6402: a computer-network location from which the general network-using
6403: public has access to download using public-standard network protocols
6404: a complete Transparent copy of the Document, free of added material.
6405: If you use the latter option, you must take reasonably prudent steps,
6406: when you begin distribution of Opaque copies in quantity, to ensure
6407: that this Transparent copy will remain thus accessible at the stated
6408: location until at least one year after the last time you distribute an
6409: Opaque copy (directly or through your agents or retailers) of that
6410: edition to the public.
6411: </P><P>
6412:
6413: It is requested, but not required, that you contact the authors of the
6414: Document well before redistributing any large number of copies, to give
6415: them a chance to provide you with an updated version of the Document.
6416: </P><P>
6417:
6418: <LI>
6419: MODIFICATIONS
6420: <P>
6421:
6422: You may copy and distribute a Modified Version of the Document under
6423: the conditions of sections 2 and 3 above, provided that you release
6424: the Modified Version under precisely this License, with the Modified
6425: Version filling the role of the Document, thus licensing distribution
6426: and modification of the Modified Version to whoever possesses a copy
6427: of it. In addition, you must do these things in the Modified Version:
6428: </P><P>
6429:
6430: <OL>
6431: <LI>
6432: Use in the Title Page (and on the covers, if any) a title distinct
6433: from that of the Document, and from those of previous versions
6434: (which should, if there were any, be listed in the History section
6435: of the Document). You may use the same title as a previous version
6436: if the original publisher of that version gives permission.
6437: <P>
6438:
6439: <LI>
6440: List on the Title Page, as authors, one or more persons or entities
6441: responsible for authorship of the modifications in the Modified
6442: Version, together with at least five of the principal authors of the
6443: Document (all of its principal authors, if it has fewer than five),
6444: unless they release you from this requirement.
6445: <P>
6446:
6447: <LI>
6448: State on the Title page the name of the publisher of the
6449: Modified Version, as the publisher.
6450: <P>
6451:
6452: <LI>
6453: Preserve all the copyright notices of the Document.
6454: <P>
6455:
6456: <LI>
6457: Add an appropriate copyright notice for your modifications
6458: adjacent to the other copyright notices.
6459: <P>
6460:
6461: <LI>
6462: Include, immediately after the copyright notices, a license notice
6463: giving the public permission to use the Modified Version under the
6464: terms of this License, in the form shown in the Addendum below.
6465: <P>
6466:
6467: <LI>
6468: Preserve in that license notice the full lists of Invariant Sections
6469: and required Cover Texts given in the Document's license notice.
6470: <P>
6471:
6472: <LI>
6473: Include an unaltered copy of this License.
6474: <P>
6475:
6476: <LI>
6477: Preserve the section Entitled "History", Preserve its Title, and add
6478: to it an item stating at least the title, year, new authors, and
6479: publisher of the Modified Version as given on the Title Page. If
6480: there is no section Entitled "History" in the Document, create one
6481: stating the title, year, authors, and publisher of the Document as
6482: given on its Title Page, then add an item describing the Modified
6483: Version as stated in the previous sentence.
6484: <P>
6485:
6486: <LI>
6487: Preserve the network location, if any, given in the Document for
6488: public access to a Transparent copy of the Document, and likewise
6489: the network locations given in the Document for previous versions
6490: it was based on. These may be placed in the "History" section.
6491: You may omit a network location for a work that was published at
6492: least four years before the Document itself, or if the original
6493: publisher of the version it refers to gives permission.
6494: <P>
6495:
6496: <LI>
6497: For any section Entitled "Acknowledgements" or "Dedications", Preserve
6498: the Title of the section, and preserve in the section all the
6499: substance and tone of each of the contributor acknowledgements and/or
6500: dedications given therein.
6501: <P>
6502:
6503: <LI>
6504: Preserve all the Invariant Sections of the Document,
6505: unaltered in their text and in their titles. Section numbers
6506: or the equivalent are not considered part of the section titles.
6507: <P>
6508:
6509: <LI>
6510: Delete any section Entitled "Endorsements". Such a section
6511: may not be included in the Modified Version.
6512: <P>
6513:
6514: <LI>
6515: Do not retitle any existing section to be Entitled "Endorsements" or
6516: to conflict in title with any Invariant Section.
6517: <P>
6518:
6519: <LI>
6520: Preserve any Warranty Disclaimers.
6521: </OL>
6522: <P>
6523:
6524: If the Modified Version includes new front-matter sections or
6525: appendices that qualify as Secondary Sections and contain no material
6526: copied from the Document, you may at your option designate some or all
6527: of these sections as invariant. To do this, add their titles to the
6528: list of Invariant Sections in the Modified Version's license notice.
6529: These titles must be distinct from any other section titles.
6530: </P><P>
6531:
6532: You may add a section Entitled "Endorsements", provided it contains
6533: nothing but endorsements of your Modified Version by various
6534: parties--for example, statements of peer review or that the text has
6535: been approved by an organization as the authoritative definition of a
6536: standard.
6537: </P><P>
6538:
6539: You may add a passage of up to five words as a Front-Cover Text, and a
6540: passage of up to 25 words as a Back-Cover Text, to the end of the list
6541: of Cover Texts in the Modified Version. Only one passage of
6542: Front-Cover Text and one of Back-Cover Text may be added by (or
6543: through arrangements made by) any one entity. If the Document already
6544: includes a cover text for the same cover, previously added by you or
6545: by arrangement made by the same entity you are acting on behalf of,
6546: you may not add another; but you may replace the old one, on explicit
6547: permission from the previous publisher that added the old one.
6548: </P><P>
6549:
6550: The author(s) and publisher(s) of the Document do not by this License
6551: give permission to use their names for publicity for or to assert or
6552: imply endorsement of any Modified Version.
6553: </P><P>
6554:
6555: <LI>
6556: COMBINING DOCUMENTS
6557: <P>
6558:
6559: You may combine the Document with other documents released under this
6560: License, under the terms defined in section 4 above for modified
6561: versions, provided that you include in the combination all of the
6562: Invariant Sections of all of the original documents, unmodified, and
6563: list them all as Invariant Sections of your combined work in its
6564: license notice, and that you preserve all their Warranty Disclaimers.
6565: </P><P>
6566:
6567: The combined work need only contain one copy of this License, and
6568: multiple identical Invariant Sections may be replaced with a single
6569: copy. If there are multiple Invariant Sections with the same name but
6570: different contents, make the title of each such section unique by
6571: adding at the end of it, in parentheses, the name of the original
6572: author or publisher of that section if known, or else a unique number.
6573: Make the same adjustment to the section titles in the list of
6574: Invariant Sections in the license notice of the combined work.
6575: </P><P>
6576:
6577: In the combination, you must combine any sections Entitled "History"
6578: in the various original documents, forming one section Entitled
6579: "History"; likewise combine any sections Entitled "Acknowledgements",
6580: and any sections Entitled "Dedications". You must delete all
6581: sections Entitled "Endorsements."
6582: </P><P>
6583:
6584: <LI>
6585: COLLECTIONS OF DOCUMENTS
6586: <P>
6587:
6588: You may make a collection consisting of the Document and other documents
6589: released under this License, and replace the individual copies of this
6590: License in the various documents with a single copy that is included in
6591: the collection, provided that you follow the rules of this License for
6592: verbatim copying of each of the documents in all other respects.
6593: </P><P>
6594:
6595: You may extract a single document from such a collection, and distribute
6596: it individually under this License, provided you insert a copy of this
6597: License into the extracted document, and follow this License in all
6598: other respects regarding verbatim copying of that document.
6599: </P><P>
6600:
6601: <LI>
6602: AGGREGATION WITH INDEPENDENT WORKS
6603: <P>
6604:
6605: A compilation of the Document or its derivatives with other separate
6606: and independent documents or works, in or on a volume of a storage or
6607: distribution medium, is called an "aggregate" if the copyright
6608: resulting from the compilation is not used to limit the legal rights
6609: of the compilation's users beyond what the individual works permit.
6610: When the Document is included in an aggregate, this License does not
6611: apply to the other works in the aggregate which are not themselves
6612: derivative works of the Document.
6613: </P><P>
6614:
6615: If the Cover Text requirement of section 3 is applicable to these
6616: copies of the Document, then if the Document is less than one half of
6617: the entire aggregate, the Document's Cover Texts may be placed on
6618: covers that bracket the Document within the aggregate, or the
6619: electronic equivalent of covers if the Document is in electronic form.
6620: Otherwise they must appear on printed covers that bracket the whole
6621: aggregate.
6622: </P><P>
6623:
6624: <LI>
6625: TRANSLATION
6626: <P>
6627:
6628: Translation is considered a kind of modification, so you may
6629: distribute translations of the Document under the terms of section 4.
6630: Replacing Invariant Sections with translations requires special
6631: permission from their copyright holders, but you may include
6632: translations of some or all Invariant Sections in addition to the
6633: original versions of these Invariant Sections. You may include a
6634: translation of this License, and all the license notices in the
6635: Document, and any Warranty Disclaimers, provided that you also include
6636: the original English version of this License and the original versions
6637: of those notices and disclaimers. In case of a disagreement between
6638: the translation and the original version of this License or a notice
6639: or disclaimer, the original version will prevail.
6640: </P><P>
6641:
6642: If a section in the Document is Entitled "Acknowledgements",
6643: "Dedications", or "History", the requirement (section 4) to Preserve
6644: its Title (section 1) will typically require changing the actual
6645: title.
6646: </P><P>
6647:
6648: <LI>
6649: TERMINATION
6650: <P>
6651:
6652: You may not copy, modify, sublicense, or distribute the Document
6653: except as expressly provided under this License. Any attempt
6654: otherwise to copy, modify, sublicense, or distribute it is void, and
6655: will automatically terminate your rights under this License.
6656: </P><P>
6657:
6658: However, if you cease all violation of this License, then your license
6659: from a particular copyright holder is reinstated (a) provisionally,
6660: unless and until the copyright holder explicitly and finally
6661: terminates your license, and (b) permanently, if the copyright holder
6662: fails to notify you of the violation by some reasonable means prior to
6663: 60 days after the cessation.
6664: </P><P>
6665:
6666: Moreover, your license from a particular copyright holder is
6667: reinstated permanently if the copyright holder notifies you of the
6668: violation by some reasonable means, this is the first time you have
6669: received notice of violation of this License (for any work) from that
6670: copyright holder, and you cure the violation prior to 30 days after
6671: your receipt of the notice.
6672: </P><P>
6673:
6674: Termination of your rights under this section does not terminate the
6675: licenses of parties who have received copies or rights from you under
6676: this License. If your rights have been terminated and not permanently
6677: reinstated, receipt of a copy of some or all of the same material does
6678: not give you any rights to use it.
6679: </P><P>
6680:
6681: <LI>
6682: FUTURE REVISIONS OF THIS LICENSE
6683: <P>
6684:
6685: The Free Software Foundation may publish new, revised versions
6686: of the GNU Free Documentation License from time to time. Such new
6687: versions will be similar in spirit to the present version, but may
6688: differ in detail to address new problems or concerns. See
6689: <A HREF="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</A>.
6690: </P><P>
6691:
6692: Each version of the License is given a distinguishing version number.
6693: If the Document specifies that a particular numbered version of this
6694: License "or any later version" applies to it, you have the option of
6695: following the terms and conditions either of that specified version or
6696: of any later version that has been published (not as a draft) by the
6697: Free Software Foundation. If the Document does not specify a version
6698: number of this License, you may choose any version ever published (not
6699: as a draft) by the Free Software Foundation. If the Document
6700: specifies that a proxy can decide which future versions of this
6701: License can be used, that proxy's public statement of acceptance of a
6702: version permanently authorizes you to choose that version for the
6703: Document.
6704: </P><P>
6705:
6706: <LI>
6707: RELICENSING
6708: <P>
6709:
6710: "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
6711: World Wide Web server that publishes copyrightable works and also
6712: provides prominent facilities for anybody to edit those works. A
6713: public wiki that anybody can edit is an example of such a server. A
6714: "Massive Multiauthor Collaboration" (or "MMC") contained in the
6715: site means any set of copyrightable works thus published on the MMC
6716: site.
6717: </P><P>
6718:
6719: "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
6720: license published by Creative Commons Corporation, a not-for-profit
6721: corporation with a principal place of business in San Francisco,
6722: California, as well as future copyleft versions of that license
6723: published by that same organization.
6724: </P><P>
6725:
6726: "Incorporate" means to publish or republish a Document, in whole or
6727: in part, as part of another Document.
6728: </P><P>
6729:
6730: An MMC is "eligible for relicensing" if it is licensed under this
6731: License, and if all works that were first published under this License
6732: somewhere other than this MMC, and subsequently incorporated in whole
6733: or in part into the MMC, (1) had no cover texts or invariant sections,
6734: and (2) were thus incorporated prior to November 1, 2008.
6735: </P><P>
6736:
6737: The operator of an MMC Site may republish an MMC contained in the site
6738: under CC-BY-SA on the same site at any time before August 1, 2009,
6739: provided the MMC is eligible for relicensing.
6740: </P><P>
6741:
6742: </OL>
6743: <P>
6744:
6745: <A NAME="SEC51"></A>
6746: <H2> ADDENDUM: How to use this License for your documents </H2>
6747: <!--docid::SEC51::-->
6748: <P>
6749:
6750: To use this License in a document you have written, include a copy of
6751: the License in the document and put the following copyright and
6752: license notices just after the title page:
6753: </P><P>
6754:
6755: <TABLE><tr><td> </td><td class=smallexample><FONT SIZE=-1><pre> Copyright (C) <VAR>year</VAR> <VAR>your name</VAR>.
6756: Permission is granted to copy, distribute and/or modify this document
6757: under the terms of the GNU Free Documentation License, Version 1.3
6758: or any later version published by the Free Software Foundation;
6759: with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
6760: Texts. A copy of the license is included in the section entitled ``GNU
6761: Free Documentation License''.
6762: </FONT></pre></td></tr></table></P><P>
6763:
6764: If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
6765: replace the "with<small>...</small>Texts." line with this:
6766: </P><P>
6767:
6768: <TABLE><tr><td> </td><td class=smallexample><FONT SIZE=-1><pre> with the Invariant Sections being <VAR>list their titles</VAR>, with
6769: the Front-Cover Texts being <VAR>list</VAR>, and with the Back-Cover Texts
6770: being <VAR>list</VAR>.
6771: </FONT></pre></td></tr></table></P><P>
6772:
6773: If you have Invariant Sections without Cover Texts, or some other
6774: combination of the three, merge those two alternatives to suit the
6775: situation.
6776: </P><P>
6777:
6778: If your document contains nontrivial examples of program code, we
6779: recommend releasing these examples in parallel under your choice of
6780: free software license, such as the GNU General Public License,
6781: to permit their use in free software.
6782: </P><P>
6783:
6784: <A NAME="Concept Index"></A>
6785: <HR SIZE="6">
6786: <A NAME="SEC52"></A>
6787: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6788: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC50"> < </A>]</TD>
6789: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC53"> > </A>]</TD>
6790: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
6791: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> Up </A>]</TD>
6792: <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
6793: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
6794: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
6795: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
6796: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
6797: </TR></TABLE>
6798: <H1> Concept Index </H1>
6799: <!--docid::SEC52::-->
6800: <table><tr><th valign=top>Jump to: </th><td><A HREF="readline.html#cp_A" style="text-decoration:none"><b>A</b></A>
6801:
6802: <A HREF="readline.html#cp_C" style="text-decoration:none"><b>C</b></A>
6803:
6804: <A HREF="readline.html#cp_E" style="text-decoration:none"><b>E</b></A>
6805:
6806: <A HREF="readline.html#cp_I" style="text-decoration:none"><b>I</b></A>
6807:
6808: <A HREF="readline.html#cp_K" style="text-decoration:none"><b>K</b></A>
6809:
6810: <A HREF="readline.html#cp_N" style="text-decoration:none"><b>N</b></A>
6811:
6812: <A HREF="readline.html#cp_R" style="text-decoration:none"><b>R</b></A>
6813:
6814: <A HREF="readline.html#cp_V" style="text-decoration:none"><b>V</b></A>
6815:
6816: <A HREF="readline.html#cp_Y" style="text-decoration:none"><b>Y</b></A>
6817:
6818: </td></tr></table><br><P></P>
6819: <TABLE border=0>
6820: <TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
6821: <TR><TD COLSPAN=3> <HR></TD></TR>
6822: <TR><TH><A NAME="cp_A"></A>A</TH><TD></TD><TD></TD></TR>
6823: <TR><TD></TD><TD valign=top><A HREF="readline.html#SEC45">application-specific completion functions</A></TD><TD valign=top><A HREF="readline.html#SEC45">2.6 Custom Completers</A></TD></TR>
6824: <TR><TD COLSPAN=3> <HR></TD></TR>
6825: <TR><TH><A NAME="cp_C"></A>C</TH><TD></TD><TD></TD></TR>
6826: <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>
6827: <TR><TD COLSPAN=3> <HR></TD></TR>
6828: <TR><TH><A NAME="cp_E"></A>E</TH><TD></TD><TD></TD></TR>
6829: <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>
6830: <TR><TD COLSPAN=3> <HR></TD></TR>
6831: <TR><TH><A NAME="cp_I"></A>I</TH><TD></TD><TD></TD></TR>
6832: <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>
6833: <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>
6834: <TR><TD COLSPAN=3> <HR></TD></TR>
6835: <TR><TH><A NAME="cp_K"></A>K</TH><TD></TD><TD></TD></TR>
6836: <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>
6837: <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>
6838: <TR><TD COLSPAN=3> <HR></TD></TR>
6839: <TR><TH><A NAME="cp_N"></A>N</TH><TD></TD><TD></TD></TR>
6840: <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>
6841: <TR><TD COLSPAN=3> <HR></TD></TR>
6842: <TR><TH><A NAME="cp_R"></A>R</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 6843: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX220">readline, function</A></TD><TD valign=top><A HREF="readline.html#SEC24">2.1 Basic Behavior</A></TD></TR>
1.1 misho 6844: <TR><TD COLSPAN=3> <HR></TD></TR>
6845: <TR><TH><A NAME="cp_V"></A>V</TH><TD></TD><TD></TD></TR>
6846: <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>
6847: <TR><TD COLSPAN=3> <HR></TD></TR>
6848: <TR><TH><A NAME="cp_Y"></A>Y</TH><TD></TD><TD></TD></TR>
6849: <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>
6850: <TR><TD COLSPAN=3> <HR></TD></TR>
6851: </TABLE><P></P><table><tr><th valign=top>Jump to: </th><td><A HREF="readline.html#cp_A" style="text-decoration:none"><b>A</b></A>
6852:
6853: <A HREF="readline.html#cp_C" style="text-decoration:none"><b>C</b></A>
6854:
6855: <A HREF="readline.html#cp_E" style="text-decoration:none"><b>E</b></A>
6856:
6857: <A HREF="readline.html#cp_I" style="text-decoration:none"><b>I</b></A>
6858:
6859: <A HREF="readline.html#cp_K" style="text-decoration:none"><b>K</b></A>
6860:
6861: <A HREF="readline.html#cp_N" style="text-decoration:none"><b>N</b></A>
6862:
6863: <A HREF="readline.html#cp_R" style="text-decoration:none"><b>R</b></A>
6864:
6865: <A HREF="readline.html#cp_V" style="text-decoration:none"><b>V</b></A>
6866:
6867: <A HREF="readline.html#cp_Y" style="text-decoration:none"><b>Y</b></A>
6868:
6869: </td></tr></table><br><P>
6870:
6871: <A NAME="Function and Variable Index"></A>
6872: <HR SIZE="6">
6873: <A NAME="SEC53"></A>
6874: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6875: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52"> < </A>]</TD>
6876: <TD VALIGN="MIDDLE" ALIGN="LEFT">[ > ]</TD>
6877: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
6878: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top"> Up </A>]</TD>
6879: <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
6880: <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
6881: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
6882: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
6883: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
6884: </TR></TABLE>
6885: <H1> Function and Variable Index </H1>
6886: <!--docid::SEC53::-->
6887: <table><tr><th valign=top>Jump to: </th><td><A HREF="readline.html#fn__" style="text-decoration:none"><b>_</b></A>
6888:
6889: <BR>
6890: <A HREF="readline.html#fn_A" style="text-decoration:none"><b>A</b></A>
6891:
6892: <A HREF="readline.html#fn_B" style="text-decoration:none"><b>B</b></A>
6893:
6894: <A HREF="readline.html#fn_C" style="text-decoration:none"><b>C</b></A>
6895:
6896: <A HREF="readline.html#fn_D" style="text-decoration:none"><b>D</b></A>
6897:
6898: <A HREF="readline.html#fn_E" style="text-decoration:none"><b>E</b></A>
6899:
6900: <A HREF="readline.html#fn_F" style="text-decoration:none"><b>F</b></A>
6901:
6902: <A HREF="readline.html#fn_H" style="text-decoration:none"><b>H</b></A>
6903:
6904: <A HREF="readline.html#fn_I" style="text-decoration:none"><b>I</b></A>
6905:
6906: <A HREF="readline.html#fn_K" style="text-decoration:none"><b>K</b></A>
6907:
6908: <A HREF="readline.html#fn_M" style="text-decoration:none"><b>M</b></A>
6909:
6910: <A HREF="readline.html#fn_N" style="text-decoration:none"><b>N</b></A>
6911:
6912: <A HREF="readline.html#fn_O" style="text-decoration:none"><b>O</b></A>
6913:
6914: <A HREF="readline.html#fn_P" style="text-decoration:none"><b>P</b></A>
6915:
6916: <A HREF="readline.html#fn_Q" style="text-decoration:none"><b>Q</b></A>
6917:
6918: <A HREF="readline.html#fn_R" style="text-decoration:none"><b>R</b></A>
6919:
6920: <A HREF="readline.html#fn_S" style="text-decoration:none"><b>S</b></A>
6921:
6922: <A HREF="readline.html#fn_T" style="text-decoration:none"><b>T</b></A>
6923:
6924: <A HREF="readline.html#fn_U" style="text-decoration:none"><b>U</b></A>
6925:
6926: <A HREF="readline.html#fn_V" style="text-decoration:none"><b>V</b></A>
6927:
6928: <A HREF="readline.html#fn_Y" style="text-decoration:none"><b>Y</b></A>
6929:
6930: </td></tr></table><br><P></P>
6931: <TABLE border=0>
6932: <TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
6933: <TR><TD COLSPAN=3> <HR></TD></TR>
6934: <TR><TH><A NAME="fn__"></A>_</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 6935: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX346"><CODE>_rl_digit_p</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
! 6936: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX349"><CODE>_rl_digit_value</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
! 6937: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX345"><CODE>_rl_lowercase_p</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
! 6938: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX348"><CODE>_rl_to_lower</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
! 6939: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX347"><CODE>_rl_to_upper</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
! 6940: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX344"><CODE>_rl_uppercase_p</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
1.1 misho 6941: <TR><TD COLSPAN=3> <HR></TD></TR>
6942: <TR><TH><A NAME="fn_A"></A>A</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 6943: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX185"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 6944: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX186"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 6945: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX67"><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>
! 6946: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX68"><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>
1.1 misho 6947: <TR><TD COLSPAN=3> <HR></TD></TR>
6948: <TR><TH><A NAME="fn_B"></A>B</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 6949: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX51"><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>
! 6950: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX52"><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>
! 6951: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX103"><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>
! 6952: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX104"><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>
! 6953: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX129"><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>
! 6954: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX130"><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>
! 6955: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX137"><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>
! 6956: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX138"><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>
! 6957: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX55"><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>
! 6958: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX56"><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>
! 6959: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX73"><CODE>beginning-of-history (M-&#60;)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
! 6960: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX74"><CODE>beginning-of-history (M-&#60;)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
! 6961: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX45"><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>
! 6962: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX46"><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>
1.1 misho 6963: <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>
6964: <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>
1.1.1.2 ! misho 6965: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX7">blink-matching-paren</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 6966: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX113"><CODE>bracketed-paste-begin ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
! 6967: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX114"><CODE>bracketed-paste-begin ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
1.1 misho 6968: <TR><TD COLSPAN=3> <HR></TD></TR>
6969: <TR><TH><A NAME="fn_C"></A>C</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 6970: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX179"><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>
! 6971: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX180"><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>
! 6972: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX123"><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>
! 6973: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX124"><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>
! 6974: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX201"><CODE>character-search (C-])</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 6975: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX202"><CODE>character-search (C-])</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 6976: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX203"><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>
! 6977: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX204"><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>
! 6978: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX61"><CODE>clear-display (M-C-l)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
! 6979: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX62"><CODE>clear-display (M-C-l)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
! 6980: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX63"><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>
! 6981: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX64"><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>
! 6982: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX8">colored-completion-prefix</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 6983: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX9">colored-stats</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 6984: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX10">comment-begin</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 6985: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX163"><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>
! 6986: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX164"><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>
! 6987: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX11">completion-display-width</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 6988: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX12">completion-ignore-case</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 6989: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX13">completion-map-case</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 6990: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX14">completion-prefix-display-length</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 6991: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX15">completion-query-items</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 6992: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX16">convert-meta</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 6993: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX151"><CODE>copy-backward-word ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 6994: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX152"><CODE>copy-backward-word ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 6995: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX153"><CODE>copy-forward-word ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 6996: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX154"><CODE>copy-forward-word ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 6997: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX149"><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>
! 6998: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX150"><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>
1.1 misho 6999: <TR><TD COLSPAN=3> <HR></TD></TR>
7000: <TR><TH><A NAME="fn_D"></A>D</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7001: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX101"><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>
! 7002: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX102"><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>
! 7003: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX173"><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>
! 7004: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX174"><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>
! 7005: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX145"><CODE>delete-horizontal-space ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 7006: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX146"><CODE>delete-horizontal-space ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 7007: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX159"><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, <small>...</small> <KBD>M--</KBD>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD></TR>
! 7008: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX160"><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, <small>...</small> <KBD>M--</KBD>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD></TR>
! 7009: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX17">disable-completion</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7010: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX187"><CODE>do-lowercase-version (M-A, M-B, M-<VAR>x</VAR>, <small>...</small>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7011: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX188"><CODE>do-lowercase-version (M-A, M-B, M-<VAR>x</VAR>, <small>...</small>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7012: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX121"><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>
! 7013: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX122"><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>
! 7014: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX209"><CODE>dump-functions ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7015: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX210"><CODE>dump-functions ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7016: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX213"><CODE>dump-macros ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7017: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX214"><CODE>dump-macros ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7018: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX211"><CODE>dump-variables ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7019: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX212"><CODE>dump-variables ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
1.1 misho 7020: <TR><TD COLSPAN=3> <HR></TD></TR>
7021: <TR><TH><A NAME="fn_E"></A>E</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7022: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX18">echo-control-characters</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7023: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX19">editing-mode</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7024: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX215"><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>
! 7025: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX216"><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>
! 7026: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX20">emacs-mode-string</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7027: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX21">enable-bracketed-paste</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7028: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX22">enable-keypad</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7029: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX177"><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>
! 7030: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX178"><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>
! 7031: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX99"><CODE><I>end-of-file</I> (usually C-d)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
! 7032: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX100"><CODE><I>end-of-file</I> (usually C-d)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
! 7033: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX75"><CODE>end-of-history (M-&#62;)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
! 7034: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX76"><CODE>end-of-history (M-&#62;)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
! 7035: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX47"><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>
! 7036: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX48"><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>
! 7037: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX199"><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>
! 7038: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX200"><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>
! 7039: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX23">expand-tilde</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
1.1 misho 7040: <TR><TD COLSPAN=3> <HR></TD></TR>
7041: <TR><TH><A NAME="fn_F"></A>F</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7042: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX105"><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>
! 7043: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX106"><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>
! 7044: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX49"><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>
! 7045: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX50"><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>
! 7046: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX79"><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>
! 7047: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX80"><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>
! 7048: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX53"><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>
! 7049: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX54"><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>
1.1 misho 7050: <TR><TD COLSPAN=3> <HR></TD></TR>
7051: <TR><TH><A NAME="fn_H"></A>H</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7052: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX24">history-preserve-point</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7053: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX87"><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>
! 7054: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX88"><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>
! 7055: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX85"><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>
! 7056: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX86"><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>
! 7057: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX25">history-size</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7058: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX91"><CODE>history-substring-search-backward ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
! 7059: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX92"><CODE>history-substring-search-backward ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
! 7060: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX89"><CODE>history-substring-search-forward ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
! 7061: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX90"><CODE>history-substring-search-forward ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
! 7062: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX26">horizontal-scroll-mode</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
1.1 misho 7063: <TR><TD COLSPAN=3> <HR></TD></TR>
7064: <TR><TH><A NAME="fn_I"></A>I</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7065: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX27">input-meta</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7066: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX207"><CODE>insert-comment (M-#)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7067: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX208"><CODE>insert-comment (M-#)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7068: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX167"><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>
! 7069: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX168"><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>
! 7070: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX29">isearch-terminators</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
1.1 misho 7071: <TR><TD COLSPAN=3> <HR></TD></TR>
7072: <TR><TH><A NAME="fn_K"></A>K</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7073: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX30">keymap</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7074: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX127"><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>
! 7075: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX128"><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>
! 7076: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX147"><CODE>kill-region ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 7077: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX148"><CODE>kill-region ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 7078: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX133"><CODE>kill-whole-line ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 7079: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX134"><CODE>kill-whole-line ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 7080: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX135"><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>
! 7081: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX136"><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>
1.1 misho 7082: <TR><TD COLSPAN=3> <HR></TD></TR>
7083: <TR><TH><A NAME="fn_M"></A>M</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7084: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX31">mark-modified-lines</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7085: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX32">mark-symlinked-directories</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7086: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX33">match-hidden-files</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7087: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX169"><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>
! 7088: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX170"><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>
! 7089: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX171"><CODE>menu-complete-backward ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
! 7090: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX172"><CODE>menu-complete-backward ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A></TD></TR>
! 7091: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX34">menu-complete-display-prefix</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7092: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX28">meta-flag</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
1.1 misho 7093: <TR><TD COLSPAN=3> <HR></TD></TR>
7094: <TR><TH><A NAME="fn_N"></A>N</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7095: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX71"><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>
! 7096: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX72"><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>
! 7097: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX59"><CODE>next-screen-line ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
! 7098: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX60"><CODE>next-screen-line ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
! 7099: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX83"><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>
! 7100: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX84"><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>
! 7101: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX81"><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>
! 7102: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX82"><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>
1.1 misho 7103: <TR><TD COLSPAN=3> <HR></TD></TR>
7104: <TR><TH><A NAME="fn_O"></A>O</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7105: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX97"><CODE>operate-and-get-next (C-o)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
! 7106: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX98"><CODE>operate-and-get-next (C-o)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD></TR>
! 7107: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX35">output-meta</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7108: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX125"><CODE>overwrite-mode ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
! 7109: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX126"><CODE>overwrite-mode ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
1.1 misho 7110: <TR><TD COLSPAN=3> <HR></TD></TR>
7111: <TR><TH><A NAME="fn_P"></A>P</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7112: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX36">page-completions</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7113: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX165"><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>
! 7114: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX166"><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>
! 7115: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX189"><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>
! 7116: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX190"><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>
! 7117: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX69"><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>
! 7118: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX70"><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>
! 7119: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX57"><CODE>previous-screen-line ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
! 7120: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX58"><CODE>previous-screen-line ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
! 7121: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX181"><CODE>print-last-kbd-macro ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
! 7122: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX182"><CODE>print-last-kbd-macro ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC20">1.4.7 Keyboard Macros</A></TD></TR>
1.1 misho 7123: <TR><TD COLSPAN=3> <HR></TD></TR>
7124: <TR><TH><A NAME="fn_Q"></A>Q</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7125: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX107"><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>
! 7126: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX108"><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>
1.1 misho 7127: <TR><TD COLSPAN=3> <HR></TD></TR>
7128: <TR><TH><A NAME="fn_R"></A>R</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7129: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX183"><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>
! 7130: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX184"><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>
! 7131: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX219"><CODE>readline</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC24">2.1 Basic Behavior</A></TD></TR>
! 7132: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX65"><CODE>redraw-current-line ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
! 7133: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX66"><CODE>redraw-current-line ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC14">1.4.1 Commands For Moving</A></TD></TR>
! 7134: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX77"><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>
! 7135: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX78"><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>
! 7136: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX37">revert-all-at-newline</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7137: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX193"><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>
! 7138: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX194"><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>
! 7139: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX358"><CODE>rl_activate_mark</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
! 7140: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX261"><CODE>rl_add_defun</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC30">2.4.1 Naming a Function</A></TD></TR>
! 7141: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX297"><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>
! 7142: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX300"><CODE>rl_add_undo</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
! 7143: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX342"><CODE>rl_alphabetic</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
! 7144: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX232">rl_already_prompted</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7145: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX393">rl_attempted_completion_function</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7146: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX420">rl_attempted_completion_over</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7147: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX404">rl_basic_quote_characters</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7148: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX403">rl_basic_word_break_characters</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7149: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX298"><CODE>rl_begin_undo_group</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
! 7150: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX273"><CODE>rl_bind_key</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
! 7151: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX275"><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>
! 7152: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX276"><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>
! 7153: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX274"><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>
! 7154: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX281"><CODE>rl_bind_keyseq</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
! 7155: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX284"><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>
! 7156: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX285"><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>
! 7157: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX282"><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>
! 7158: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX252">rl_binding_keymap</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7159: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX362"><CODE>rl_callback_handler_install</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC41">2.4.12 Alternate Interface</A></TD></TR>
! 7160: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX365"><CODE>rl_callback_handler_remove</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC41">2.4.12 Alternate Interface</A></TD></TR>
! 7161: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX363"><CODE>rl_callback_read_char</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC41">2.4.12 Alternate Interface</A></TD></TR>
! 7162: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX364"><CODE>rl_callback_sigcleanup</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC41">2.4.12 Alternate Interface</A></TD></TR>
! 7163: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX366">rl_catch_signals</A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7164: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX367">rl_catch_sigwinch</A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7165: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX369">rl_change_environment</A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7166: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX396">rl_char_is_quoted_p</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7167: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX374"><CODE>rl_check_signals</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7168: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX371"><CODE>rl_cleanup_after_signal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7169: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX357"><CODE>rl_clear_history</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
! 7170: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX313"><CODE>rl_clear_message</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
! 7171: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX327"><CODE>rl_clear_pending_input</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC37">2.4.8 Character Input</A></TD></TR>
! 7172: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX381"><CODE>rl_clear_signals</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7173: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX308"><CODE>rl_clear_visible_line</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
! 7174: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX382"><CODE>rl_complete</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC46">2.6.1 How Completing Works</A></TD></TR>
! 7175: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX385"><CODE>rl_complete</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.2 Completion Functions</A></TD></TR>
! 7176: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX384"><CODE>rl_complete_internal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.2 Completion Functions</A></TD></TR>
! 7177: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX407">rl_completer_quote_characters</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7178: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX405">rl_completer_word_break_characters</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7179: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX411">rl_completion_append_character</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7180: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX402">rl_completion_display_matches_hook</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7181: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX383">rl_completion_entry_function</A></TD><TD valign=top><A HREF="readline.html#SEC46">2.6.1 How Completing Works</A></TD></TR>
! 7182: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX392">rl_completion_entry_function</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7183: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX415">rl_completion_found_quote</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7184: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX423">rl_completion_invoking_key</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7185: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX416">rl_completion_mark_symlink_dirs</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7186: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX389"><CODE>rl_completion_matches</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.2 Completion Functions</A></TD></TR>
! 7187: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX388"><CODE>rl_completion_mode</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.2 Completion Functions</A></TD></TR>
! 7188: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX410">rl_completion_query_items</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7189: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX413">rl_completion_quote_character</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7190: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX412">rl_completion_suppress_append</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7191: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX414">rl_completion_suppress_quote</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7192: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX422">rl_completion_type</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7193: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX406">rl_completion_word_break_hook</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7194: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX263"><CODE>rl_copy_keymap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
! 7195: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX320"><CODE>rl_copy_text</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
! 7196: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX310"><CODE>rl_crlf</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
! 7197: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX359"><CODE>rl_deactivate_mark</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
! 7198: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX319"><CODE>rl_delete_text</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
! 7199: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX250">rl_deprep_term_function</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7200: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX330"><CODE>rl_deprep_terminal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC38">2.4.9 Terminal Management</A></TD></TR>
! 7201: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX341"><CODE>rl_ding</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
! 7202: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX398">rl_directory_completion_hook</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7203: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX399">rl_directory_rewrite_hook;</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7204: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX265"><CODE>rl_discard_keymap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
! 7205: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX228">rl_dispatching</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7206: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX343"><CODE>rl_display_match_list</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
! 7207: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX231">rl_display_prompt</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7208: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX302"><CODE>rl_do_undo</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
! 7209: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX225">rl_done</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7210: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX375"><CODE>rl_echo_signal_char</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7211: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX260">rl_editing_mode</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7212: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX267"><CODE>rl_empty_keymap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
! 7213: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX223">rl_end</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7214: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX299"><CODE>rl_end_undo_group</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
! 7215: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX229">rl_erase_empty_line</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7216: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX244">rl_event_hook</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7217: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX326"><CODE>rl_execute_next</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC37">2.4.8 Character Input</A></TD></TR>
! 7218: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX254">rl_executing_key</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7219: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX251">rl_executing_keymap</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7220: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX255">rl_executing_keyseq</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7221: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX253">rl_executing_macro</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7222: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX316"><CODE>rl_expand_prompt</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
! 7223: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX258">rl_explicit_arg</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7224: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX339"><CODE>rl_extend_line_buffer</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
! 7225: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX418">rl_filename_completion_desired</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7226: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX390"><CODE>rl_filename_completion_function</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.2 Completion Functions</A></TD></TR>
! 7227: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX395">rl_filename_dequoting_function</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7228: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX408">rl_filename_quote_characters</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7229: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX419">rl_filename_quoting_desired</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7230: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX394">rl_filename_quoting_function</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7231: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX401">rl_filename_rewrite_hook</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7232: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX400">rl_filename_stat_hook</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7233: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX305"><CODE>rl_forced_update_display</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
! 7234: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX337"><CODE>rl_free</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
! 7235: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX266"><CODE>rl_free_keymap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
! 7236: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX372"><CODE>rl_free_line_state</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7237: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX301"><CODE>rl_free_undo_list</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
! 7238: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX294"><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>
! 7239: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX290"><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>
! 7240: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX291"><CODE>rl_function_of_keyseq_len</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC33">2.4.4 Associating Function Names and Bindings</A></TD></TR>
! 7241: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX296"><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>
! 7242: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX286"><CODE>rl_generic_bind</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
! 7243: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX268"><CODE>rl_get_keymap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
! 7244: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX270"><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>
! 7245: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX271"><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>
! 7246: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX378"><CODE>rl_get_screen_size</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7247: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX356"><CODE>rl_get_termcap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
! 7248: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX324"><CODE>rl_getc</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC37">2.4.8 Character Input</A></TD></TR>
! 7249: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX245">rl_getc_function</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7250: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX235">rl_gnu_readline_p</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7251: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX417">rl_ignore_completion_duplicates</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7252: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX397">rl_ignore_some_completions_function</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7253: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX424">rl_inhibit_completion</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7254: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX340"><CODE>rl_initialize</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
! 7255: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX247">rl_input_available_hook</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7256: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX387"><CODE>rl_insert_completions</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.2 Completion Functions</A></TD></TR>
! 7257: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX318"><CODE>rl_insert_text</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
! 7258: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX238">rl_instream</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7259: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX292"><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>
! 7260: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX293"><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>
! 7261: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX360"><CODE>rl_keep_mark_active</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
! 7262: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX256">rl_key_sequence_length</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7263: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX321"><CODE>rl_kill_text</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
! 7264: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX241">rl_last_func</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7265: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX233">rl_library_version</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7266: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX221">rl_line_buffer</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7267: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX295"><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>
! 7268: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX350"><CODE>rl_macro_bind</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
! 7269: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX351"><CODE>rl_macro_dumper</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
! 7270: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX262"><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>
! 7271: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX264"><CODE>rl_make_keymap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
! 7272: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX224">rl_mark</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7273: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX361"><CODE>rl_mark_active_p</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
! 7274: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX312"><CODE>rl_message</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
! 7275: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX303"><CODE>rl_modifying</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A></TD></TR>
! 7276: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX289"><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>
! 7277: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX226">rl_num_chars_to_read</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7278: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX259">rl_numeric_arg</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7279: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX306"><CODE>rl_on_new_line</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
! 7280: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX307"><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>
! 7281: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX239">rl_outstream</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7282: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX287"><CODE>rl_parse_and_bind</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
! 7283: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX227">rl_pending_input</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7284: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX370"><CODE>rl_pending_signal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7285: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX368">rl_persistent_signal_handlers</A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7286: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX222">rl_point</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7287: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX386"><CODE>rl_possible_completions</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.2 Completion Functions</A></TD></TR>
! 7288: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX243">rl_pre_input_hook</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7289: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX240">rl_prefer_env_winsize</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7290: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX249">rl_prep_term_function</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7291: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX329"><CODE>rl_prep_terminal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC38">2.4.9 Terminal Management</A></TD></TR>
! 7292: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX230">rl_prompt</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7293: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX322"><CODE>rl_push_macro_input</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC36">2.4.7 Modifying Text</A></TD></TR>
! 7294: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX288"><CODE>rl_read_init_file</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
! 7295: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX323"><CODE>rl_read_key</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC37">2.4.8 Character Input</A></TD></TR>
! 7296: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX237">rl_readline_name</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7297: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX257">rl_readline_state</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7298: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX234">rl_readline_version</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7299: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX304"><CODE>rl_redisplay</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
! 7300: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX248">rl_redisplay_function</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7301: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX338"><CODE>rl_replace_line</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
! 7302: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX373"><CODE>rl_reset_after_signal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7303: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX309"><CODE>rl_reset_line_state</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
! 7304: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX379"><CODE>rl_reset_screen_size</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7305: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX334"><CODE>rl_reset_terminal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC38">2.4.9 Terminal Management</A></TD></TR>
! 7306: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX376"><CODE>rl_resize_terminal</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7307: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX315"><CODE>rl_restore_prompt</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
! 7308: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX336"><CODE>rl_restore_state</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
! 7309: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX314"><CODE>rl_save_prompt</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
! 7310: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX335"><CODE>rl_save_state</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC39">2.4.10 Utility Functions</A></TD></TR>
! 7311: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX283"><CODE>rl_set_key</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
! 7312: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX328"><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>
! 7313: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX269"><CODE>rl_set_keymap</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
! 7314: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX272"><CODE>rl_set_keymap_name</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A></TD></TR>
! 7315: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX355"><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>
! 7316: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX317"><CODE>rl_set_prompt</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
! 7317: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX377"><CODE>rl_set_screen_size</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7318: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX380"><CODE>rl_set_signals</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC44">2.5 Readline Signal Handling</A></TD></TR>
! 7319: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX311"><CODE>rl_show_char</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC35">2.4.6 Redisplay</A></TD></TR>
! 7320: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX246">rl_signal_event_hook</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7321: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX421">rl_sort_completion_matches</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7322: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX409">rl_special_prefixes</A></TD><TD valign=top><A HREF="readline.html#SEC48">2.6.3 Completion Variables</A></TD></TR>
! 7323: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX242">rl_startup_hook</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7324: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX325"><CODE>rl_stuff_char</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC37">2.4.8 Character Input</A></TD></TR>
! 7325: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX236">rl_terminal_name</A></TD><TD valign=top><A HREF="readline.html#SEC28">2.3 Readline Variables</A></TD></TR>
! 7326: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX331"><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>
! 7327: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX333"><CODE>rl_tty_set_echoing</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC38">2.4.9 Terminal Management</A></TD></TR>
! 7328: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX332"><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>
! 7329: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX280"><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>
! 7330: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX279"><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>
! 7331: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX277"><CODE>rl_unbind_key</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC32">2.4.3 Binding Keys</A></TD></TR>
! 7332: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX278"><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>
! 7333: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX391"><CODE>rl_username_completion_function</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC47">2.6.2 Completion Functions</A></TD></TR>
! 7334: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX352"><CODE>rl_variable_bind</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
! 7335: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX354"><CODE>rl_variable_dumper</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
! 7336: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX353"><CODE>rl_variable_value</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A></TD></TR>
1.1 misho 7337: <TR><TD COLSPAN=3> <HR></TD></TR>
7338: <TR><TH><A NAME="fn_S"></A>S</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7339: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX111"><CODE>self-insert (a, b, A, 1, !, <small>...</small>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
! 7340: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX112"><CODE>self-insert (a, b, A, 1, !, <small>...</small>)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A></TD></TR>
! 7341: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX197"><CODE>set-mark (C-@)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7342: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX198"><CODE>set-mark (C-@)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7343: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX139"><CODE>shell-transpose-words (M-C-t)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 7344: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX140"><CODE>shell-transpose-words (M-C-t)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 7345: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX38">show-all-if-ambiguous</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7346: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX39">show-all-if-unmodified</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7347: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX40">show-mode-in-prompt</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7348: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX41">skip-completed-text</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7349: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX205"><CODE>skip-csi-sequence ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7350: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX206"><CODE>skip-csi-sequence ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7351: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX175"><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>
! 7352: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX176"><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>
1.1 misho 7353: <TR><TD COLSPAN=3> <HR></TD></TR>
7354: <TR><TH><A NAME="fn_T"></A>T</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7355: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX109"><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>
! 7356: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX110"><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>
! 7357: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX195"><CODE>tilde-expand (M-~)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7358: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX196"><CODE>tilde-expand (M-~)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD></TR>
! 7359: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX115"><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>
! 7360: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX116"><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>
! 7361: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX117"><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>
! 7362: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX118"><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>
1.1 misho 7363: <TR><TD COLSPAN=3> <HR></TD></TR>
7364: <TR><TH><A NAME="fn_U"></A>U</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7365: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX191"><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>
! 7366: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX192"><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>
! 7367: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX161"><CODE>universal-argument ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD></TR>
! 7368: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX162"><CODE>universal-argument ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD></TR>
! 7369: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX143"><CODE>unix-filename-rubout ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 7370: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX144"><CODE>unix-filename-rubout ()</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 7371: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX131"><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>
! 7372: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX132"><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>
! 7373: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX141"><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>
! 7374: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX142"><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>
! 7375: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX119"><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>
! 7376: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX120"><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>
1.1 misho 7377: <TR><TD COLSPAN=3> <HR></TD></TR>
7378: <TR><TH><A NAME="fn_V"></A>V</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7379: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX42">vi-cmd-mode-string</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7380: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX217"><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>
! 7381: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX218"><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>
! 7382: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX43">vi-ins-mode-string</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
! 7383: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX44">visible-stats</A></TD><TD valign=top><A HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A></TD></TR>
1.1 misho 7384: <TR><TD COLSPAN=3> <HR></TD></TR>
7385: <TR><TH><A NAME="fn_Y"></A>Y</TH><TD></TD><TD></TD></TR>
1.1.1.2 ! misho 7386: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX155"><CODE>yank (C-y)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 7387: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX156"><CODE>yank (C-y)</CODE></A></TD><TD valign=top><A HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A></TD></TR>
! 7388: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX95"><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>
! 7389: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX96"><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>
! 7390: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX93"><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>
! 7391: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX94"><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>
! 7392: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX157"><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>
! 7393: <TR><TD></TD><TD valign=top><A HREF="readline.html#IDX158"><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>
1.1 misho 7394: <TR><TD COLSPAN=3> <HR></TD></TR>
7395: </TABLE><P></P><table><tr><th valign=top>Jump to: </th><td><A HREF="readline.html#fn__" style="text-decoration:none"><b>_</b></A>
7396:
7397: <BR>
7398: <A HREF="readline.html#fn_A" style="text-decoration:none"><b>A</b></A>
7399:
7400: <A HREF="readline.html#fn_B" style="text-decoration:none"><b>B</b></A>
7401:
7402: <A HREF="readline.html#fn_C" style="text-decoration:none"><b>C</b></A>
7403:
7404: <A HREF="readline.html#fn_D" style="text-decoration:none"><b>D</b></A>
7405:
7406: <A HREF="readline.html#fn_E" style="text-decoration:none"><b>E</b></A>
7407:
7408: <A HREF="readline.html#fn_F" style="text-decoration:none"><b>F</b></A>
7409:
7410: <A HREF="readline.html#fn_H" style="text-decoration:none"><b>H</b></A>
7411:
7412: <A HREF="readline.html#fn_I" style="text-decoration:none"><b>I</b></A>
7413:
7414: <A HREF="readline.html#fn_K" style="text-decoration:none"><b>K</b></A>
7415:
7416: <A HREF="readline.html#fn_M" style="text-decoration:none"><b>M</b></A>
7417:
7418: <A HREF="readline.html#fn_N" style="text-decoration:none"><b>N</b></A>
7419:
7420: <A HREF="readline.html#fn_O" style="text-decoration:none"><b>O</b></A>
7421:
7422: <A HREF="readline.html#fn_P" style="text-decoration:none"><b>P</b></A>
7423:
7424: <A HREF="readline.html#fn_Q" style="text-decoration:none"><b>Q</b></A>
7425:
7426: <A HREF="readline.html#fn_R" style="text-decoration:none"><b>R</b></A>
7427:
7428: <A HREF="readline.html#fn_S" style="text-decoration:none"><b>S</b></A>
7429:
7430: <A HREF="readline.html#fn_T" style="text-decoration:none"><b>T</b></A>
7431:
7432: <A HREF="readline.html#fn_U" style="text-decoration:none"><b>U</b></A>
7433:
7434: <A HREF="readline.html#fn_V" style="text-decoration:none"><b>V</b></A>
7435:
7436: <A HREF="readline.html#fn_Y" style="text-decoration:none"><b>Y</b></A>
7437:
7438: </td></tr></table><br><P>
7439:
7440: <HR SIZE="6">
7441: <A NAME="SEC_Contents"></A>
7442: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
7443: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
7444: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
7445: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
7446: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
7447: </TR></TABLE>
7448: <H1>Table of Contents</H1>
7449: <UL>
7450: <A NAME="TOC1" HREF="readline.html#SEC1">1. Command Line Editing</A>
7451: <BR>
7452: <UL>
7453: <A NAME="TOC2" HREF="readline.html#SEC2">1.1 Introduction to Line Editing</A>
7454: <BR>
7455: <A NAME="TOC3" HREF="readline.html#SEC3">1.2 Readline Interaction</A>
7456: <BR>
7457: <UL>
7458: <A NAME="TOC4" HREF="readline.html#SEC4">1.2.1 Readline Bare Essentials</A>
7459: <BR>
7460: <A NAME="TOC5" HREF="readline.html#SEC5">1.2.2 Readline Movement Commands</A>
7461: <BR>
7462: <A NAME="TOC6" HREF="readline.html#SEC6">1.2.3 Readline Killing Commands</A>
7463: <BR>
7464: <A NAME="TOC7" HREF="readline.html#SEC7">1.2.4 Readline Arguments</A>
7465: <BR>
7466: <A NAME="TOC8" HREF="readline.html#SEC8">1.2.5 Searching for Commands in the History</A>
7467: <BR>
7468: </UL>
7469: <A NAME="TOC9" HREF="readline.html#SEC9">1.3 Readline Init File</A>
7470: <BR>
7471: <UL>
7472: <A NAME="TOC10" HREF="readline.html#SEC10">1.3.1 Readline Init File Syntax</A>
7473: <BR>
7474: <A NAME="TOC11" HREF="readline.html#SEC11">1.3.2 Conditional Init Constructs</A>
7475: <BR>
7476: <A NAME="TOC12" HREF="readline.html#SEC12">1.3.3 Sample Init File</A>
7477: <BR>
7478: </UL>
7479: <A NAME="TOC13" HREF="readline.html#SEC13">1.4 Bindable Readline Commands</A>
7480: <BR>
7481: <UL>
7482: <A NAME="TOC14" HREF="readline.html#SEC14">1.4.1 Commands For Moving</A>
7483: <BR>
7484: <A NAME="TOC15" HREF="readline.html#SEC15">1.4.2 Commands For Manipulating The History</A>
7485: <BR>
7486: <A NAME="TOC16" HREF="readline.html#SEC16">1.4.3 Commands For Changing Text</A>
7487: <BR>
7488: <A NAME="TOC17" HREF="readline.html#SEC17">1.4.4 Killing And Yanking</A>
7489: <BR>
7490: <A NAME="TOC18" HREF="readline.html#SEC18">1.4.5 Specifying Numeric Arguments</A>
7491: <BR>
7492: <A NAME="TOC19" HREF="readline.html#SEC19">1.4.6 Letting Readline Type For You</A>
7493: <BR>
7494: <A NAME="TOC20" HREF="readline.html#SEC20">1.4.7 Keyboard Macros</A>
7495: <BR>
7496: <A NAME="TOC21" HREF="readline.html#SEC21">1.4.8 Some Miscellaneous Commands</A>
7497: <BR>
7498: </UL>
7499: <A NAME="TOC22" HREF="readline.html#SEC22">1.5 Readline vi Mode</A>
7500: <BR>
7501: </UL>
7502: <A NAME="TOC23" HREF="readline.html#SEC23">2. Programming with GNU Readline</A>
7503: <BR>
7504: <UL>
7505: <A NAME="TOC24" HREF="readline.html#SEC24">2.1 Basic Behavior</A>
7506: <BR>
7507: <A NAME="TOC25" HREF="readline.html#SEC25">2.2 Custom Functions</A>
7508: <BR>
7509: <UL>
7510: <A NAME="TOC26" HREF="readline.html#SEC26">2.2.1 Readline Typedefs</A>
7511: <BR>
7512: <A NAME="TOC27" HREF="readline.html#SEC27">2.2.2 Writing a New Function</A>
7513: <BR>
7514: </UL>
7515: <A NAME="TOC28" HREF="readline.html#SEC28">2.3 Readline Variables</A>
7516: <BR>
7517: <A NAME="TOC29" HREF="readline.html#SEC29">2.4 Readline Convenience Functions</A>
7518: <BR>
7519: <UL>
7520: <A NAME="TOC30" HREF="readline.html#SEC30">2.4.1 Naming a Function</A>
7521: <BR>
7522: <A NAME="TOC31" HREF="readline.html#SEC31">2.4.2 Selecting a Keymap</A>
7523: <BR>
7524: <A NAME="TOC32" HREF="readline.html#SEC32">2.4.3 Binding Keys</A>
7525: <BR>
7526: <A NAME="TOC33" HREF="readline.html#SEC33">2.4.4 Associating Function Names and Bindings</A>
7527: <BR>
7528: <A NAME="TOC34" HREF="readline.html#SEC34">2.4.5 Allowing Undoing</A>
7529: <BR>
7530: <A NAME="TOC35" HREF="readline.html#SEC35">2.4.6 Redisplay</A>
7531: <BR>
7532: <A NAME="TOC36" HREF="readline.html#SEC36">2.4.7 Modifying Text</A>
7533: <BR>
7534: <A NAME="TOC37" HREF="readline.html#SEC37">2.4.8 Character Input</A>
7535: <BR>
7536: <A NAME="TOC38" HREF="readline.html#SEC38">2.4.9 Terminal Management</A>
7537: <BR>
7538: <A NAME="TOC39" HREF="readline.html#SEC39">2.4.10 Utility Functions</A>
7539: <BR>
7540: <A NAME="TOC40" HREF="readline.html#SEC40">2.4.11 Miscellaneous Functions</A>
7541: <BR>
7542: <A NAME="TOC41" HREF="readline.html#SEC41">2.4.12 Alternate Interface</A>
7543: <BR>
7544: <A NAME="TOC42" HREF="readline.html#SEC42">2.4.13 A Readline Example</A>
7545: <BR>
7546: <A NAME="TOC43" HREF="readline.html#SEC43">2.4.14 Alternate Interface Example</A>
7547: <BR>
7548: </UL>
7549: <A NAME="TOC44" HREF="readline.html#SEC44">2.5 Readline Signal Handling</A>
7550: <BR>
7551: <A NAME="TOC45" HREF="readline.html#SEC45">2.6 Custom Completers</A>
7552: <BR>
7553: <UL>
7554: <A NAME="TOC46" HREF="readline.html#SEC46">2.6.1 How Completing Works</A>
7555: <BR>
7556: <A NAME="TOC47" HREF="readline.html#SEC47">2.6.2 Completion Functions</A>
7557: <BR>
7558: <A NAME="TOC48" HREF="readline.html#SEC48">2.6.3 Completion Variables</A>
7559: <BR>
7560: <A NAME="TOC49" HREF="readline.html#SEC49">2.6.4 A Short Completion Example</A>
7561: <BR>
7562: </UL>
7563: </UL>
7564: <A NAME="TOC50" HREF="readline.html#SEC50">A. GNU Free Documentation License</A>
7565: <BR>
7566: <A NAME="TOC52" HREF="readline.html#SEC52">Concept Index</A>
7567: <BR>
7568: <A NAME="TOC53" HREF="readline.html#SEC53">Function and Variable Index</A>
7569: <BR>
7570: </UL>
7571: <HR SIZE=1>
7572: <A NAME="SEC_OVERVIEW"></A>
7573: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
7574: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
7575: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
7576: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
7577: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
7578: </TR></TABLE>
7579: <H1>Short Table of Contents</H1>
7580: <BLOCKQUOTE>
7581: <A NAME="TOC1" HREF="readline.html#SEC1">1. Command Line Editing</A>
7582: <BR>
7583: <A NAME="TOC23" HREF="readline.html#SEC23">2. Programming with GNU Readline</A>
7584: <BR>
7585: <A NAME="TOC50" HREF="readline.html#SEC50">A. GNU Free Documentation License</A>
7586: <BR>
7587: <A NAME="TOC52" HREF="readline.html#SEC52">Concept Index</A>
7588: <BR>
7589: <A NAME="TOC53" HREF="readline.html#SEC53">Function and Variable Index</A>
7590: <BR>
7591:
7592: </BLOCKQUOTE>
7593: <HR SIZE=1>
7594: <A NAME="SEC_About"></A>
7595: <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
7596: <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD>
7597: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD>
7598: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD>
7599: <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD>
7600: </TR></TABLE>
7601: <H1>About this document</H1>
1.1.1.2 ! misho 7602: This document was generated by <I>Chet Ramey</I> on <I>October, 30 2020</I>
1.1 misho 7603: using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
7604: "><I>texi2html</I></A>
7605: <P></P>
7606: The buttons in the navigation panels have the following meaning:
7607: <P></P>
7608: <table border = "1">
7609: <TR>
7610: <TH> Button </TH>
7611: <TH> Name </TH>
7612: <TH> Go to </TH>
7613: <TH> From 1.2.3 go to</TH>
7614: </TR>
7615: <TR>
7616: <TD ALIGN="CENTER">
7617: [ < ] </TD>
7618: <TD ALIGN="CENTER">
7619: Back
7620: </TD>
7621: <TD>
7622: previous section in reading order
7623: </TD>
7624: <TD>
7625: 1.2.2
7626: </TD>
7627: </TR>
7628: <TR>
7629: <TD ALIGN="CENTER">
7630: [ > ] </TD>
7631: <TD ALIGN="CENTER">
7632: Forward
7633: </TD>
7634: <TD>
7635: next section in reading order
7636: </TD>
7637: <TD>
7638: 1.2.4
7639: </TD>
7640: </TR>
7641: <TR>
7642: <TD ALIGN="CENTER">
7643: [ << ] </TD>
7644: <TD ALIGN="CENTER">
7645: FastBack
7646: </TD>
7647: <TD>
7648: previous or up-and-previous section
7649: </TD>
7650: <TD>
7651: 1.1
7652: </TD>
7653: </TR>
7654: <TR>
7655: <TD ALIGN="CENTER">
7656: [ Up ] </TD>
7657: <TD ALIGN="CENTER">
7658: Up
7659: </TD>
7660: <TD>
7661: up section
7662: </TD>
7663: <TD>
7664: 1.2
7665: </TD>
7666: </TR>
7667: <TR>
7668: <TD ALIGN="CENTER">
7669: [ >> ] </TD>
7670: <TD ALIGN="CENTER">
7671: FastForward
7672: </TD>
7673: <TD>
7674: next or up-and-next section
7675: </TD>
7676: <TD>
7677: 1.3
7678: </TD>
7679: </TR>
7680: <TR>
7681: <TD ALIGN="CENTER">
7682: [Top] </TD>
7683: <TD ALIGN="CENTER">
7684: Top
7685: </TD>
7686: <TD>
7687: cover (top) of document
7688: </TD>
7689: <TD>
7690:
7691: </TD>
7692: </TR>
7693: <TR>
7694: <TD ALIGN="CENTER">
7695: [Contents] </TD>
7696: <TD ALIGN="CENTER">
7697: Contents
7698: </TD>
7699: <TD>
7700: table of contents
7701: </TD>
7702: <TD>
7703:
7704: </TD>
7705: </TR>
7706: <TR>
7707: <TD ALIGN="CENTER">
7708: [Index] </TD>
7709: <TD ALIGN="CENTER">
7710: Index
7711: </TD>
7712: <TD>
7713: concept index
7714: </TD>
7715: <TD>
7716:
7717: </TD>
7718: </TR>
7719: <TR>
7720: <TD ALIGN="CENTER">
7721: [ ? ] </TD>
7722: <TD ALIGN="CENTER">
7723: About
7724: </TD>
7725: <TD>
7726: this page
7727: </TD>
7728: <TD>
7729:
7730: </TD>
7731: </TR>
7732: </TABLE>
7733: <P></P>
7734: where the <STRONG> Example </STRONG> assumes that the current position
7735: is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of
7736: the following structure:
7737: <UL>
7738: <LI> 1. Section One </LI>
7739: <UL>
7740: <LI>1.1 Subsection One-One</LI>
7741: <UL>
7742: <LI> ... </LI>
7743: </UL>
7744: <LI>1.2 Subsection One-Two</LI>
7745: <UL>
7746: <LI>1.2.1 Subsubsection One-Two-One
7747: </LI><LI>1.2.2 Subsubsection One-Two-Two
7748: </LI><LI>1.2.3 Subsubsection One-Two-Three <STRONG>
7749: <== Current Position </STRONG>
7750: </LI><LI>1.2.4 Subsubsection One-Two-Four
7751: </LI></UL>
7752: <LI>1.3 Subsection One-Three</LI>
7753: <UL>
7754: <LI> ... </LI>
7755: </UL>
7756: <LI>1.4 Subsection One-Four</LI>
7757: </UL>
7758: </UL>
7759:
7760: <HR SIZE=1>
7761: <BR>
7762: <FONT SIZE="-1">
7763: This document was generated
1.1.1.2 ! misho 7764: by <I>Chet Ramey</I> on <I>October, 30 2020</I>
1.1 misho 7765: using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
7766: "><I>texi2html</I></A>
7767:
7768: </BODY>
7769: </HTML>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>