]> git.ipfire.org Git - thirdparty/bash.git/blame - lib/readline/doc/rluserman.info
commit bash-20051027 snapshot
[thirdparty/bash.git] / lib / readline / doc / rluserman.info
CommitLineData
bc7bed50 1This is rluserman.info, produced by makeinfo version 4.7 from
5e13499c
CR
2./rluserman.texi.
3
bc7bed50
CR
4 This manual describes the end user interface of the GNU Readline
5Library (version 5.1-beta1, 7 October 2005), a library which aids in the
6consistency of user interface across discrete programs which provide a
7command line interface.
5e13499c 8
bc7bed50 9 Copyright (C) 1988-2005 Free Software Foundation, Inc.
5e13499c
CR
10
11 Permission is granted to make and distribute verbatim copies of this
12manual provided the copyright notice and this permission notice are
13preserved on all copies.
14
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."
22
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."
bc7bed50 26
5e13499c
CR
27INFO-DIR-SECTION Libraries
28START-INFO-DIR-ENTRY
29* RLuserman: (rluserman). The GNU readline library User's Manual.
30END-INFO-DIR-ENTRY
31
32\1f
33File: rluserman.info, Node: Top, Next: Command Line Editing, Up: (dir)
34
35GNU Readline Library
36********************
37
bc7bed50 38This document describes the end user interface of the GNU Readline
5e13499c
CR
39Library, a utility which aids in the consistency of user interface
40across discrete programs which provide a command line interface.
41
42* Menu:
43
44* Command Line Editing:: GNU Readline User's Manual.
45* Copying This Manual:: Copying This Manual.
46
47\1f
48File: rluserman.info, Node: Command Line Editing, Next: Copying This Manual, Prev: Top, Up: Top
49
bc7bed50
CR
501 Command Line Editing
51**********************
5e13499c 52
bc7bed50 53This chapter describes the basic features of the GNU command line
5e13499c
CR
54editing 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
67File: rluserman.info, Node: Introduction and Notation, Next: Readline Interaction, Up: Command Line Editing
68
bc7bed50
CR
691.1 Introduction to Line Editing
70================================
5e13499c 71
bc7bed50 72The following paragraphs describe the notation used to represent
5e13499c
CR
73keystrokes.
74
75 The text `C-k' is read as `Control-K' and describes the character
76produced when the <k> key is pressed while the Control key is depressed.
77
78 The text `M-k' is read as `Meta-K' and describes the character
79produced when the Meta key (if you have one) is depressed, and the <k>
80key is pressed. The Meta key is labeled <ALT> on many keyboards. On
81keyboards with two keys labeled <ALT> (usually to either side of the
82space bar), the <ALT> on the left side is generally set to work as a
83Meta key. The <ALT> key on the right may also be configured to work as
84a Meta key or may be configured as some other modifier, such as a
85Compose key for typing accented characters.
86
87 If you do not have a Meta or <ALT> key, or another key working as a
88Meta key, the identical keystroke can be generated by typing <ESC>
89_first_, and then typing <k>. Either process is known as "metafying"
90the <k> key.
91
92 The text `M-C-k' is read as `Meta-Control-k' and describes the
93character produced by "metafying" `C-k'.
94
95 In addition, several keys have their own names. Specifically,
96<DEL>, <ESC>, <LFD>, <SPC>, <RET>, and <TAB> all stand for themselves
97when seen in this text, or in an init file (*note Readline Init File::).
98If your keyboard lacks a <LFD> key, typing <C-j> will produce the
99desired character. The <RET> key may be labeled <Return> or <Enter> on
100some keyboards.
101
102\1f
103File: rluserman.info, Node: Readline Interaction, Next: Readline Init File, Prev: Introduction and Notation, Up: Command Line Editing
104
bc7bed50
CR
1051.2 Readline Interaction
106========================
5e13499c 107
bc7bed50 108Often during an interactive session you type in a long line of text,
5e13499c
CR
109only to notice that the first word on the line is misspelled. The
110Readline library gives you a set of commands for manipulating the text
111as you type it in, allowing you to just fix your typo, and not forcing
112you to retype the majority of the line. Using these editing commands,
113you move the cursor to the place that needs correction, and delete or
114insert the text of the corrections. Then, when you are satisfied with
115the line, you simply press <RET>. You do not have to be at the end of
116the line to press <RET>; the entire line is accepted regardless of the
117location of the cursor within the line.
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
128File: rluserman.info, Node: Readline Bare Essentials, Next: Readline Movement Commands, Up: Readline Interaction
129
bc7bed50
CR
1301.2.1 Readline Bare Essentials
131------------------------------
5e13499c 132
bc7bed50
CR
133In order to enter characters into the line, simply type them. The typed
134character appears where the cursor was, and then the cursor moves one
135space to the right. If you mistype a character, you can use your erase
136character to back up and delete the mistyped character.
5e13499c
CR
137
138 Sometimes you may mistype a character, and not notice the error
139until you have typed several other characters. In that case, you can
140type `C-b' to move the cursor to the left, and then correct your
141mistake. Afterwards, you can move the cursor to the right with `C-f'.
142
143 When you add text in the middle of a line, you will notice that
144characters to the right of the cursor are `pushed over' to make room
145for the text that you have inserted. Likewise, when you delete text
146behind the cursor, characters to the right of the cursor are `pulled
147back' to fill in the blank space created by the removal of the text. A
148list of the bare essentials for editing the text of an input line
149follows.
150
151`C-b'
152 Move back one character.
153
154`C-f'
155 Move forward one character.
156
157<DEL> or <Backspace>
158 Delete the character to the left of the cursor.
159
160`C-d'
161 Delete the character underneath the cursor.
162
163Printing characters
164 Insert the character into the line at the cursor.
165
166`C-_' or `C-x C-u'
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
171the character to the left of the cursor and the <DEL> key set to delete
172the character underneath the cursor, like `C-d', rather than the
173character to the left of the cursor.)
174
175\1f
176File: rluserman.info, Node: Readline Movement Commands, Next: Readline Killing Commands, Prev: Readline Bare Essentials, Up: Readline Interaction
177
bc7bed50
CR
1781.2.2 Readline Movement Commands
179--------------------------------
5e13499c 180
bc7bed50 181The above table describes the most basic keystrokes that you need in
5e13499c
CR
182order to do editing of the input line. For your convenience, many
183other commands have been added in addition to `C-b', `C-f', `C-d', and
184<DEL>. Here are some commands for moving more rapidly about the line.
185
186`C-a'
187 Move to the start of the line.
188
189`C-e'
190 Move to the end of the line.
191
192`M-f'
193 Move forward a word, where a word is composed of letters and
194 digits.
195
196`M-b'
197 Move backward a word.
198
199`C-l'
200 Clear the screen, reprinting the current line at the top.
201
202 Notice how `C-f' moves forward a character, while `M-f' moves
203forward a word. It is a loose convention that control keystrokes
204operate on characters while meta keystrokes operate on words.
205
206\1f
207File: rluserman.info, Node: Readline Killing Commands, Next: Readline Arguments, Prev: Readline Movement Commands, Up: Readline Interaction
208
bc7bed50
CR
2091.2.3 Readline Killing Commands
210-------------------------------
5e13499c 211
bc7bed50
CR
212"Killing" text means to delete the text from the line, but to save it
213away for later use, usually by "yanking" (re-inserting) it back into
5e13499c
CR
214the 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
218can be sure that you can get the text back in a different (or the same)
219place later.
220
221 When you use a kill command, the text is saved in a "kill-ring".
222Any number of consecutive kills save all of the killed text together, so
223that when you yank it back, you get it all. The kill ring is not line
224specific; the text that you killed on a previously typed line is
bc7bed50 225available to be yanked back later, when you are typing another line.
5e13499c
CR
226
227 Here is the list of commands for killing text.
228
229`C-k'
230 Kill the text from the current cursor position to the end of the
231 line.
232
233`M-d'
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
236 as those used by `M-f'.
237
238`M-<DEL>'
239 Kill from the cursor the start of the current word, or, if between
240 words, to the start of the previous word. Word boundaries are the
241 same as those used by `M-b'.
242
243`C-w'
244 Kill from the cursor to the previous whitespace. This is
245 different than `M-<DEL>' because the word boundaries differ.
246
247
248 Here is how to "yank" the text back into the line. Yanking means to
249copy the most-recently-killed text from the kill buffer.
250
251`C-y'
252 Yank the most recently killed text back into the buffer at the
253 cursor.
254
255`M-y'
256 Rotate the kill-ring, and yank the new top. You can only do this
257 if the prior command is `C-y' or `M-y'.
258
259\1f
260File: rluserman.info, Node: Readline Arguments, Next: Searching, Prev: Readline Killing Commands, Up: Readline Interaction
261
bc7bed50
CR
2621.2.4 Readline Arguments
263------------------------
5e13499c 264
bc7bed50 265You can pass numeric arguments to Readline commands. Sometimes the
5e13499c
CR
266argument acts as a repeat count, other times it is the sign of the
267argument that is significant. If you pass a negative argument to a
268command which normally acts in a forward direction, that command will
269act in a backward direction. For example, to kill text back to the
270start of the line, you might type `M-- C-k'.
271
272 The general way to pass numeric arguments to a command is to type
273meta digits before the command. If the first `digit' typed is a minus
274sign (`-'), then the sign of the argument will be negative. Once you
275have typed one meta digit to get the argument started, you can type the
276remainder of the digits, and then the command. For example, to give
277the `C-d' command an argument of 10, you could type `M-1 0 C-d', which
278will delete the next ten characters on the input line.
279
280\1f
281File: rluserman.info, Node: Searching, Prev: Readline Arguments, Up: Readline Interaction
282
bc7bed50
CR
2831.2.5 Searching for Commands in the History
284-------------------------------------------
5e13499c 285
bc7bed50 286Readline provides commands for searching through the command history
5e13499c
CR
287for lines containing a specified string. There are two search modes:
288"incremental" and "non-incremental".
289
290 Incremental searches begin before the user has finished typing the
291search string. As each character of the search string is typed,
292Readline displays the next entry from the history matching the string
293typed so far. An incremental search requires only as many characters
294as needed to find the desired history entry. To search backward in the
295history for a particular string, type `C-r'. Typing `C-s' searches
296forward through the history. The characters present in the value of
297the `isearch-terminators' variable are used to terminate an incremental
298search. If that variable has not been assigned a value, the <ESC> and
299`C-J' characters will terminate an incremental search. `C-g' will
300abort an incremental search and restore the original line. When the
301search is terminated, the history entry containing the search string
302becomes the current line.
303
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
306history for the next entry matching the search string typed so far.
307Any other key sequence bound to a Readline command will terminate the
308search and execute that command. For instance, a <RET> will terminate
309the search and accept the line, thereby executing the command from the
310history list. A movement command will terminate the search, make the
311last 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
315search string, any remembered search string is used.
316
317 Non-incremental searches read the entire search string before
318starting to search for matching history lines. The search string may be
319typed by the user or be part of the contents of the current line.
320
321\1f
322File: rluserman.info, Node: Readline Init File, Next: Bindable Readline Commands, Prev: Readline Interaction, Up: Command Line Editing
323
bc7bed50
CR
3241.3 Readline Init File
325======================
5e13499c 326
bc7bed50 327Although the Readline library comes with a set of Emacs-like
5e13499c
CR
328keybindings installed by default, it is possible to use a different set
329of keybindings. Any user can customize programs that use Readline by
330putting commands in an "inputrc" file, conventionally in his home
331directory. The name of this file is taken from the value of the
332environment variable `INPUTRC'. If that variable is unset, the default
333is `~/.inputrc'.
334
335 When a program which uses the Readline library starts up, the init
336file is read, and the key bindings are set.
337
338 In addition, the `C-x C-r' command re-reads this init file, thus
339incorporating 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
350File: rluserman.info, Node: Readline Init File Syntax, Next: Conditional Init Constructs, Up: Readline Init File
351
bc7bed50
CR
3521.3.1 Readline Init File Syntax
353-------------------------------
5e13499c 354
bc7bed50 355There are only a few basic constructs allowed in the Readline init
5e13499c
CR
356file. Blank lines are ignored. Lines beginning with a `#' are
357comments. Lines beginning with a `$' indicate conditional constructs
358(*note Conditional Init Constructs::). Other lines denote variable
359settings and key bindings.
360
361Variable 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
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:
370
371 set editing-mode vi
372
373 Variable names and values, where appropriate, are recognized
bc7bed50
CR
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.
5e13499c
CR
379
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
bc7bed50
CR
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
5e13499c
CR
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
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
bc7bed50
CR
412 equal to 0. A negative value means Readline should never ask.
413 The default limit is `100'.
5e13499c
CR
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
bc7bed50 441 `history-preserve-point'
5e13499c
CR
442 If set to `on', the history code attempts to place point at
443 the same location on each history line retrieved with
bc7bed50 444 `previous-history' or `next-history'. The default is `off'.
5e13499c
CR
445
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
455 not clear the eighth bit in the characters it reads),
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
463 command (*note Searching::). If this variable has not been
464 given a value, the characters <ESC> and `C-J' will terminate
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',
470 `emacs-standard', `emacs-meta', `emacs-ctlx', `vi', `vi-move',
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
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
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
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
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
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
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
532
533Key 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
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).
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
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
559 expressed on the right hand side (that is, to insert the text
560 `> output' into the line).
561
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
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
577 In the above example, `C-u' is again bound to the function
578 `universal-argument' (just as it was in the first example),
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'.
582
583
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'
633 the eight-bit character whose value is the octal value NNN
634 (one to three digits)
635
636 `\xHH'
637 the eight-bit character whose value is the hexadecimal value
638 HH (one or two hex digits)
639
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
649
650\1f
651File: rluserman.info, Node: Conditional Init Constructs, Next: Sample Init File, Prev: Readline Init File Syntax, Up: Readline Init File
652
bc7bed50
CR
6531.3.2 Conditional Init Constructs
654---------------------------------
5e13499c 655
bc7bed50 656Readline implements a facility similar in spirit to the conditional
5e13499c
CR
657compilation features of the C preprocessor which allows key bindings
658and variable settings to be performed as the result of tests. There
659are 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
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:
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
706 commands and bindings from that file. For example, the following
707 directive reads from `/etc/inputrc':
708 $include /etc/inputrc
709
710\1f
711File: rluserman.info, Node: Sample Init File, Prev: Conditional Init Constructs, Up: Readline Init File
712
bc7bed50
CR
7131.3.3 Sample Init File
714----------------------
5e13499c 715
bc7bed50
CR
716Here is an example of an INPUTRC file. This illustrates key binding,
717variable assignment, and conditional syntax.
5e13499c
CR
718
719
720 # This file controls the behaviour of line input editing for
721 # programs that use the GNU Readline library. Existing
722 # programs include FTP, Bash, and GDB.
723 #
724 # You can re-read the inputrc file with C-x C-r.
725 # Lines beginning with '#' are comments.
726 #
727 # First, include any systemwide bindings and variable
728 # assignments from /etc/Inputrc
729 $include /etc/Inputrc
bc7bed50 730
5e13499c
CR
731 #
732 # Set various bindings for emacs mode.
bc7bed50 733
5e13499c 734 set editing-mode emacs
bc7bed50 735
5e13499c 736 $if mode=emacs
bc7bed50 737
5e13499c 738 Meta-Control-h: backward-kill-word Text after the function name is ignored
bc7bed50 739
5e13499c
CR
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
bc7bed50 768
5e13499c 769 C-q: quoted-insert
bc7bed50 770
5e13499c 771 $endif
bc7bed50 772
5e13499c
CR
773 # An old-style binding. This happens to be the default.
774 TAB: complete
bc7bed50 775
5e13499c
CR
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"
780 # prepare to type a quoted word --
781 # insert open and close double quotes
782 # and move to just after the open quote
783 "\C-x\"": "\"\"\C-b"
784 # insert a backslash (testing backslash escapes
785 # in sequences and macros)
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
bc7bed50 794
5e13499c
CR
795 # use a visible bell if one is available
796 set bell-style visible
bc7bed50 797
5e13499c
CR
798 # don't strip characters to 7 bits when reading
799 set input-meta on
bc7bed50 800
5e13499c
CR
801 # allow iso-latin1 characters to be inserted rather
802 # than converted to prefix-meta sequences
803 set convert-meta off
bc7bed50 804
5e13499c
CR
805 # display characters with the eighth bit set directly
806 # rather than as meta-prefixed characters
807 set output-meta on
bc7bed50 808
5e13499c
CR
809 # if there are more than 150 possible completions for
810 # a word, ask the user if he wants to see all of them
811 set completion-query-items 150
bc7bed50 812
5e13499c
CR
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
821File: rluserman.info, Node: Bindable Readline Commands, Next: Readline vi Mode, Prev: Readline Init File, Up: Command Line Editing
822
bc7bed50
CR
8231.4 Bindable Readline Commands
824==============================
5e13499c
CR
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
838sequences. Command names without an accompanying key sequence are
839unbound by default.
840
841 In the following descriptions, "point" refers to the current cursor
842position, and "mark" refers to a cursor position saved by the
843`set-mark' command. The text between the point and mark is referred to
844as the "region".
845
846\1f
847File: rluserman.info, Node: Commands For Moving, Next: Commands For History, Up: Bindable Readline Commands
848
bc7bed50
CR
8491.4.1 Commands For Moving
850-------------------------
5e13499c
CR
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
879
880\1f
881File: rluserman.info, Node: Commands For History, Next: Commands For Text, Prev: Commands For Moving, Up: Bindable Readline Commands
882
bc7bed50
CR
8831.4.2 Commands For Manipulating The History
884-------------------------------------------
5e13499c
CR
885
886`accept-line (Newline or Return)'
887 Accept the line regardless of where the cursor is. If this line is
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.
891
892`previous-history (C-p)'
893 Move `back' through the history list, fetching the previous
894 command.
895
896`next-history (C-n)'
897 Move `forward' through the history list, fetching the next command.
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
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
bc7bed50
CR
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.
5e13499c
CR
943
944`yank-last-arg (M-. or M-_)'
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
bc7bed50
CR
949 in turn. The history expansion facilities are used to extract the
950 last argument, as if the `!$' history expansion had been specified.
5e13499c
CR
951
952
953\1f
954File: rluserman.info, Node: Commands For Text, Next: Commands For Killing, Prev: Commands For History, Up: Bindable Readline Commands
955
bc7bed50
CR
9561.4.3 Commands For Changing Text
957--------------------------------
5e13499c
CR
958
959`delete-char (C-d)'
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.
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
973`quoted-insert (C-q or C-v)'
974 Add the next character typed to the line verbatim. This is how to
975 insert key sequences like `C-q', for example.
976
977`tab-insert (M-<TAB>)'
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
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.
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
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
1020
1021\1f
1022File: rluserman.info, Node: Commands For Killing, Next: Numeric Arguments, Prev: Commands For Text, Up: Bindable Readline Commands
1023
bc7bed50
CR
10241.4.4 Killing And Yanking
1025-------------------------
5e13499c
CR
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 ()'
1037 Kill all characters on the current line, no matter where point is.
1038 By default, this is unbound.
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
1045`backward-kill-word (M-<DEL>)'
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
e6e3b444
CR
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
5e13499c
CR
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)'
1081 Yank the top of the kill ring into the buffer at point.
1082
1083`yank-pop (M-y)'
1084 Rotate the kill-ring, and yank the new top. You can only do this
1085 if the prior command is `yank' or `yank-pop'.
1086
1087\1f
1088File: rluserman.info, Node: Numeric Arguments, Next: Commands For Completion, Prev: Commands For Killing, Up: Bindable Readline Commands
1089
bc7bed50
CR
10901.4.5 Specifying Numeric Arguments
1091----------------------------------
5e13499c
CR
1092
1093`digit-argument (M-0, M-1, ... M--)'
1094 Add this digit to the argument already accumulating, or start a new
1095 argument. `M--' starts a negative argument.
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
1111File: rluserman.info, Node: Commands For Completion, Next: Keyboard Macros, Prev: Numeric Arguments, Up: Bindable Readline Commands
1112
bc7bed50
CR
11131.4.6 Letting Readline Type For You
1114-----------------------------------
5e13499c
CR
1115
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.
1120
1121`possible-completions (M-?)'
1122 List the possible completions of the text before point.
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
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
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
1146
1147\1f
1148File: rluserman.info, Node: Keyboard Macros, Next: Miscellaneous Commands, Prev: Commands For Completion, Up: Bindable Readline Commands
1149
bc7bed50
CR
11501.4.7 Keyboard Macros
1151---------------------
5e13499c
CR
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
1164
1165\1f
1166File: rluserman.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up: Bindable Readline Commands
1167
bc7bed50
CR
11681.4.8 Some Miscellaneous Commands
1169---------------------------------
5e13499c
CR
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
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'.
1186
1187`undo (C-_ or C-x C-u)'
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-@)'
1198 Set the mark to the point. If a numeric argument is supplied, the
1199 mark is set to that position.
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-#)'
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.
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
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.
1251
1252
1253\1f
1254File: rluserman.info, Node: Readline vi Mode, Prev: Bindable Readline Commands, Up: Command Line Editing
1255
bc7bed50
CR
12561.5 Readline vi Mode
1257====================
5e13499c 1258
bc7bed50 1259While the Readline library does not have a full set of `vi' editing
5e13499c
CR
1260functions, it does contain enough to allow simple editing of the line.
1261The Readline `vi' mode behaves as specified in the POSIX 1003.2
1262standard.
1263
1264 In order to switch interactively between `emacs' and `vi' editing
1265modes, 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
1267default 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
1271you into `command' mode, where you can edit the text of the line with
1272the standard `vi' movement keys, move to previous history lines with
1273`k' and subsequent lines with `j', and so forth.
1274
1275\1f
1276File: rluserman.info, Node: Copying This Manual, Prev: Command Line Editing, Up: Top
1277
bc7bed50
CR
1278Appendix A Copying This Manual
1279******************************
5e13499c
CR
1280
1281* Menu:
1282
1283* GNU Free Documentation License:: License for copying this manual.
1284
1285\1f
1286File: rluserman.info, Node: GNU Free Documentation License, Up: Copying This Manual
1287
bc7bed50
CR
1288A.1 GNU Free Documentation License
1289==================================
5e13499c
CR
1290
1291 Version 1.2, November 2002
bc7bed50 1292
5e13499c
CR
1293 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
1294 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
bc7bed50 1295
5e13499c
CR
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
bc7bed50
CR
1686A.1.1 ADDENDUM: How to use this License for your documents
1687----------------------------------------------------------
5e13499c 1688
bc7bed50 1689To use this License in a document you have written, include a copy of
5e13499c
CR
1690the License in the document and put the following copyright and license
1691notices 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
1702Texts, 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
1709combination of the three, merge those two alternatives to suit the
1710situation.
1711
1712 If your document contains nontrivial examples of program code, we
1713recommend releasing these examples in parallel under your choice of
1714free software license, such as the GNU General Public License, to
1715permit their use in free software.
1716
1717
1718\1f
1719Tag Table:
bc7bed50
CR
1720Node: Top\7f1344
1721Node: Command Line Editing\7f1776
1722Node: Introduction and Notation\7f2419
1723Node: Readline Interaction\7f4043
1724Node: Readline Bare Essentials\7f5236
1725Node: Readline Movement Commands\7f7027
1726Node: Readline Killing Commands\7f7994
1727Node: Readline Arguments\7f9916
1728Node: Searching\7f10962
1729Node: Readline Init File\7f13115
1730Node: Readline Init File Syntax\7f14182
1731Node: Conditional Init Constructs\7f26118
1732Node: Sample Init File\7f28653
1733Node: Bindable Readline Commands\7f31772
1734Node: Commands For Moving\7f32831
1735Node: Commands For History\7f33694
1736Node: Commands For Text\7f36820
1737Node: Commands For Killing\7f39548
1738Node: Numeric Arguments\7f41692
1739Node: Commands For Completion\7f42833
1740Node: Keyboard Macros\7f44379
1741Node: Miscellaneous Commands\7f44952
1742Node: Readline vi Mode\7f48315
1743Node: Copying This Manual\7f49236
1744Node: GNU Free Documentation License\7f49468
5e13499c
CR
1745\1f
1746End Tag Table