Commit | Line | Data |
---|---|---|
b585a9fa EZ |
1 | This is rluserman.info, produced by makeinfo version 4.7 from |
2 | /Users/chet/src/bash/readline-src/doc/rluserman.texi. | |
f9267e15 | 3 | |
b585a9fa EZ |
4 | This manual describes the end user interface of the GNU Readline |
5 | Library (version 5.1-beta1, 11 November 2005), a library which aids in | |
6 | the consistency of user interface across discrete programs which provide | |
7 | a command line interface. | |
f9267e15 | 8 | |
b585a9fa | 9 | Copyright (C) 1988-2005 Free Software Foundation, Inc. |
f9267e15 EZ |
10 | |
11 | Permission is granted to make and distribute verbatim copies of this | |
b585a9fa | 12 | manual provided the copyright notice and this permission notice are |
f9267e15 EZ |
13 | preserved on all copies. |
14 | ||
b585a9fa EZ |
15 | Permission is granted to copy, distribute and/or modify this |
16 | document under the terms of the GNU Free Documentation License, | |
17 | Version 1.1 or any later version published by the Free Software | |
18 | Foundation; with no Invariant Sections, with the Front-Cover texts | |
19 | being "A GNU Manual," and with the Back-Cover Texts as in (a) | |
20 | below. A copy of the license is included in the section entitled | |
21 | "GNU Free Documentation License." | |
f9267e15 | 22 | |
b585a9fa EZ |
23 | (a) The FSF's Back-Cover Text is: "You have freedom to copy and |
24 | modify this GNU Manual, like GNU software. Copies published by | |
25 | the Free Software Foundation raise funds for GNU development." | |
26 | ||
27 | INFO-DIR-SECTION Libraries | |
28 | START-INFO-DIR-ENTRY | |
29 | * RLuserman: (rluserman). The GNU readline library User's Manual. | |
30 | END-INFO-DIR-ENTRY | |
f9267e15 EZ |
31 | |
32 | \1f | |
33 | File: rluserman.info, Node: Top, Next: Command Line Editing, Up: (dir) | |
34 | ||
35 | GNU Readline Library | |
36 | ******************** | |
37 | ||
b585a9fa | 38 | This document describes the end user interface of the GNU Readline |
f9267e15 | 39 | Library, a utility which aids in the consistency of user interface |
b585a9fa | 40 | across discrete programs which provide a command line interface. |
f9267e15 EZ |
41 | |
42 | * Menu: | |
43 | ||
44 | * Command Line Editing:: GNU Readline User's Manual. | |
b585a9fa | 45 | * Copying This Manual:: Copying This Manual. |
f9267e15 EZ |
46 | |
47 | \1f | |
b585a9fa | 48 | File: rluserman.info, Node: Command Line Editing, Next: Copying This Manual, Prev: Top, Up: Top |
f9267e15 | 49 | |
b585a9fa EZ |
50 | 1 Command Line Editing |
51 | ********************** | |
f9267e15 | 52 | |
b585a9fa | 53 | This chapter describes the basic features of the GNU command line |
f9267e15 EZ |
54 | editing interface. |
55 | ||
56 | * Menu: | |
57 | ||
58 | * Introduction and Notation:: Notation used in this text. | |
59 | * Readline Interaction:: The minimum set of commands for editing a line. | |
60 | * Readline Init File:: Customizing Readline from a user's view. | |
61 | * Bindable Readline Commands:: A description of most of the Readline commands | |
62 | available for binding | |
63 | * Readline vi Mode:: A short description of how to make Readline | |
64 | behave like the vi editor. | |
65 | ||
66 | \1f | |
67 | File: rluserman.info, Node: Introduction and Notation, Next: Readline Interaction, Up: Command Line Editing | |
68 | ||
b585a9fa EZ |
69 | 1.1 Introduction to Line Editing |
70 | ================================ | |
f9267e15 | 71 | |
b585a9fa | 72 | The following paragraphs describe the notation used to represent |
f9267e15 EZ |
73 | keystrokes. |
74 | ||
84041b4c | 75 | The text `C-k' is read as `Control-K' and describes the character |
f9267e15 EZ |
76 | produced when the <k> key is pressed while the Control key is depressed. |
77 | ||
84041b4c | 78 | The text `M-k' is read as `Meta-K' and describes the character |
f9267e15 EZ |
79 | produced when the Meta key (if you have one) is depressed, and the <k> |
80 | key is pressed. The Meta key is labeled <ALT> on many keyboards. On | |
81 | keyboards with two keys labeled <ALT> (usually to either side of the | |
82 | space bar), the <ALT> on the left side is generally set to work as a | |
83 | Meta key. The <ALT> key on the right may also be configured to work as | |
84 | a Meta key or may be configured as some other modifier, such as a | |
85 | Compose key for typing accented characters. | |
86 | ||
87 | If you do not have a Meta or <ALT> key, or another key working as a | |
88 | Meta key, the identical keystroke can be generated by typing <ESC> | |
84041b4c EZ |
89 | _first_, and then typing <k>. Either process is known as "metafying" |
90 | the <k> key. | |
f9267e15 | 91 | |
84041b4c EZ |
92 | The text `M-C-k' is read as `Meta-Control-k' and describes the |
93 | character produced by "metafying" `C-k'. | |
f9267e15 EZ |
94 | |
95 | In addition, several keys have their own names. Specifically, | |
96 | <DEL>, <ESC>, <LFD>, <SPC>, <RET>, and <TAB> all stand for themselves | |
84041b4c EZ |
97 | when seen in this text, or in an init file (*note Readline Init File::). |
98 | If your keyboard lacks a <LFD> key, typing <C-j> will produce the | |
99 | desired character. The <RET> key may be labeled <Return> or <Enter> on | |
100 | some keyboards. | |
f9267e15 EZ |
101 | |
102 | \1f | |
103 | File: rluserman.info, Node: Readline Interaction, Next: Readline Init File, Prev: Introduction and Notation, Up: Command Line Editing | |
104 | ||
b585a9fa EZ |
105 | 1.2 Readline Interaction |
106 | ======================== | |
f9267e15 | 107 | |
b585a9fa | 108 | Often during an interactive session you type in a long line of text, |
f9267e15 EZ |
109 | only to notice that the first word on the line is misspelled. The |
110 | Readline library gives you a set of commands for manipulating the text | |
111 | as you type it in, allowing you to just fix your typo, and not forcing | |
112 | you to retype the majority of the line. Using these editing commands, | |
113 | you move the cursor to the place that needs correction, and delete or | |
114 | insert the text of the corrections. Then, when you are satisfied with | |
84041b4c EZ |
115 | the line, you simply press <RET>. You do not have to be at the end of |
116 | the line to press <RET>; the entire line is accepted regardless of the | |
117 | location of the cursor within the line. | |
f9267e15 EZ |
118 | |
119 | * Menu: | |
120 | ||
121 | * Readline Bare Essentials:: The least you need to know about Readline. | |
122 | * Readline Movement Commands:: Moving about the input line. | |
123 | * Readline Killing Commands:: How to delete text, and how to get it back! | |
124 | * Readline Arguments:: Giving numeric arguments to commands. | |
125 | * Searching:: Searching through previous lines. | |
126 | ||
127 | \1f | |
128 | File: rluserman.info, Node: Readline Bare Essentials, Next: Readline Movement Commands, Up: Readline Interaction | |
129 | ||
b585a9fa EZ |
130 | 1.2.1 Readline Bare Essentials |
131 | ------------------------------ | |
f9267e15 | 132 | |
b585a9fa EZ |
133 | In order to enter characters into the line, simply type them. The typed |
134 | character appears where the cursor was, and then the cursor moves one | |
135 | space to the right. If you mistype a character, you can use your erase | |
136 | character to back up and delete the mistyped character. | |
f9267e15 EZ |
137 | |
138 | Sometimes you may mistype a character, and not notice the error | |
139 | until you have typed several other characters. In that case, you can | |
84041b4c EZ |
140 | type `C-b' to move the cursor to the left, and then correct your |
141 | mistake. Afterwards, you can move the cursor to the right with `C-f'. | |
f9267e15 EZ |
142 | |
143 | When you add text in the middle of a line, you will notice that | |
144 | characters to the right of the cursor are `pushed over' to make room | |
145 | for the text that you have inserted. Likewise, when you delete text | |
146 | behind the cursor, characters to the right of the cursor are `pulled | |
147 | back' to fill in the blank space created by the removal of the text. A | |
148 | list of the bare essentials for editing the text of an input line | |
149 | follows. | |
150 | ||
84041b4c | 151 | `C-b' |
f9267e15 EZ |
152 | Move back one character. |
153 | ||
84041b4c | 154 | `C-f' |
f9267e15 EZ |
155 | Move forward one character. |
156 | ||
157 | <DEL> or <Backspace> | |
158 | Delete the character to the left of the cursor. | |
159 | ||
84041b4c | 160 | `C-d' |
f9267e15 EZ |
161 | Delete the character underneath the cursor. |
162 | ||
163 | Printing characters | |
164 | Insert the character into the line at the cursor. | |
165 | ||
84041b4c | 166 | `C-_' or `C-x C-u' |
f9267e15 EZ |
167 | Undo the last editing command. You can undo all the way back to an |
168 | empty line. | |
169 | ||
170 | (Depending on your configuration, the <Backspace> key be set to delete | |
171 | the character to the left of the cursor and the <DEL> key set to delete | |
84041b4c | 172 | the character underneath the cursor, like `C-d', rather than the |
f9267e15 EZ |
173 | character to the left of the cursor.) |
174 | ||
175 | \1f | |
176 | File: rluserman.info, Node: Readline Movement Commands, Next: Readline Killing Commands, Prev: Readline Bare Essentials, Up: Readline Interaction | |
177 | ||
b585a9fa EZ |
178 | 1.2.2 Readline Movement Commands |
179 | -------------------------------- | |
f9267e15 | 180 | |
b585a9fa | 181 | The above table describes the most basic keystrokes that you need in |
f9267e15 | 182 | order to do editing of the input line. For your convenience, many |
84041b4c | 183 | other commands have been added in addition to `C-b', `C-f', `C-d', and |
f9267e15 EZ |
184 | <DEL>. Here are some commands for moving more rapidly about the line. |
185 | ||
84041b4c | 186 | `C-a' |
f9267e15 EZ |
187 | Move to the start of the line. |
188 | ||
84041b4c | 189 | `C-e' |
f9267e15 EZ |
190 | Move to the end of the line. |
191 | ||
84041b4c | 192 | `M-f' |
f9267e15 EZ |
193 | Move forward a word, where a word is composed of letters and |
194 | digits. | |
195 | ||
84041b4c | 196 | `M-b' |
f9267e15 EZ |
197 | Move backward a word. |
198 | ||
84041b4c | 199 | `C-l' |
f9267e15 EZ |
200 | Clear the screen, reprinting the current line at the top. |
201 | ||
84041b4c | 202 | Notice how `C-f' moves forward a character, while `M-f' moves |
f9267e15 EZ |
203 | forward a word. It is a loose convention that control keystrokes |
204 | operate on characters while meta keystrokes operate on words. | |
205 | ||
206 | \1f | |
207 | File: rluserman.info, Node: Readline Killing Commands, Next: Readline Arguments, Prev: Readline Movement Commands, Up: Readline Interaction | |
208 | ||
b585a9fa EZ |
209 | 1.2.3 Readline Killing Commands |
210 | ------------------------------- | |
f9267e15 | 211 | |
b585a9fa EZ |
212 | "Killing" text means to delete the text from the line, but to save it |
213 | away for later use, usually by "yanking" (re-inserting) it back into | |
f9267e15 EZ |
214 | the line. (`Cut' and `paste' are more recent jargon for `kill' and |
215 | `yank'.) | |
216 | ||
217 | If the description for a command says that it `kills' text, then you | |
218 | can be sure that you can get the text back in a different (or the same) | |
219 | place later. | |
220 | ||
221 | When you use a kill command, the text is saved in a "kill-ring". | |
222 | Any number of consecutive kills save all of the killed text together, so | |
223 | that when you yank it back, you get it all. The kill ring is not line | |
224 | specific; the text that you killed on a previously typed line is | |
b585a9fa | 225 | available to be yanked back later, when you are typing another line. |
f9267e15 EZ |
226 | |
227 | Here is the list of commands for killing text. | |
228 | ||
84041b4c | 229 | `C-k' |
f9267e15 EZ |
230 | Kill the text from the current cursor position to the end of the |
231 | line. | |
232 | ||
84041b4c | 233 | `M-d' |
f9267e15 EZ |
234 | Kill from the cursor to the end of the current word, or, if between |
235 | words, to the end of the next word. Word boundaries are the same | |
84041b4c | 236 | as those used by `M-f'. |
f9267e15 | 237 | |
84041b4c EZ |
238 | `M-<DEL>' |
239 | Kill from the cursor the start of the current word, or, if between | |
f9267e15 | 240 | words, to the start of the previous word. Word boundaries are the |
84041b4c | 241 | same as those used by `M-b'. |
f9267e15 | 242 | |
84041b4c | 243 | `C-w' |
f9267e15 | 244 | Kill from the cursor to the previous whitespace. This is |
84041b4c | 245 | different than `M-<DEL>' because the word boundaries differ. |
f9267e15 | 246 | |
b585a9fa | 247 | |
f9267e15 EZ |
248 | Here is how to "yank" the text back into the line. Yanking means to |
249 | copy the most-recently-killed text from the kill buffer. | |
250 | ||
84041b4c | 251 | `C-y' |
f9267e15 EZ |
252 | Yank the most recently killed text back into the buffer at the |
253 | cursor. | |
254 | ||
84041b4c | 255 | `M-y' |
f9267e15 | 256 | Rotate the kill-ring, and yank the new top. You can only do this |
84041b4c | 257 | if the prior command is `C-y' or `M-y'. |
f9267e15 EZ |
258 | |
259 | \1f | |
260 | File: rluserman.info, Node: Readline Arguments, Next: Searching, Prev: Readline Killing Commands, Up: Readline Interaction | |
261 | ||
b585a9fa EZ |
262 | 1.2.4 Readline Arguments |
263 | ------------------------ | |
f9267e15 | 264 | |
b585a9fa | 265 | You can pass numeric arguments to Readline commands. Sometimes the |
f9267e15 EZ |
266 | argument acts as a repeat count, other times it is the sign of the |
267 | argument that is significant. If you pass a negative argument to a | |
268 | command which normally acts in a forward direction, that command will | |
269 | act in a backward direction. For example, to kill text back to the | |
270 | start of the line, you might type `M-- C-k'. | |
271 | ||
272 | The general way to pass numeric arguments to a command is to type | |
273 | meta digits before the command. If the first `digit' typed is a minus | |
274 | sign (`-'), then the sign of the argument will be negative. Once you | |
275 | have typed one meta digit to get the argument started, you can type the | |
276 | remainder of the digits, and then the command. For example, to give | |
84041b4c EZ |
277 | the `C-d' command an argument of 10, you could type `M-1 0 C-d', which |
278 | will delete the next ten characters on the input line. | |
f9267e15 EZ |
279 | |
280 | \1f | |
281 | File: rluserman.info, Node: Searching, Prev: Readline Arguments, Up: Readline Interaction | |
282 | ||
b585a9fa EZ |
283 | 1.2.5 Searching for Commands in the History |
284 | ------------------------------------------- | |
f9267e15 | 285 | |
b585a9fa | 286 | Readline provides commands for searching through the command history |
f9267e15 | 287 | for lines containing a specified string. There are two search modes: |
84041b4c | 288 | "incremental" and "non-incremental". |
f9267e15 EZ |
289 | |
290 | Incremental searches begin before the user has finished typing the | |
291 | search string. As each character of the search string is typed, | |
292 | Readline displays the next entry from the history matching the string | |
293 | typed so far. An incremental search requires only as many characters | |
294 | as needed to find the desired history entry. To search backward in the | |
84041b4c | 295 | history for a particular string, type `C-r'. Typing `C-s' searches |
f9267e15 EZ |
296 | forward through the history. The characters present in the value of |
297 | the `isearch-terminators' variable are used to terminate an incremental | |
298 | search. If that variable has not been assigned a value, the <ESC> and | |
84041b4c | 299 | `C-J' characters will terminate an incremental search. `C-g' will |
f9267e15 EZ |
300 | abort an incremental search and restore the original line. When the |
301 | search is terminated, the history entry containing the search string | |
302 | becomes the current line. | |
303 | ||
84041b4c EZ |
304 | To find other matching entries in the history list, type `C-r' or |
305 | `C-s' as appropriate. This will search backward or forward in the | |
f9267e15 EZ |
306 | history for the next entry matching the search string typed so far. |
307 | Any other key sequence bound to a Readline command will terminate the | |
308 | search and execute that command. For instance, a <RET> will terminate | |
309 | the search and accept the line, thereby executing the command from the | |
84041b4c EZ |
310 | history list. A movement command will terminate the search, make the |
311 | last line found the current line, and begin editing. | |
312 | ||
313 | Readline remembers the last incremental search string. If two | |
314 | `C-r's are typed without any intervening characters defining a new | |
315 | search string, any remembered search string is used. | |
f9267e15 EZ |
316 | |
317 | Non-incremental searches read the entire search string before | |
318 | starting to search for matching history lines. The search string may be | |
319 | typed by the user or be part of the contents of the current line. | |
320 | ||
321 | \1f | |
322 | File: rluserman.info, Node: Readline Init File, Next: Bindable Readline Commands, Prev: Readline Interaction, Up: Command Line Editing | |
323 | ||
b585a9fa EZ |
324 | 1.3 Readline Init File |
325 | ====================== | |
f9267e15 | 326 | |
b585a9fa | 327 | Although the Readline library comes with a set of Emacs-like |
f9267e15 EZ |
328 | keybindings installed by default, it is possible to use a different set |
329 | of keybindings. Any user can customize programs that use Readline by | |
330 | putting commands in an "inputrc" file, conventionally in his home | |
331 | directory. The name of this file is taken from the value of the | |
332 | environment variable `INPUTRC'. If that variable is unset, the default | |
333 | is `~/.inputrc'. | |
334 | ||
335 | When a program which uses the Readline library starts up, the init | |
336 | file is read, and the key bindings are set. | |
337 | ||
338 | In addition, the `C-x C-r' command re-reads this init file, thus | |
339 | incorporating any changes that you might have made to it. | |
340 | ||
341 | * Menu: | |
342 | ||
343 | * Readline Init File Syntax:: Syntax for the commands in the inputrc file. | |
344 | ||
345 | * Conditional Init Constructs:: Conditional key bindings in the inputrc file. | |
346 | ||
347 | * Sample Init File:: An example inputrc file. | |
348 | ||
349 | \1f | |
350 | File: rluserman.info, Node: Readline Init File Syntax, Next: Conditional Init Constructs, Up: Readline Init File | |
351 | ||
b585a9fa EZ |
352 | 1.3.1 Readline Init File Syntax |
353 | ------------------------------- | |
f9267e15 | 354 | |
b585a9fa | 355 | There are only a few basic constructs allowed in the Readline init |
f9267e15 EZ |
356 | file. Blank lines are ignored. Lines beginning with a `#' are |
357 | comments. Lines beginning with a `$' indicate conditional constructs | |
84041b4c | 358 | (*note Conditional Init Constructs::). Other lines denote variable |
f9267e15 EZ |
359 | settings and key bindings. |
360 | ||
361 | Variable Settings | |
362 | You can modify the run-time behavior of Readline by altering the | |
363 | values of variables in Readline using the `set' command within the | |
84041b4c EZ |
364 | init file. The syntax is simple: |
365 | ||
366 | set VARIABLE VALUE | |
367 | ||
368 | Here, for example, is how to change from the default Emacs-like | |
369 | key binding to use `vi' line editing commands: | |
f9267e15 EZ |
370 | |
371 | set editing-mode vi | |
372 | ||
84041b4c | 373 | Variable names and values, where appropriate, are recognized |
b585a9fa EZ |
374 | without regard to case. Unrecognized variable names are ignored. |
375 | ||
376 | Boolean variables (those that can be set to on or off) are set to | |
377 | on if the value is null or empty, ON (case-insensitive), or 1. | |
378 | Any other value results in the variable being set to off. | |
84041b4c | 379 | |
f9267e15 EZ |
380 | A great deal of run-time behavior is changeable with the following |
381 | variables. | |
382 | ||
383 | `bell-style' | |
384 | Controls what happens when Readline wants to ring the | |
385 | terminal bell. If set to `none', Readline never rings the | |
386 | bell. If set to `visible', Readline uses a visible bell if | |
387 | one is available. If set to `audible' (the default), | |
388 | Readline attempts to ring the terminal's bell. | |
389 | ||
b585a9fa EZ |
390 | `bind-tty-special-chars' |
391 | If set to `on', Readline attempts to bind the control | |
392 | characters treated specially by the kernel's terminal driver | |
393 | to their Readline equivalents. | |
394 | ||
f9267e15 EZ |
395 | `comment-begin' |
396 | The string to insert at the beginning of the line when the | |
397 | `insert-comment' command is executed. The default value is | |
398 | `"#"'. | |
399 | ||
400 | `completion-ignore-case' | |
401 | If set to `on', Readline performs filename matching and | |
402 | completion in a case-insensitive fashion. The default value | |
403 | is `off'. | |
404 | ||
405 | `completion-query-items' | |
406 | The number of possible completions that determines when the | |
b585a9fa EZ |
407 | user is asked whether the list of possibilities should be |
408 | displayed. If the number of possible completions is greater | |
409 | than this value, Readline will ask the user whether or not he | |
410 | wishes to view them; otherwise, they are simply listed. This | |
411 | variable must be set to an integer value greater than or | |
412 | equal to 0. A negative value means Readline should never ask. | |
413 | The default limit is `100'. | |
f9267e15 EZ |
414 | |
415 | `convert-meta' | |
416 | If set to `on', Readline will convert characters with the | |
417 | eighth bit set to an ASCII key sequence by stripping the | |
418 | eighth bit and prefixing an <ESC> character, converting them | |
419 | to a meta-prefixed key sequence. The default value is `on'. | |
420 | ||
421 | `disable-completion' | |
422 | If set to `On', Readline will inhibit word completion. | |
423 | Completion characters will be inserted into the line as if | |
424 | they had been mapped to `self-insert'. The default is `off'. | |
425 | ||
426 | `editing-mode' | |
427 | The `editing-mode' variable controls which default set of key | |
428 | bindings is used. By default, Readline starts up in Emacs | |
429 | editing mode, where the keystrokes are most similar to Emacs. | |
430 | This variable can be set to either `emacs' or `vi'. | |
431 | ||
432 | `enable-keypad' | |
433 | When set to `on', Readline will try to enable the application | |
434 | keypad when it is called. Some systems need this to enable | |
435 | the arrow keys. The default is `off'. | |
436 | ||
437 | `expand-tilde' | |
438 | If set to `on', tilde expansion is performed when Readline | |
439 | attempts word completion. The default is `off'. | |
440 | ||
b585a9fa | 441 | `history-preserve-point' |
84041b4c | 442 | If set to `on', the history code attempts to place point at |
b585a9fa EZ |
443 | the same location on each history line retrieved with |
444 | `previous-history' or `next-history'. The default is `off'. | |
84041b4c | 445 | |
f9267e15 EZ |
446 | `horizontal-scroll-mode' |
447 | This variable can be set to either `on' or `off'. Setting it | |
448 | to `on' means that the text of the lines being edited will | |
449 | scroll horizontally on a single screen line when they are | |
450 | longer than the width of the screen, instead of wrapping onto | |
451 | a new screen line. By default, this variable is set to `off'. | |
452 | ||
453 | `input-meta' | |
454 | If set to `on', Readline will enable eight-bit input (it will | |
84041b4c | 455 | not clear the eighth bit in the characters it reads), |
f9267e15 EZ |
456 | regardless of what the terminal claims it can support. The |
457 | default value is `off'. The name `meta-flag' is a synonym | |
458 | for this variable. | |
459 | ||
460 | `isearch-terminators' | |
461 | The string of characters that should terminate an incremental | |
462 | search without subsequently executing the character as a | |
84041b4c EZ |
463 | command (*note Searching::). If this variable has not been |
464 | given a value, the characters <ESC> and `C-J' will terminate | |
f9267e15 EZ |
465 | an incremental search. |
466 | ||
467 | `keymap' | |
468 | Sets Readline's idea of the current keymap for key binding | |
469 | commands. Acceptable `keymap' names are `emacs', | |
84041b4c | 470 | `emacs-standard', `emacs-meta', `emacs-ctlx', `vi', `vi-move', |
f9267e15 EZ |
471 | `vi-command', and `vi-insert'. `vi' is equivalent to |
472 | `vi-command'; `emacs' is equivalent to `emacs-standard'. The | |
473 | default value is `emacs'. The value of the `editing-mode' | |
474 | variable also affects the default keymap. | |
475 | ||
476 | `mark-directories' | |
477 | If set to `on', completed directory names have a slash | |
478 | appended. The default is `on'. | |
479 | ||
480 | `mark-modified-lines' | |
481 | This variable, when set to `on', causes Readline to display an | |
482 | asterisk (`*') at the start of history lines which have been | |
483 | modified. This variable is `off' by default. | |
484 | ||
84041b4c EZ |
485 | `mark-symlinked-directories' |
486 | If set to `on', completed names which are symbolic links to | |
487 | directories have a slash appended (subject to the value of | |
488 | `mark-directories'). The default is `off'. | |
489 | ||
490 | `match-hidden-files' | |
491 | This variable, when set to `on', causes Readline to match | |
492 | files whose names begin with a `.' (hidden files) when | |
493 | performing filename completion, unless the leading `.' is | |
494 | supplied by the user in the filename to be completed. This | |
495 | variable is `on' by default. | |
496 | ||
f9267e15 EZ |
497 | `output-meta' |
498 | If set to `on', Readline will display characters with the | |
499 | eighth bit set directly rather than as a meta-prefixed escape | |
500 | sequence. The default is `off'. | |
501 | ||
84041b4c EZ |
502 | `page-completions' |
503 | If set to `on', Readline uses an internal `more'-like pager | |
504 | to display a screenful of possible completions at a time. | |
505 | This variable is `on' by default. | |
506 | ||
f9267e15 EZ |
507 | `print-completions-horizontally' |
508 | If set to `on', Readline will display completions with matches | |
509 | sorted horizontally in alphabetical order, rather than down | |
510 | the screen. The default is `off'. | |
511 | ||
512 | `show-all-if-ambiguous' | |
513 | This alters the default behavior of the completion functions. | |
514 | If set to `on', words which have more than one possible | |
515 | completion cause the matches to be listed immediately instead | |
516 | of ringing the bell. The default value is `off'. | |
517 | ||
b585a9fa EZ |
518 | `show-all-if-unmodified' |
519 | This alters the default behavior of the completion functions | |
520 | in a fashion similar to SHOW-ALL-IF-AMBIGUOUS. If set to | |
521 | `on', words which have more than one possible completion | |
522 | without any possible partial completion (the possible | |
523 | completions don't share a common prefix) cause the matches to | |
524 | be listed immediately instead of ringing the bell. The | |
525 | default value is `off'. | |
526 | ||
f9267e15 EZ |
527 | `visible-stats' |
528 | If set to `on', a character denoting a file's type is | |
529 | appended to the filename when listing possible completions. | |
530 | The default is `off'. | |
531 | ||
b585a9fa | 532 | |
f9267e15 EZ |
533 | Key Bindings |
534 | The syntax for controlling key bindings in the init file is | |
535 | simple. First you need to find the name of the command that you | |
536 | want to change. The following sections contain tables of the | |
537 | command name, the default keybinding, if any, and a short | |
538 | description of what the command does. | |
539 | ||
84041b4c EZ |
540 | Once you know the name of the command, simply place on a line in |
541 | the init file the name of the key you wish to bind the command to, | |
542 | a colon, and then the name of the command. The name of the key | |
543 | can be expressed in different ways, depending on what you find most | |
544 | comfortable. | |
545 | ||
546 | In addition to command names, readline allows keys to be bound to | |
547 | a string that is inserted when the key is pressed (a MACRO). | |
f9267e15 EZ |
548 | |
549 | KEYNAME: FUNCTION-NAME or MACRO | |
550 | KEYNAME is the name of a key spelled out in English. For | |
551 | example: | |
552 | Control-u: universal-argument | |
553 | Meta-Rubout: backward-kill-word | |
554 | Control-o: "> output" | |
555 | ||
84041b4c EZ |
556 | In the above example, `C-u' is bound to the function |
557 | `universal-argument', `M-DEL' is bound to the function | |
558 | `backward-kill-word', and `C-o' is bound to run the macro | |
f9267e15 EZ |
559 | expressed on the right hand side (that is, to insert the text |
560 | `> output' into the line). | |
561 | ||
84041b4c EZ |
562 | A number of symbolic character names are recognized while |
563 | processing this key binding syntax: DEL, ESC, ESCAPE, LFD, | |
564 | NEWLINE, RET, RETURN, RUBOUT, SPACE, SPC, and TAB. | |
565 | ||
f9267e15 EZ |
566 | "KEYSEQ": FUNCTION-NAME or MACRO |
567 | KEYSEQ differs from KEYNAME above in that strings denoting an | |
568 | entire key sequence can be specified, by placing the key | |
569 | sequence in double quotes. Some GNU Emacs style key escapes | |
570 | can be used, as in the following example, but the special | |
571 | character names are not recognized. | |
572 | ||
573 | "\C-u": universal-argument | |
574 | "\C-x\C-r": re-read-init-file | |
575 | "\e[11~": "Function Key 1" | |
576 | ||
84041b4c | 577 | In the above example, `C-u' is again bound to the function |
f9267e15 | 578 | `universal-argument' (just as it was in the first example), |
84041b4c EZ |
579 | `C-x C-r' is bound to the function `re-read-init-file', and |
580 | `<ESC> <[> <1> <1> <~>' is bound to insert the text `Function | |
581 | Key 1'. | |
f9267e15 | 582 | |
b585a9fa | 583 | |
f9267e15 EZ |
584 | The following GNU Emacs style escape sequences are available when |
585 | specifying key sequences: | |
586 | ||
587 | `\C-' | |
588 | control prefix | |
589 | ||
590 | `\M-' | |
591 | meta prefix | |
592 | ||
593 | `\e' | |
594 | an escape character | |
595 | ||
596 | `\\' | |
597 | backslash | |
598 | ||
599 | `\"' | |
600 | <">, a double quotation mark | |
601 | ||
602 | `\'' | |
603 | <'>, a single quote or apostrophe | |
604 | ||
605 | In addition to the GNU Emacs style escape sequences, a second set | |
606 | of backslash escapes is available: | |
607 | ||
608 | `\a' | |
609 | alert (bell) | |
610 | ||
611 | `\b' | |
612 | backspace | |
613 | ||
614 | `\d' | |
615 | delete | |
616 | ||
617 | `\f' | |
618 | form feed | |
619 | ||
620 | `\n' | |
621 | newline | |
622 | ||
623 | `\r' | |
624 | carriage return | |
625 | ||
626 | `\t' | |
627 | horizontal tab | |
628 | ||
629 | `\v' | |
630 | vertical tab | |
631 | ||
632 | `\NNN' | |
84041b4c | 633 | the eight-bit character whose value is the octal value NNN |
f9267e15 EZ |
634 | (one to three digits) |
635 | ||
84041b4c EZ |
636 | `\xHH' |
637 | the eight-bit character whose value is the hexadecimal value | |
638 | HH (one or two hex digits) | |
639 | ||
f9267e15 EZ |
640 | When entering the text of a macro, single or double quotes must be |
641 | used to indicate a macro definition. Unquoted text is assumed to | |
642 | be a function name. In the macro body, the backslash escapes | |
643 | described above are expanded. Backslash will quote any other | |
644 | character in the macro text, including `"' and `''. For example, | |
645 | the following binding will make `C-x \' insert a single `\' into | |
646 | the line: | |
647 | "\C-x\\": "\\" | |
648 | ||
b585a9fa | 649 | |
f9267e15 EZ |
650 | \1f |
651 | File: rluserman.info, Node: Conditional Init Constructs, Next: Sample Init File, Prev: Readline Init File Syntax, Up: Readline Init File | |
652 | ||
b585a9fa EZ |
653 | 1.3.2 Conditional Init Constructs |
654 | --------------------------------- | |
f9267e15 | 655 | |
b585a9fa | 656 | Readline implements a facility similar in spirit to the conditional |
f9267e15 EZ |
657 | compilation features of the C preprocessor which allows key bindings |
658 | and variable settings to be performed as the result of tests. There | |
659 | are four parser directives used. | |
660 | ||
661 | `$if' | |
662 | The `$if' construct allows bindings to be made based on the | |
663 | editing mode, the terminal being used, or the application using | |
664 | Readline. The text of the test extends to the end of the line; no | |
665 | characters are required to isolate it. | |
666 | ||
667 | `mode' | |
668 | The `mode=' form of the `$if' directive is used to test | |
669 | whether Readline is in `emacs' or `vi' mode. This may be | |
670 | used in conjunction with the `set keymap' command, for | |
671 | instance, to set bindings in the `emacs-standard' and | |
672 | `emacs-ctlx' keymaps only if Readline is starting out in | |
673 | `emacs' mode. | |
674 | ||
675 | `term' | |
676 | The `term=' form may be used to include terminal-specific key | |
677 | bindings, perhaps to bind the key sequences output by the | |
678 | terminal's function keys. The word on the right side of the | |
679 | `=' is tested against both the full name of the terminal and | |
680 | the portion of the terminal name before the first `-'. This | |
681 | allows `sun' to match both `sun' and `sun-cmd', for instance. | |
682 | ||
683 | `application' | |
684 | The APPLICATION construct is used to include | |
685 | application-specific settings. Each program using the | |
686 | Readline library sets the APPLICATION NAME, and you can test | |
84041b4c EZ |
687 | for a particular value. This could be used to bind key |
688 | sequences to functions useful for a specific program. For | |
689 | instance, the following command adds a key sequence that | |
690 | quotes the current or previous word in Bash: | |
f9267e15 EZ |
691 | $if Bash |
692 | # Quote the current or previous word | |
693 | "\C-xq": "\eb\"\ef\"" | |
694 | $endif | |
695 | ||
696 | `$endif' | |
697 | This command, as seen in the previous example, terminates an `$if' | |
698 | command. | |
699 | ||
700 | `$else' | |
701 | Commands in this branch of the `$if' directive are executed if the | |
702 | test fails. | |
703 | ||
704 | `$include' | |
705 | This directive takes a single filename as an argument and reads | |
84041b4c EZ |
706 | commands and bindings from that file. For example, the following |
707 | directive reads from `/etc/inputrc': | |
f9267e15 EZ |
708 | $include /etc/inputrc |
709 | ||
710 | \1f | |
711 | File: rluserman.info, Node: Sample Init File, Prev: Conditional Init Constructs, Up: Readline Init File | |
712 | ||
b585a9fa EZ |
713 | 1.3.3 Sample Init File |
714 | ---------------------- | |
f9267e15 | 715 | |
b585a9fa EZ |
716 | Here is an example of an INPUTRC file. This illustrates key binding, |
717 | variable assignment, and conditional syntax. | |
f9267e15 EZ |
718 | |
719 | ||
720 | # This file controls the behaviour of line input editing for | |
84041b4c EZ |
721 | # programs that use the GNU Readline library. Existing |
722 | # programs include FTP, Bash, and GDB. | |
f9267e15 EZ |
723 | # |
724 | # You can re-read the inputrc file with C-x C-r. | |
725 | # Lines beginning with '#' are comments. | |
726 | # | |
84041b4c EZ |
727 | # First, include any systemwide bindings and variable |
728 | # assignments from /etc/Inputrc | |
f9267e15 | 729 | $include /etc/Inputrc |
b585a9fa | 730 | |
f9267e15 EZ |
731 | # |
732 | # Set various bindings for emacs mode. | |
b585a9fa | 733 | |
f9267e15 | 734 | set editing-mode emacs |
b585a9fa | 735 | |
f9267e15 | 736 | $if mode=emacs |
b585a9fa | 737 | |
f9267e15 | 738 | Meta-Control-h: backward-kill-word Text after the function name is ignored |
b585a9fa | 739 | |
f9267e15 EZ |
740 | # |
741 | # Arrow keys in keypad mode | |
742 | # | |
743 | #"\M-OD": backward-char | |
744 | #"\M-OC": forward-char | |
745 | #"\M-OA": previous-history | |
746 | #"\M-OB": next-history | |
747 | # | |
748 | # Arrow keys in ANSI mode | |
749 | # | |
750 | "\M-[D": backward-char | |
751 | "\M-[C": forward-char | |
752 | "\M-[A": previous-history | |
753 | "\M-[B": next-history | |
754 | # | |
755 | # Arrow keys in 8 bit keypad mode | |
756 | # | |
757 | #"\M-\C-OD": backward-char | |
758 | #"\M-\C-OC": forward-char | |
759 | #"\M-\C-OA": previous-history | |
760 | #"\M-\C-OB": next-history | |
761 | # | |
762 | # Arrow keys in 8 bit ANSI mode | |
763 | # | |
764 | #"\M-\C-[D": backward-char | |
765 | #"\M-\C-[C": forward-char | |
766 | #"\M-\C-[A": previous-history | |
767 | #"\M-\C-[B": next-history | |
b585a9fa | 768 | |
f9267e15 | 769 | C-q: quoted-insert |
b585a9fa | 770 | |
f9267e15 | 771 | $endif |
b585a9fa | 772 | |
f9267e15 EZ |
773 | # An old-style binding. This happens to be the default. |
774 | TAB: complete | |
b585a9fa | 775 | |
f9267e15 EZ |
776 | # Macros that are convenient for shell interaction |
777 | $if Bash | |
778 | # edit the path | |
779 | "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f" | |
84041b4c EZ |
780 | # prepare to type a quoted word -- |
781 | # insert open and close double quotes | |
f9267e15 EZ |
782 | # and move to just after the open quote |
783 | "\C-x\"": "\"\"\C-b" | |
84041b4c EZ |
784 | # insert a backslash (testing backslash escapes |
785 | # in sequences and macros) | |
f9267e15 EZ |
786 | "\C-x\\": "\\" |
787 | # Quote the current or previous word | |
788 | "\C-xq": "\eb\"\ef\"" | |
789 | # Add a binding to refresh the line, which is unbound | |
790 | "\C-xr": redraw-current-line | |
791 | # Edit variable on current line. | |
792 | "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y=" | |
793 | $endif | |
b585a9fa | 794 | |
f9267e15 EZ |
795 | # use a visible bell if one is available |
796 | set bell-style visible | |
b585a9fa | 797 | |
f9267e15 EZ |
798 | # don't strip characters to 7 bits when reading |
799 | set input-meta on | |
b585a9fa | 800 | |
84041b4c EZ |
801 | # allow iso-latin1 characters to be inserted rather |
802 | # than converted to prefix-meta sequences | |
f9267e15 | 803 | set convert-meta off |
b585a9fa | 804 | |
84041b4c EZ |
805 | # display characters with the eighth bit set directly |
806 | # rather than as meta-prefixed characters | |
f9267e15 | 807 | set output-meta on |
b585a9fa | 808 | |
84041b4c EZ |
809 | # if there are more than 150 possible completions for |
810 | # a word, ask the user if he wants to see all of them | |
f9267e15 | 811 | set completion-query-items 150 |
b585a9fa | 812 | |
f9267e15 EZ |
813 | # For FTP |
814 | $if Ftp | |
815 | "\C-xg": "get \M-?" | |
816 | "\C-xt": "put \M-?" | |
817 | "\M-.": yank-last-arg | |
818 | $endif | |
819 | ||
820 | \1f | |
821 | File: rluserman.info, Node: Bindable Readline Commands, Next: Readline vi Mode, Prev: Readline Init File, Up: Command Line Editing | |
822 | ||
b585a9fa EZ |
823 | 1.4 Bindable Readline Commands |
824 | ============================== | |
f9267e15 EZ |
825 | |
826 | * Menu: | |
827 | ||
828 | * Commands For Moving:: Moving about the line. | |
829 | * Commands For History:: Getting at previous lines. | |
830 | * Commands For Text:: Commands for changing text. | |
831 | * Commands For Killing:: Commands for killing and yanking. | |
832 | * Numeric Arguments:: Specifying numeric arguments, repeat counts. | |
833 | * Commands For Completion:: Getting Readline to do the typing for you. | |
834 | * Keyboard Macros:: Saving and re-executing typed characters | |
835 | * Miscellaneous Commands:: Other miscellaneous commands. | |
836 | ||
837 | This section describes Readline commands that may be bound to key | |
84041b4c EZ |
838 | sequences. Command names without an accompanying key sequence are |
839 | unbound by default. | |
f9267e15 | 840 | |
84041b4c EZ |
841 | In the following descriptions, "point" refers to the current cursor |
842 | position, and "mark" refers to a cursor position saved by the | |
f9267e15 | 843 | `set-mark' command. The text between the point and mark is referred to |
84041b4c | 844 | as the "region". |
f9267e15 EZ |
845 | |
846 | \1f | |
847 | File: rluserman.info, Node: Commands For Moving, Next: Commands For History, Up: Bindable Readline Commands | |
848 | ||
b585a9fa EZ |
849 | 1.4.1 Commands For Moving |
850 | ------------------------- | |
f9267e15 EZ |
851 | |
852 | `beginning-of-line (C-a)' | |
853 | Move to the start of the current line. | |
854 | ||
855 | `end-of-line (C-e)' | |
856 | Move to the end of the line. | |
857 | ||
858 | `forward-char (C-f)' | |
859 | Move forward a character. | |
860 | ||
861 | `backward-char (C-b)' | |
862 | Move back a character. | |
863 | ||
864 | `forward-word (M-f)' | |
865 | Move forward to the end of the next word. Words are composed of | |
866 | letters and digits. | |
867 | ||
868 | `backward-word (M-b)' | |
869 | Move back to the start of the current or previous word. Words are | |
870 | composed of letters and digits. | |
871 | ||
872 | `clear-screen (C-l)' | |
873 | Clear the screen and redraw the current line, leaving the current | |
874 | line at the top of the screen. | |
875 | ||
876 | `redraw-current-line ()' | |
877 | Refresh the current line. By default, this is unbound. | |
878 | ||
b585a9fa | 879 | |
f9267e15 EZ |
880 | \1f |
881 | File: rluserman.info, Node: Commands For History, Next: Commands For Text, Prev: Commands For Moving, Up: Bindable Readline Commands | |
882 | ||
b585a9fa EZ |
883 | 1.4.2 Commands For Manipulating The History |
884 | ------------------------------------------- | |
f9267e15 | 885 | |
84041b4c | 886 | `accept-line (Newline or Return)' |
f9267e15 | 887 | Accept the line regardless of where the cursor is. If this line is |
84041b4c EZ |
888 | non-empty, it may be added to the history list for future recall |
889 | with `add_history()'. If this line is a modified history line, | |
890 | the history line is restored to its original state. | |
f9267e15 EZ |
891 | |
892 | `previous-history (C-p)' | |
84041b4c EZ |
893 | Move `back' through the history list, fetching the previous |
894 | command. | |
f9267e15 EZ |
895 | |
896 | `next-history (C-n)' | |
84041b4c | 897 | Move `forward' through the history list, fetching the next command. |
f9267e15 EZ |
898 | |
899 | `beginning-of-history (M-<)' | |
900 | Move to the first line in the history. | |
901 | ||
902 | `end-of-history (M->)' | |
903 | Move to the end of the input history, i.e., the line currently | |
904 | being entered. | |
905 | ||
906 | `reverse-search-history (C-r)' | |
907 | Search backward starting at the current line and moving `up' | |
908 | through the history as necessary. This is an incremental search. | |
909 | ||
910 | `forward-search-history (C-s)' | |
911 | Search forward starting at the current line and moving `down' | |
912 | through the the history as necessary. This is an incremental | |
913 | search. | |
914 | ||
915 | `non-incremental-reverse-search-history (M-p)' | |
916 | Search backward starting at the current line and moving `up' | |
917 | through the history as necessary using a non-incremental search | |
918 | for a string supplied by the user. | |
919 | ||
920 | `non-incremental-forward-search-history (M-n)' | |
921 | Search forward starting at the current line and moving `down' | |
922 | through the the history as necessary using a non-incremental search | |
923 | for a string supplied by the user. | |
924 | ||
925 | `history-search-forward ()' | |
926 | Search forward through the history for the string of characters | |
927 | between the start of the current line and the point. This is a | |
928 | non-incremental search. By default, this command is unbound. | |
929 | ||
930 | `history-search-backward ()' | |
931 | Search backward through the history for the string of characters | |
932 | between the start of the current line and the point. This is a | |
933 | non-incremental search. By default, this command is unbound. | |
934 | ||
935 | `yank-nth-arg (M-C-y)' | |
936 | Insert the first argument to the previous command (usually the | |
84041b4c EZ |
937 | second word on the previous line) at point. With an argument N, |
938 | insert the Nth word from the previous command (the words in the | |
939 | previous command begin with word 0). A negative argument inserts | |
b585a9fa EZ |
940 | the Nth word from the end of the previous command. Once the |
941 | argument N is computed, the argument is extracted as if the `!N' | |
942 | history expansion had been specified. | |
f9267e15 | 943 | |
84041b4c | 944 | `yank-last-arg (M-. or M-_)' |
f9267e15 EZ |
945 | Insert last argument to the previous command (the last word of the |
946 | previous history entry). With an argument, behave exactly like | |
947 | `yank-nth-arg'. Successive calls to `yank-last-arg' move back | |
948 | through the history list, inserting the last argument of each line | |
b585a9fa EZ |
949 | in turn. The history expansion facilities are used to extract the |
950 | last argument, as if the `!$' history expansion had been specified. | |
951 | ||
f9267e15 EZ |
952 | |
953 | \1f | |
954 | File: rluserman.info, Node: Commands For Text, Next: Commands For Killing, Prev: Commands For History, Up: Bindable Readline Commands | |
955 | ||
b585a9fa EZ |
956 | 1.4.3 Commands For Changing Text |
957 | -------------------------------- | |
f9267e15 EZ |
958 | |
959 | `delete-char (C-d)' | |
84041b4c EZ |
960 | Delete the character at point. If point is at the beginning of |
961 | the line, there are no characters in the line, and the last | |
962 | character typed was not bound to `delete-char', then return EOF. | |
f9267e15 EZ |
963 | |
964 | `backward-delete-char (Rubout)' | |
965 | Delete the character behind the cursor. A numeric argument means | |
966 | to kill the characters instead of deleting them. | |
967 | ||
968 | `forward-backward-delete-char ()' | |
969 | Delete the character under the cursor, unless the cursor is at the | |
970 | end of the line, in which case the character behind the cursor is | |
971 | deleted. By default, this is not bound to a key. | |
972 | ||
84041b4c | 973 | `quoted-insert (C-q or C-v)' |
f9267e15 | 974 | Add the next character typed to the line verbatim. This is how to |
84041b4c | 975 | insert key sequences like `C-q', for example. |
f9267e15 | 976 | |
84041b4c | 977 | `tab-insert (M-<TAB>)' |
f9267e15 EZ |
978 | Insert a tab character. |
979 | ||
980 | `self-insert (a, b, A, 1, !, ...)' | |
981 | Insert yourself. | |
982 | ||
983 | `transpose-chars (C-t)' | |
984 | Drag the character before the cursor forward over the character at | |
985 | the cursor, moving the cursor forward as well. If the insertion | |
986 | point is at the end of the line, then this transposes the last two | |
987 | characters of the line. Negative arguments have no effect. | |
988 | ||
989 | `transpose-words (M-t)' | |
990 | Drag the word before point past the word after point, moving point | |
84041b4c EZ |
991 | past that word as well. If the insertion point is at the end of |
992 | the line, this transposes the last two words on the line. | |
f9267e15 EZ |
993 | |
994 | `upcase-word (M-u)' | |
995 | Uppercase the current (or following) word. With a negative | |
996 | argument, uppercase the previous word, but do not move the cursor. | |
997 | ||
998 | `downcase-word (M-l)' | |
999 | Lowercase the current (or following) word. With a negative | |
1000 | argument, lowercase the previous word, but do not move the cursor. | |
1001 | ||
1002 | `capitalize-word (M-c)' | |
1003 | Capitalize the current (or following) word. With a negative | |
1004 | argument, capitalize the previous word, but do not move the cursor. | |
1005 | ||
84041b4c EZ |
1006 | `overwrite-mode ()' |
1007 | Toggle overwrite mode. With an explicit positive numeric argument, | |
1008 | switches to overwrite mode. With an explicit non-positive numeric | |
1009 | argument, switches to insert mode. This command affects only | |
1010 | `emacs' mode; `vi' mode does overwrite differently. Each call to | |
1011 | `readline()' starts in insert mode. | |
1012 | ||
1013 | In overwrite mode, characters bound to `self-insert' replace the | |
1014 | text at point rather than pushing the text to the right. | |
1015 | Characters bound to `backward-delete-char' replace the character | |
1016 | before point with a space. | |
1017 | ||
1018 | By default, this command is unbound. | |
1019 | ||
b585a9fa | 1020 | |
f9267e15 EZ |
1021 | \1f |
1022 | File: rluserman.info, Node: Commands For Killing, Next: Numeric Arguments, Prev: Commands For Text, Up: Bindable Readline Commands | |
1023 | ||
b585a9fa EZ |
1024 | 1.4.4 Killing And Yanking |
1025 | ------------------------- | |
f9267e15 EZ |
1026 | |
1027 | `kill-line (C-k)' | |
1028 | Kill the text from point to the end of the line. | |
1029 | ||
1030 | `backward-kill-line (C-x Rubout)' | |
1031 | Kill backward to the beginning of the line. | |
1032 | ||
1033 | `unix-line-discard (C-u)' | |
1034 | Kill backward from the cursor to the beginning of the current line. | |
1035 | ||
1036 | `kill-whole-line ()' | |
84041b4c EZ |
1037 | Kill all characters on the current line, no matter where point is. |
1038 | By default, this is unbound. | |
f9267e15 EZ |
1039 | |
1040 | `kill-word (M-d)' | |
1041 | Kill from point to the end of the current word, or if between | |
1042 | words, to the end of the next word. Word boundaries are the same | |
1043 | as `forward-word'. | |
1044 | ||
84041b4c | 1045 | `backward-kill-word (M-<DEL>)' |
f9267e15 EZ |
1046 | Kill the word behind point. Word boundaries are the same as |
1047 | `backward-word'. | |
1048 | ||
1049 | `unix-word-rubout (C-w)' | |
1050 | Kill the word behind point, using white space as a word boundary. | |
1051 | The killed text is saved on the kill-ring. | |
1052 | ||
b585a9fa EZ |
1053 | `unix-filename-rubout ()' |
1054 | Kill the word behind point, using white space and the slash | |
1055 | character as the word boundaries. The killed text is saved on the | |
1056 | kill-ring. | |
1057 | ||
f9267e15 EZ |
1058 | `delete-horizontal-space ()' |
1059 | Delete all spaces and tabs around point. By default, this is | |
1060 | unbound. | |
1061 | ||
1062 | `kill-region ()' | |
1063 | Kill the text in the current region. By default, this command is | |
1064 | unbound. | |
1065 | ||
1066 | `copy-region-as-kill ()' | |
1067 | Copy the text in the region to the kill buffer, so it can be yanked | |
1068 | right away. By default, this command is unbound. | |
1069 | ||
1070 | `copy-backward-word ()' | |
1071 | Copy the word before point to the kill buffer. The word | |
1072 | boundaries are the same as `backward-word'. By default, this | |
1073 | command is unbound. | |
1074 | ||
1075 | `copy-forward-word ()' | |
1076 | Copy the word following point to the kill buffer. The word | |
1077 | boundaries are the same as `forward-word'. By default, this | |
1078 | command is unbound. | |
1079 | ||
1080 | `yank (C-y)' | |
84041b4c | 1081 | Yank the top of the kill ring into the buffer at point. |
f9267e15 EZ |
1082 | |
1083 | `yank-pop (M-y)' | |
1084 | Rotate the kill-ring, and yank the new top. You can only do this | |
84041b4c | 1085 | if the prior command is `yank' or `yank-pop'. |
f9267e15 EZ |
1086 | |
1087 | \1f | |
1088 | File: rluserman.info, Node: Numeric Arguments, Next: Commands For Completion, Prev: Commands For Killing, Up: Bindable Readline Commands | |
1089 | ||
b585a9fa EZ |
1090 | 1.4.5 Specifying Numeric Arguments |
1091 | ---------------------------------- | |
f9267e15 EZ |
1092 | |
1093 | `digit-argument (M-0, M-1, ... M--)' | |
1094 | Add this digit to the argument already accumulating, or start a new | |
84041b4c | 1095 | argument. `M--' starts a negative argument. |
f9267e15 EZ |
1096 | |
1097 | `universal-argument ()' | |
1098 | This is another way to specify an argument. If this command is | |
1099 | followed by one or more digits, optionally with a leading minus | |
1100 | sign, those digits define the argument. If the command is | |
1101 | followed by digits, executing `universal-argument' again ends the | |
1102 | numeric argument, but is otherwise ignored. As a special case, if | |
1103 | this command is immediately followed by a character that is | |
1104 | neither a digit or minus sign, the argument count for the next | |
1105 | command is multiplied by four. The argument count is initially | |
1106 | one, so executing this function the first time makes the argument | |
1107 | count four, a second time makes the argument count sixteen, and so | |
1108 | on. By default, this is not bound to a key. | |
1109 | ||
1110 | \1f | |
1111 | File: rluserman.info, Node: Commands For Completion, Next: Keyboard Macros, Prev: Numeric Arguments, Up: Bindable Readline Commands | |
1112 | ||
b585a9fa EZ |
1113 | 1.4.6 Letting Readline Type For You |
1114 | ----------------------------------- | |
f9267e15 | 1115 | |
84041b4c EZ |
1116 | `complete (<TAB>)' |
1117 | Attempt to perform completion on the text before point. The | |
1118 | actual completion performed is application-specific. The default | |
1119 | is filename completion. | |
f9267e15 EZ |
1120 | |
1121 | `possible-completions (M-?)' | |
84041b4c | 1122 | List the possible completions of the text before point. |
f9267e15 EZ |
1123 | |
1124 | `insert-completions (M-*)' | |
1125 | Insert all completions of the text before point that would have | |
1126 | been generated by `possible-completions'. | |
1127 | ||
1128 | `menu-complete ()' | |
1129 | Similar to `complete', but replaces the word to be completed with | |
1130 | a single match from the list of possible completions. Repeated | |
1131 | execution of `menu-complete' steps through the list of possible | |
1132 | completions, inserting each match in turn. At the end of the list | |
84041b4c EZ |
1133 | of completions, the bell is rung (subject to the setting of |
1134 | `bell-style') and the original text is restored. An argument of N | |
1135 | moves N positions forward in the list of matches; a negative | |
1136 | argument may be used to move backward through the list. This | |
1137 | command is intended to be bound to <TAB>, but is unbound by | |
f9267e15 EZ |
1138 | default. |
1139 | ||
1140 | `delete-char-or-list ()' | |
1141 | Deletes the character under the cursor if not at the beginning or | |
1142 | end of the line (like `delete-char'). If at the end of the line, | |
1143 | behaves identically to `possible-completions'. This command is | |
1144 | unbound by default. | |
1145 | ||
b585a9fa | 1146 | |
f9267e15 EZ |
1147 | \1f |
1148 | File: rluserman.info, Node: Keyboard Macros, Next: Miscellaneous Commands, Prev: Commands For Completion, Up: Bindable Readline Commands | |
1149 | ||
b585a9fa EZ |
1150 | 1.4.7 Keyboard Macros |
1151 | --------------------- | |
f9267e15 EZ |
1152 | |
1153 | `start-kbd-macro (C-x ()' | |
1154 | Begin saving the characters typed into the current keyboard macro. | |
1155 | ||
1156 | `end-kbd-macro (C-x ))' | |
1157 | Stop saving the characters typed into the current keyboard macro | |
1158 | and save the definition. | |
1159 | ||
1160 | `call-last-kbd-macro (C-x e)' | |
1161 | Re-execute the last keyboard macro defined, by making the | |
1162 | characters in the macro appear as if typed at the keyboard. | |
1163 | ||
b585a9fa | 1164 | |
f9267e15 EZ |
1165 | \1f |
1166 | File: rluserman.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up: Bindable Readline Commands | |
1167 | ||
b585a9fa EZ |
1168 | 1.4.8 Some Miscellaneous Commands |
1169 | --------------------------------- | |
f9267e15 EZ |
1170 | |
1171 | `re-read-init-file (C-x C-r)' | |
1172 | Read in the contents of the INPUTRC file, and incorporate any | |
1173 | bindings or variable assignments found there. | |
1174 | ||
1175 | `abort (C-g)' | |
1176 | Abort the current editing command and ring the terminal's bell | |
1177 | (subject to the setting of `bell-style'). | |
1178 | ||
1179 | `do-uppercase-version (M-a, M-b, M-X, ...)' | |
1180 | If the metafied character X is lowercase, run the command that is | |
1181 | bound to the corresponding uppercase character. | |
1182 | ||
84041b4c EZ |
1183 | `prefix-meta (<ESC>)' |
1184 | Metafy the next character typed. This is for keyboards without a | |
1185 | meta key. Typing `<ESC> f' is equivalent to typing `M-f'. | |
f9267e15 | 1186 | |
84041b4c | 1187 | `undo (C-_ or C-x C-u)' |
f9267e15 EZ |
1188 | Incremental undo, separately remembered for each line. |
1189 | ||
1190 | `revert-line (M-r)' | |
1191 | Undo all changes made to this line. This is like executing the | |
1192 | `undo' command enough times to get back to the beginning. | |
1193 | ||
1194 | `tilde-expand (M-~)' | |
1195 | Perform tilde expansion on the current word. | |
1196 | ||
1197 | `set-mark (C-@)' | |
84041b4c EZ |
1198 | Set the mark to the point. If a numeric argument is supplied, the |
1199 | mark is set to that position. | |
f9267e15 EZ |
1200 | |
1201 | `exchange-point-and-mark (C-x C-x)' | |
1202 | Swap the point with the mark. The current cursor position is set | |
1203 | to the saved position, and the old cursor position is saved as the | |
1204 | mark. | |
1205 | ||
1206 | `character-search (C-])' | |
1207 | A character is read and point is moved to the next occurrence of | |
1208 | that character. A negative count searches for previous | |
1209 | occurrences. | |
1210 | ||
1211 | `character-search-backward (M-C-])' | |
1212 | A character is read and point is moved to the previous occurrence | |
1213 | of that character. A negative count searches for subsequent | |
1214 | occurrences. | |
1215 | ||
1216 | `insert-comment (M-#)' | |
84041b4c EZ |
1217 | Without a numeric argument, the value of the `comment-begin' |
1218 | variable is inserted at the beginning of the current line. If a | |
1219 | numeric argument is supplied, this command acts as a toggle: if | |
1220 | the characters at the beginning of the line do not match the value | |
1221 | of `comment-begin', the value is inserted, otherwise the | |
1222 | characters in `comment-begin' are deleted from the beginning of | |
1223 | the line. In either case, the line is accepted as if a newline | |
1224 | had been typed. | |
f9267e15 EZ |
1225 | |
1226 | `dump-functions ()' | |
1227 | Print all of the functions and their key bindings to the Readline | |
1228 | output stream. If a numeric argument is supplied, the output is | |
1229 | formatted in such a way that it can be made part of an INPUTRC | |
1230 | file. This command is unbound by default. | |
1231 | ||
1232 | `dump-variables ()' | |
1233 | Print all of the settable variables and their values to the | |
1234 | Readline output stream. If a numeric argument is supplied, the | |
1235 | output is formatted in such a way that it can be made part of an | |
1236 | INPUTRC file. This command is unbound by default. | |
1237 | ||
1238 | `dump-macros ()' | |
1239 | Print all of the Readline key sequences bound to macros and the | |
84041b4c EZ |
1240 | strings they output. If a numeric argument is supplied, the |
1241 | output is formatted in such a way that it can be made part of an | |
1242 | INPUTRC file. This command is unbound by default. | |
1243 | ||
1244 | `emacs-editing-mode (C-e)' | |
1245 | When in `vi' command mode, this causes a switch to `emacs' editing | |
1246 | mode. | |
1247 | ||
1248 | `vi-editing-mode (M-C-j)' | |
1249 | When in `emacs' editing mode, this causes a switch to `vi' editing | |
1250 | mode. | |
f9267e15 | 1251 | |
b585a9fa | 1252 | |
f9267e15 EZ |
1253 | \1f |
1254 | File: rluserman.info, Node: Readline vi Mode, Prev: Bindable Readline Commands, Up: Command Line Editing | |
1255 | ||
b585a9fa EZ |
1256 | 1.5 Readline vi Mode |
1257 | ==================== | |
f9267e15 | 1258 | |
b585a9fa | 1259 | While the Readline library does not have a full set of `vi' editing |
f9267e15 EZ |
1260 | functions, it does contain enough to allow simple editing of the line. |
1261 | The Readline `vi' mode behaves as specified in the POSIX 1003.2 | |
1262 | standard. | |
1263 | ||
1264 | In order to switch interactively between `emacs' and `vi' editing | |
84041b4c EZ |
1265 | modes, use the command `M-C-j' (bound to emacs-editing-mode when in |
1266 | `vi' mode and to vi-editing-mode in `emacs' mode). The Readline | |
f9267e15 EZ |
1267 | default is `emacs' mode. |
1268 | ||
1269 | When you enter a line in `vi' mode, you are already placed in | |
1270 | `insertion' mode, as if you had typed an `i'. Pressing <ESC> switches | |
1271 | you into `command' mode, where you can edit the text of the line with | |
1272 | the standard `vi' movement keys, move to previous history lines with | |
1273 | `k' and subsequent lines with `j', and so forth. | |
1274 | ||
b585a9fa EZ |
1275 | \1f |
1276 | File: rluserman.info, Node: Copying This Manual, Prev: Command Line Editing, Up: Top | |
1277 | ||
1278 | Appendix A Copying This Manual | |
1279 | ****************************** | |
1280 | ||
1281 | * Menu: | |
1282 | ||
1283 | * GNU Free Documentation License:: License for copying this manual. | |
1284 | ||
1285 | \1f | |
1286 | File: rluserman.info, Node: GNU Free Documentation License, Up: Copying This Manual | |
1287 | ||
1288 | A.1 GNU Free Documentation License | |
1289 | ================================== | |
1290 | ||
1291 | Version 1.2, November 2002 | |
1292 | ||
1293 | Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. | |
1294 | 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA | |
1295 | ||
1296 | Everyone is permitted to copy and distribute verbatim copies | |
1297 | of this license document, but changing it is not allowed. | |
1298 | ||
1299 | 0. PREAMBLE | |
1300 | ||
1301 | The purpose of this License is to make a manual, textbook, or other | |
1302 | functional and useful document "free" in the sense of freedom: to | |
1303 | assure everyone the effective freedom to copy and redistribute it, | |
1304 | with or without modifying it, either commercially or | |
1305 | noncommercially. Secondarily, this License preserves for the | |
1306 | author and publisher a way to get credit for their work, while not | |
1307 | being considered responsible for modifications made by others. | |
1308 | ||
1309 | This License is a kind of "copyleft", which means that derivative | |
1310 | works of the document must themselves be free in the same sense. | |
1311 | It complements the GNU General Public License, which is a copyleft | |
1312 | license designed for free software. | |
1313 | ||
1314 | We have designed this License in order to use it for manuals for | |
1315 | free software, because free software needs free documentation: a | |
1316 | free program should come with manuals providing the same freedoms | |
1317 | that the software does. But this License is not limited to | |
1318 | software manuals; it can be used for any textual work, regardless | |
1319 | of subject matter or whether it is published as a printed book. | |
1320 | We recommend this License principally for works whose purpose is | |
1321 | instruction or reference. | |
1322 | ||
1323 | 1. APPLICABILITY AND DEFINITIONS | |
1324 | ||
1325 | This License applies to any manual or other work, in any medium, | |
1326 | that contains a notice placed by the copyright holder saying it | |
1327 | can be distributed under the terms of this License. Such a notice | |
1328 | grants a world-wide, royalty-free license, unlimited in duration, | |
1329 | to use that work under the conditions stated herein. The | |
1330 | "Document", below, refers to any such manual or work. Any member | |
1331 | of the public is a licensee, and is addressed as "you". You | |
1332 | accept the license if you copy, modify or distribute the work in a | |
1333 | way requiring permission under copyright law. | |
1334 | ||
1335 | A "Modified Version" of the Document means any work containing the | |
1336 | Document or a portion of it, either copied verbatim, or with | |
1337 | modifications and/or translated into another language. | |
1338 | ||
1339 | A "Secondary Section" is a named appendix or a front-matter section | |
1340 | of the Document that deals exclusively with the relationship of the | |
1341 | publishers or authors of the Document to the Document's overall | |
1342 | subject (or to related matters) and contains nothing that could | |
1343 | fall directly within that overall subject. (Thus, if the Document | |
1344 | is in part a textbook of mathematics, a Secondary Section may not | |
1345 | explain any mathematics.) The relationship could be a matter of | |
1346 | historical connection with the subject or with related matters, or | |
1347 | of legal, commercial, philosophical, ethical or political position | |
1348 | regarding them. | |
1349 | ||
1350 | The "Invariant Sections" are certain Secondary Sections whose | |
1351 | titles are designated, as being those of Invariant Sections, in | |
1352 | the notice that says that the Document is released under this | |
1353 | License. If a section does not fit the above definition of | |
1354 | Secondary then it is not allowed to be designated as Invariant. | |
1355 | The Document may contain zero Invariant Sections. If the Document | |
1356 | does not identify any Invariant Sections then there are none. | |
1357 | ||
1358 | The "Cover Texts" are certain short passages of text that are | |
1359 | listed, as Front-Cover Texts or Back-Cover Texts, in the notice | |
1360 | that says that the Document is released under this License. A | |
1361 | Front-Cover Text may be at most 5 words, and a Back-Cover Text may | |
1362 | be at most 25 words. | |
1363 | ||
1364 | A "Transparent" copy of the Document means a machine-readable copy, | |
1365 | represented in a format whose specification is available to the | |
1366 | general public, that is suitable for revising the document | |
1367 | straightforwardly with generic text editors or (for images | |
1368 | composed of pixels) generic paint programs or (for drawings) some | |
1369 | widely available drawing editor, and that is suitable for input to | |
1370 | text formatters or for automatic translation to a variety of | |
1371 | formats suitable for input to text formatters. A copy made in an | |
1372 | otherwise Transparent file format whose markup, or absence of | |
1373 | markup, has been arranged to thwart or discourage subsequent | |
1374 | modification by readers is not Transparent. An image format is | |
1375 | not Transparent if used for any substantial amount of text. A | |
1376 | copy that is not "Transparent" is called "Opaque". | |
1377 | ||
1378 | Examples of suitable formats for Transparent copies include plain | |
1379 | ASCII without markup, Texinfo input format, LaTeX input format, | |
1380 | SGML or XML using a publicly available DTD, and | |
1381 | standard-conforming simple HTML, PostScript or PDF designed for | |
1382 | human modification. Examples of transparent image formats include | |
1383 | PNG, XCF and JPG. Opaque formats include proprietary formats that | |
1384 | can be read and edited only by proprietary word processors, SGML or | |
1385 | XML for which the DTD and/or processing tools are not generally | |
1386 | available, and the machine-generated HTML, PostScript or PDF | |
1387 | produced by some word processors for output purposes only. | |
1388 | ||
1389 | The "Title Page" means, for a printed book, the title page itself, | |
1390 | plus such following pages as are needed to hold, legibly, the | |
1391 | material this License requires to appear in the title page. For | |
1392 | works in formats which do not have any title page as such, "Title | |
1393 | Page" means the text near the most prominent appearance of the | |
1394 | work's title, preceding the beginning of the body of the text. | |
1395 | ||
1396 | A section "Entitled XYZ" means a named subunit of the Document | |
1397 | whose title either is precisely XYZ or contains XYZ in parentheses | |
1398 | following text that translates XYZ in another language. (Here XYZ | |
1399 | stands for a specific section name mentioned below, such as | |
1400 | "Acknowledgements", "Dedications", "Endorsements", or "History".) | |
1401 | To "Preserve the Title" of such a section when you modify the | |
1402 | Document means that it remains a section "Entitled XYZ" according | |
1403 | to this definition. | |
1404 | ||
1405 | The Document may include Warranty Disclaimers next to the notice | |
1406 | which states that this License applies to the Document. These | |
1407 | Warranty Disclaimers are considered to be included by reference in | |
1408 | this License, but only as regards disclaiming warranties: any other | |
1409 | implication that these Warranty Disclaimers may have is void and | |
1410 | has no effect on the meaning of this License. | |
1411 | ||
1412 | 2. VERBATIM COPYING | |
1413 | ||
1414 | You may copy and distribute the Document in any medium, either | |
1415 | commercially or noncommercially, provided that this License, the | |
1416 | copyright notices, and the license notice saying this License | |
1417 | applies to the Document are reproduced in all copies, and that you | |
1418 | add no other conditions whatsoever to those of this License. You | |
1419 | may not use technical measures to obstruct or control the reading | |
1420 | or further copying of the copies you make or distribute. However, | |
1421 | you may accept compensation in exchange for copies. If you | |
1422 | distribute a large enough number of copies you must also follow | |
1423 | the conditions in section 3. | |
1424 | ||
1425 | You may also lend copies, under the same conditions stated above, | |
1426 | and you may publicly display copies. | |
1427 | ||
1428 | 3. COPYING IN QUANTITY | |
1429 | ||
1430 | If you publish printed copies (or copies in media that commonly | |
1431 | have printed covers) of the Document, numbering more than 100, and | |
1432 | the Document's license notice requires Cover Texts, you must | |
1433 | enclose the copies in covers that carry, clearly and legibly, all | |
1434 | these Cover Texts: Front-Cover Texts on the front cover, and | |
1435 | Back-Cover Texts on the back cover. Both covers must also clearly | |
1436 | and legibly identify you as the publisher of these copies. The | |
1437 | front cover must present the full title with all words of the | |
1438 | title equally prominent and visible. You may add other material | |
1439 | on the covers in addition. Copying with changes limited to the | |
1440 | covers, as long as they preserve the title of the Document and | |
1441 | satisfy these conditions, can be treated as verbatim copying in | |
1442 | other respects. | |
1443 | ||
1444 | If the required texts for either cover are too voluminous to fit | |
1445 | legibly, you should put the first ones listed (as many as fit | |
1446 | reasonably) on the actual cover, and continue the rest onto | |
1447 | adjacent pages. | |
1448 | ||
1449 | If you publish or distribute Opaque copies of the Document | |
1450 | numbering more than 100, you must either include a | |
1451 | machine-readable Transparent copy along with each Opaque copy, or | |
1452 | state in or with each Opaque copy a computer-network location from | |
1453 | which the general network-using public has access to download | |
1454 | using public-standard network protocols a complete Transparent | |
1455 | copy of the Document, free of added material. If you use the | |
1456 | latter option, you must take reasonably prudent steps, when you | |
1457 | begin distribution of Opaque copies in quantity, to ensure that | |
1458 | this Transparent copy will remain thus accessible at the stated | |
1459 | location until at least one year after the last time you | |
1460 | distribute an Opaque copy (directly or through your agents or | |
1461 | retailers) of that edition to the public. | |
1462 | ||
1463 | It is requested, but not required, that you contact the authors of | |
1464 | the Document well before redistributing any large number of | |
1465 | copies, to give them a chance to provide you with an updated | |
1466 | version of the Document. | |
1467 | ||
1468 | 4. MODIFICATIONS | |
1469 | ||
1470 | You may copy and distribute a Modified Version of the Document | |
1471 | under the conditions of sections 2 and 3 above, provided that you | |
1472 | release the Modified Version under precisely this License, with | |
1473 | the Modified Version filling the role of the Document, thus | |
1474 | licensing distribution and modification of the Modified Version to | |
1475 | whoever possesses a copy of it. In addition, you must do these | |
1476 | things in the Modified Version: | |
1477 | ||
1478 | A. Use in the Title Page (and on the covers, if any) a title | |
1479 | distinct from that of the Document, and from those of | |
1480 | previous versions (which should, if there were any, be listed | |
1481 | in the History section of the Document). You may use the | |
1482 | same title as a previous version if the original publisher of | |
1483 | that version gives permission. | |
1484 | ||
1485 | B. List on the Title Page, as authors, one or more persons or | |
1486 | entities responsible for authorship of the modifications in | |
1487 | the Modified Version, together with at least five of the | |
1488 | principal authors of the Document (all of its principal | |
1489 | authors, if it has fewer than five), unless they release you | |
1490 | from this requirement. | |
1491 | ||
1492 | C. State on the Title page the name of the publisher of the | |
1493 | Modified Version, as the publisher. | |
1494 | ||
1495 | D. Preserve all the copyright notices of the Document. | |
1496 | ||
1497 | E. Add an appropriate copyright notice for your modifications | |
1498 | adjacent to the other copyright notices. | |
1499 | ||
1500 | F. Include, immediately after the copyright notices, a license | |
1501 | notice giving the public permission to use the Modified | |
1502 | Version under the terms of this License, in the form shown in | |
1503 | the Addendum below. | |
1504 | ||
1505 | G. Preserve in that license notice the full lists of Invariant | |
1506 | Sections and required Cover Texts given in the Document's | |
1507 | license notice. | |
1508 | ||
1509 | H. Include an unaltered copy of this License. | |
1510 | ||
1511 | I. Preserve the section Entitled "History", Preserve its Title, | |
1512 | and add to it an item stating at least the title, year, new | |
1513 | authors, and publisher of the Modified Version as given on | |
1514 | the Title Page. If there is no section Entitled "History" in | |
1515 | the Document, create one stating the title, year, authors, | |
1516 | and publisher of the Document as given on its Title Page, | |
1517 | then add an item describing the Modified Version as stated in | |
1518 | the previous sentence. | |
1519 | ||
1520 | J. Preserve the network location, if any, given in the Document | |
1521 | for public access to a Transparent copy of the Document, and | |
1522 | likewise the network locations given in the Document for | |
1523 | previous versions it was based on. These may be placed in | |
1524 | the "History" section. You may omit a network location for a | |
1525 | work that was published at least four years before the | |
1526 | Document itself, or if the original publisher of the version | |
1527 | it refers to gives permission. | |
1528 | ||
1529 | K. For any section Entitled "Acknowledgements" or "Dedications", | |
1530 | Preserve the Title of the section, and preserve in the | |
1531 | section all the substance and tone of each of the contributor | |
1532 | acknowledgements and/or dedications given therein. | |
1533 | ||
1534 | L. Preserve all the Invariant Sections of the Document, | |
1535 | unaltered in their text and in their titles. Section numbers | |
1536 | or the equivalent are not considered part of the section | |
1537 | titles. | |
1538 | ||
1539 | M. Delete any section Entitled "Endorsements". Such a section | |
1540 | may not be included in the Modified Version. | |
1541 | ||
1542 | N. Do not retitle any existing section to be Entitled | |
1543 | "Endorsements" or to conflict in title with any Invariant | |
1544 | Section. | |
1545 | ||
1546 | O. Preserve any Warranty Disclaimers. | |
1547 | ||
1548 | If the Modified Version includes new front-matter sections or | |
1549 | appendices that qualify as Secondary Sections and contain no | |
1550 | material copied from the Document, you may at your option | |
1551 | designate some or all of these sections as invariant. To do this, | |
1552 | add their titles to the list of Invariant Sections in the Modified | |
1553 | Version's license notice. These titles must be distinct from any | |
1554 | other section titles. | |
1555 | ||
1556 | You may add a section Entitled "Endorsements", provided it contains | |
1557 | nothing but endorsements of your Modified Version by various | |
1558 | parties--for example, statements of peer review or that the text | |
1559 | has been approved by an organization as the authoritative | |
1560 | definition of a standard. | |
1561 | ||
1562 | You may add a passage of up to five words as a Front-Cover Text, | |
1563 | and a passage of up to 25 words as a Back-Cover Text, to the end | |
1564 | of the list of Cover Texts in the Modified Version. Only one | |
1565 | passage of Front-Cover Text and one of Back-Cover Text may be | |
1566 | added by (or through arrangements made by) any one entity. If the | |
1567 | Document already includes a cover text for the same cover, | |
1568 | previously added by you or by arrangement made by the same entity | |
1569 | you are acting on behalf of, you may not add another; but you may | |
1570 | replace the old one, on explicit permission from the previous | |
1571 | publisher that added the old one. | |
1572 | ||
1573 | The author(s) and publisher(s) of the Document do not by this | |
1574 | License give permission to use their names for publicity for or to | |
1575 | assert or imply endorsement of any Modified Version. | |
1576 | ||
1577 | 5. COMBINING DOCUMENTS | |
1578 | ||
1579 | You may combine the Document with other documents released under | |
1580 | this License, under the terms defined in section 4 above for | |
1581 | modified versions, provided that you include in the combination | |
1582 | all of the Invariant Sections of all of the original documents, | |
1583 | unmodified, and list them all as Invariant Sections of your | |
1584 | combined work in its license notice, and that you preserve all | |
1585 | their Warranty Disclaimers. | |
1586 | ||
1587 | The combined work need only contain one copy of this License, and | |
1588 | multiple identical Invariant Sections may be replaced with a single | |
1589 | copy. If there are multiple Invariant Sections with the same name | |
1590 | but different contents, make the title of each such section unique | |
1591 | by adding at the end of it, in parentheses, the name of the | |
1592 | original author or publisher of that section if known, or else a | |
1593 | unique number. Make the same adjustment to the section titles in | |
1594 | the list of Invariant Sections in the license notice of the | |
1595 | combined work. | |
1596 | ||
1597 | In the combination, you must combine any sections Entitled | |
1598 | "History" in the various original documents, forming one section | |
1599 | Entitled "History"; likewise combine any sections Entitled | |
1600 | "Acknowledgements", and any sections Entitled "Dedications". You | |
1601 | must delete all sections Entitled "Endorsements." | |
1602 | ||
1603 | 6. COLLECTIONS OF DOCUMENTS | |
1604 | ||
1605 | You may make a collection consisting of the Document and other | |
1606 | documents released under this License, and replace the individual | |
1607 | copies of this License in the various documents with a single copy | |
1608 | that is included in the collection, provided that you follow the | |
1609 | rules of this License for verbatim copying of each of the | |
1610 | documents in all other respects. | |
1611 | ||
1612 | You may extract a single document from such a collection, and | |
1613 | distribute it individually under this License, provided you insert | |
1614 | a copy of this License into the extracted document, and follow | |
1615 | this License in all other respects regarding verbatim copying of | |
1616 | that document. | |
1617 | ||
1618 | 7. AGGREGATION WITH INDEPENDENT WORKS | |
1619 | ||
1620 | A compilation of the Document or its derivatives with other | |
1621 | separate and independent documents or works, in or on a volume of | |
1622 | a storage or distribution medium, is called an "aggregate" if the | |
1623 | copyright resulting from the compilation is not used to limit the | |
1624 | legal rights of the compilation's users beyond what the individual | |
1625 | works permit. When the Document is included an aggregate, this | |
1626 | License does not apply to the other works in the aggregate which | |
1627 | are not themselves derivative works of the Document. | |
1628 | ||
1629 | If the Cover Text requirement of section 3 is applicable to these | |
1630 | copies of the Document, then if the Document is less than one half | |
1631 | of the entire aggregate, the Document's Cover Texts may be placed | |
1632 | on covers that bracket the Document within the aggregate, or the | |
1633 | electronic equivalent of covers if the Document is in electronic | |
1634 | form. Otherwise they must appear on printed covers that bracket | |
1635 | the whole aggregate. | |
1636 | ||
1637 | 8. TRANSLATION | |
1638 | ||
1639 | Translation is considered a kind of modification, so you may | |
1640 | distribute translations of the Document under the terms of section | |
1641 | 4. Replacing Invariant Sections with translations requires special | |
1642 | permission from their copyright holders, but you may include | |
1643 | translations of some or all Invariant Sections in addition to the | |
1644 | original versions of these Invariant Sections. You may include a | |
1645 | translation of this License, and all the license notices in the | |
1646 | Document, and any Warranty Disclaimers, provided that you also | |
1647 | include the original English version of this License and the | |
1648 | original versions of those notices and disclaimers. In case of a | |
1649 | disagreement between the translation and the original version of | |
1650 | this License or a notice or disclaimer, the original version will | |
1651 | prevail. | |
1652 | ||
1653 | If a section in the Document is Entitled "Acknowledgements", | |
1654 | "Dedications", or "History", the requirement (section 4) to | |
1655 | Preserve its Title (section 1) will typically require changing the | |
1656 | actual title. | |
1657 | ||
1658 | 9. TERMINATION | |
1659 | ||
1660 | You may not copy, modify, sublicense, or distribute the Document | |
1661 | except as expressly provided for under this License. Any other | |
1662 | attempt to copy, modify, sublicense or distribute the Document is | |
1663 | void, and will automatically terminate your rights under this | |
1664 | License. However, parties who have received copies, or rights, | |
1665 | from you under this License will not have their licenses | |
1666 | terminated so long as such parties remain in full compliance. | |
1667 | ||
1668 | 10. FUTURE REVISIONS OF THIS LICENSE | |
1669 | ||
1670 | The Free Software Foundation may publish new, revised versions of | |
1671 | the GNU Free Documentation License from time to time. Such new | |
1672 | versions will be similar in spirit to the present version, but may | |
1673 | differ in detail to address new problems or concerns. See | |
1674 | `http://www.gnu.org/copyleft/'. | |
1675 | ||
1676 | Each version of the License is given a distinguishing version | |
1677 | number. If the Document specifies that a particular numbered | |
1678 | version of this License "or any later version" applies to it, you | |
1679 | have the option of following the terms and conditions either of | |
1680 | that specified version or of any later version that has been | |
1681 | published (not as a draft) by the Free Software Foundation. If | |
1682 | the Document does not specify a version number of this License, | |
1683 | you may choose any version ever published (not as a draft) by the | |
1684 | Free Software Foundation. | |
1685 | ||
1686 | A.1.1 ADDENDUM: How to use this License for your documents | |
1687 | ---------------------------------------------------------- | |
1688 | ||
1689 | To use this License in a document you have written, include a copy of | |
1690 | the License in the document and put the following copyright and license | |
1691 | notices just after the title page: | |
1692 | ||
1693 | Copyright (C) YEAR YOUR NAME. | |
1694 | Permission is granted to copy, distribute and/or modify this document | |
1695 | under the terms of the GNU Free Documentation License, Version 1.2 | |
1696 | or any later version published by the Free Software Foundation; | |
1697 | with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. | |
1698 | A copy of the license is included in the section entitled ``GNU | |
1699 | Free Documentation License''. | |
1700 | ||
1701 | If you have Invariant Sections, Front-Cover Texts and Back-Cover | |
1702 | Texts, replace the "with...Texts." line with this: | |
1703 | ||
1704 | with the Invariant Sections being LIST THEIR TITLES, with | |
1705 | the Front-Cover Texts being LIST, and with the Back-Cover Texts | |
1706 | being LIST. | |
1707 | ||
1708 | If you have Invariant Sections without Cover Texts, or some other | |
1709 | combination of the three, merge those two alternatives to suit the | |
1710 | situation. | |
1711 | ||
1712 | If your document contains nontrivial examples of program code, we | |
1713 | recommend releasing these examples in parallel under your choice of | |
1714 | free software license, such as the GNU General Public License, to | |
1715 | permit their use in free software. | |
1716 | ||
f9267e15 EZ |
1717 | |
1718 | \1f | |
1719 | Tag Table: | |
b585a9fa EZ |
1720 | Node: Top\7f1382 |
1721 | Node: Command Line Editing\7f1814 | |
1722 | Node: Introduction and Notation\7f2457 | |
1723 | Node: Readline Interaction\7f4081 | |
1724 | Node: Readline Bare Essentials\7f5274 | |
1725 | Node: Readline Movement Commands\7f7065 | |
1726 | Node: Readline Killing Commands\7f8032 | |
1727 | Node: Readline Arguments\7f9954 | |
1728 | Node: Searching\7f11000 | |
1729 | Node: Readline Init File\7f13153 | |
1730 | Node: Readline Init File Syntax\7f14220 | |
1731 | Node: Conditional Init Constructs\7f26156 | |
1732 | Node: Sample Init File\7f28691 | |
1733 | Node: Bindable Readline Commands\7f31810 | |
1734 | Node: Commands For Moving\7f32869 | |
1735 | Node: Commands For History\7f33732 | |
1736 | Node: Commands For Text\7f36858 | |
1737 | Node: Commands For Killing\7f39586 | |
1738 | Node: Numeric Arguments\7f41730 | |
1739 | Node: Commands For Completion\7f42871 | |
1740 | Node: Keyboard Macros\7f44417 | |
1741 | Node: Miscellaneous Commands\7f44990 | |
1742 | Node: Readline vi Mode\7f48353 | |
1743 | Node: Copying This Manual\7f49274 | |
1744 | Node: GNU Free Documentation License\7f49506 | |
f9267e15 EZ |
1745 | \1f |
1746 | End Tag Table |