From f9267e152c9c4e2b150366c590674180e66d45df Mon Sep 17 00:00:00 2001 From: Elena Zannoni Date: Sun, 9 Jul 2000 16:21:23 +0000 Subject: Import of readline 4.1 --- readline/doc/readline.html | 763 +++++++++++++++++++++++++-------------------- 1 file changed, 430 insertions(+), 333 deletions(-) (limited to 'readline/doc/readline.html') diff --git a/readline/doc/readline.html b/readline/doc/readline.html index f4ea74d..d8a2eda 100644 --- a/readline/doc/readline.html +++ b/readline/doc/readline.html @@ -1,14 +1,14 @@ + from /usr/homes/chet/src/bash/readline-src/doc/rlman.texinfo on 1 March 2000 --> GNU Readline Library

GNU Readline Library

-

Edition 4.0, for Readline Library Version 4.0.

-

December 1998

+

Edition 4.1, for Readline Library Version 4.1.

+

January 2000

Brian Fox, Free Software Foundation
Chet Ramey, Case Western Reserve University

@@ -89,8 +89,8 @@ to provide a command line interface.

Published by the Free Software Foundation
-675 Massachusetts Avenue,
-Cambridge, MA 02139 USA +59 Temple Place, Suite 330,
+Boston, MA 02111 USA

@@ -155,9 +155,21 @@ is depressed.

The text M-k is read as `Meta-K' and describes the character -produced when the meta key (if you have one) is depressed, and the k -key is pressed. If you do not have a meta key, the identical keystroke -can be generated by typing ESC first, and then typing k. +produced when the Meta key (if you have one) is depressed, and the k +key is pressed. +The Meta key is labeled ALT on many keyboards. +On keyboards with two keys labeled ALT (usually to either side of +the space bar), the ALT on the left side is generally set to +work as a Meta key. +The ALT key on the right may also be configured to work as a +Meta key or may be configured as some other modifier, such as a +Compose key for typing accented characters. + +

+

+If you do not have a Meta or ALT key, or another key working as +a Meta key, the identical keystroke can be generated by typing ESC +first, and then typing k. Either process is known as metafying the k key.

@@ -171,6 +183,10 @@ In addition, several keys have their own names. Specifically, DEL, ESC, LFD, SPC, RET, and TAB all stand for themselves when seen in this text, or in an init file (see section Readline Init File). +If your keyboard lacks a LFD key, typing C-j will +produce the desired character. +The RET key may be labeled Return or Enter on +some keyboards.

@@ -219,8 +235,8 @@ erase character to back up and delete the mistyped character.

-Sometimes you may miss typing a character that you wanted to type, and -not notice your error until you have typed several other characters. In +Sometimes you may mistype a character, and +not notice the error until you have typed several other characters. In that case, you can type C-b to move the cursor to the left, and then correct your mistake. Afterwards, you can move the cursor to the right with C-f. @@ -231,7 +247,7 @@ When you add text in the middle of a line, you will notice that characters to the right of the cursor are `pushed over' to make room for the text that you have inserted. Likewise, when you delete text behind the cursor, characters to the right of the cursor are `pulled back' to fill in the -blank space created by the removal of the text. A list of the basic bare +blank space created by the removal of the text. A list of the bare essentials for editing the text of an input line follows.

@@ -243,7 +259,7 @@ Move back one character.
C-f
Move forward one character. -
DEL +
DEL or Backspace
Delete the character to the left of the cursor.
C-d @@ -252,18 +268,25 @@ Delete the character underneath the cursor.
Printing characters
Insert the character into the line at the cursor. -
C-_ +
C-_ or C-x C-u
Undo the last editing command. You can undo all the way back to an empty line. +

+(Depending on your configuration, the Backspace key be set to +delete the character to the left of the cursor and the DEL key set +to delete the character underneath the cursor, like C-d, rather +than the character to the left of the cursor.) + +

Readline Movement Commands

-The above table describes the most basic possible keystrokes that you need +The above table describes the most basic keystrokes that you need in order to do editing of the input line. For your convenience, many other commands have been added in addition to C-b, C-f, C-d, and DEL. Here are some commands for moving more rapidly @@ -308,6 +331,10 @@ operate on characters while meta keystrokes operate on words. Killing text means to delete the text from the line, but to save it away for later use, usually by yanking (re-inserting) it back into the line. +(`Cut' and `paste' are more recent jargon for `kill' and `yank'.) + +

+

If the description for a command says that it `kills' text, then you can be sure that you can get the text back in a different (or the same) place later. @@ -335,13 +362,15 @@ Kill the text from the current cursor position to the end of the line.

M-d
-Kill from the cursor to the end of the current word, or if between +Kill from the cursor to the end of the current word, or, if between words, to the end of the next word. +Word boundaries are the same as those used by M-f.
M-DEL
-Kill from the cursor the start of the previous word, or if between +Kill from the cursor the start of the previous word, or, if between words, to the start of the previous word. +Word boundaries are the same as those used by M-b.
C-w
@@ -383,7 +412,7 @@ start of the line, you might type `M-- C-k'.

The general way to pass numeric arguments to a command is to type meta digits before the command. If the first `digit' typed is a minus -sign (-), then the sign of the argument will be negative. Once +sign (`-'), then the sign of the argument will be negative. Once you have typed one meta digit to get the argument started, you can type the remainder of the digits, and then the command. For example, to give the C-d command an argument of 10, you could type `M-1 0 C-d'. @@ -406,15 +435,20 @@ As each character of the search string is typed, Readline displays the next entry from the history matching the string typed so far. An incremental search requires only as many characters as needed to find the desired history entry. -The characters present in the value of the isearch-terminators variable +To search backward in the history for a particular string, type +C-r. Typing C-s searches forward through the history. +The characters present in the value of the isearch-terminators variable are used to terminate an incremental search. If that variable has not been assigned a value, the ESC and C-J characters will terminate an incremental search. C-g will abort an incremental search and restore the original line. When the search is terminated, the history entry containing the search string becomes the current line. -To find other matching entries in the history list, type C-s or -C-r as appropriate. + +

+

+To find other matching entries in the history list, type C-r or +C-s as appropriate. This will search backward or forward in the history for the next entry matching the search string typed so far. Any other key sequence bound to a Readline command will terminate @@ -437,11 +471,11 @@ typed by the user or be part of the contents of the current line.

-Although the Readline library comes with a set of emacs-like +Although the Readline library comes with a set of Emacs-like keybindings installed by default, it is possible to use a different set of keybindings. Any user can customize programs that use Readline by putting -commands in an inputrc file in his home directory. +commands in an inputrc file, conventionally in his home directory. The name of this file is taken from the value of the environment variable INPUTRC. If that variable is unset, the default is `~/.inputrc'. @@ -536,7 +570,7 @@ them; otherwise, they are simply listed. The default limit is If set to `on', Readline will convert characters with the eighth bit set to an ASCII key sequence by stripping the eighth -bit and prepending an ESC character, converting them to a +bit and prefixing an ESC character, converting them to a meta-prefixed key sequence. The default value is `on'.

disable-completion @@ -657,7 +691,7 @@ completions. The default is `off'.
Key Bindings
The syntax for controlling key bindings in the init file is -simple. First you have to know the name of the command that you +simple. First you need to find the name of the command that you want to change. The following sections contain tables of the command name, the default keybinding, if any, and a short description of what the command does. @@ -727,10 +761,10 @@ an escape character backslash
\"
-" +", a double quotation mark
\'
-' +', a single quote or apostrophe In addition to the GNU Emacs style escape sequences, a second @@ -764,11 +798,11 @@ horizontal tab vertical tab
\nnn
-the character whose ASCII code is the octal value nnn +the character whose ASCII code is the octal value nnn (one to three digits)
\xnnn
-the character whose ASCII code is the hexadecimal value nnn +the character whose ASCII code is the hexadecimal value nnn (one to three digits) @@ -998,6 +1032,14 @@ This section describes Readline commands that may be bound to key sequences.

+

+Command names without an accompanying key sequence are unbound by default. +In the following descriptions, point refers to the current cursor +position, and mark refers to a cursor position saved by the +set-mark command. +The text between the point and mark is referred to as the region. + +

Commands For Moving

@@ -1032,7 +1074,7 @@ letters and digits.
backward-word (M-b)
-Move back to the start of this, or the previous, word. Words are +Move back to the start of the current or previous word. Words are composed of letters and digits.
clear-screen (C-l) @@ -1112,9 +1154,9 @@ for a string supplied by the user.
Search forward through the history for the string of characters -between the start of the current line and the current cursor -position (the point). This is a non-incremental search. By -default, this command is unbound. +between the start of the current line and the point. +This is a non-incremental search. +By default, this command is unbound.
history-search-backward ()
@@ -1194,13 +1236,13 @@ the character at the cursor, moving the cursor forward as well. If the insertion point is at the end of the line, then this transposes the last two characters of the line. -Negative arguments don't work. +Negative arguments have no effect.
transpose-words (M-t)
-Drag the word behind the cursor past the word in front of the cursor -moving the cursor over that word as well. +Drag the word before point past the word after point, +moving point past that word as well.
upcase-word (M-u)
@@ -1231,7 +1273,7 @@ capitalize the previous word, but do not move the cursor.
kill-line (C-k)
-Kill the text from the current cursor position to the end of the line. +Kill the text from point to the end of the line.
backward-kill-line (C-x Rubout)
@@ -1242,32 +1284,31 @@ Kill backward to the beginning of the line.
Kill backward from the cursor to the beginning of the current line. -The killed text is saved on the kill-ring.
kill-whole-line ()
-Kill all characters on the current line, no matter where the -cursor is. By default, this is unbound. +Kill all characters on the current line, no matter point is. +By default, this is unbound.
kill-word (M-d)
-Kill from the cursor to the end of the current word, or if between -words, to the end of the next word. Word boundaries are the same -as forward-word. +Kill from point to the end of the current word, or if between +words, to the end of the next word. +Word boundaries are the same as forward-word.
backward-kill-word (M-DEL)
-Kill the word behind the cursor. Word boundaries are the same -as backward-word. +Kill the word behind point. +Word boundaries are the same as backward-word.
unix-word-rubout (C-w)
-Kill the word behind the cursor, using white space as a word -boundary. The killed text is saved on the kill-ring. +Kill the word behind point, using white space as a word boundary. +The killed text is saved on the kill-ring.
delete-horizontal-space ()
@@ -1277,8 +1318,7 @@ Delete all spaces and tabs around point. By default, this is unbound.
kill-region ()
-Kill the text between the point and the mark (saved -cursor position). This text is referred to as the region. +Kill the text in the current region. By default, this command is unbound.
copy-region-as-kill () @@ -1427,7 +1467,7 @@ in the macro appear as if typed at the keyboard.
re-read-init-file (C-x C-r)
-Read in the contents of the inputrc file, and incorporate +Read in the contents of the inputrc file, and incorporate any bindings or variable assignments found there.
abort (C-g) @@ -1720,6 +1760,15 @@ defined within the Readline library which allow a user program to add customized functionality to Readline.

+

+Before declaring any functions that customize Readline's behavior, or +using any functionality Readline provides in other code, an +application writer should include the file <readline/readline.h> +in any file that uses Readline's features. Since some of the definitions +in readline.h use the stdio library, the file +<stdio.h> should be included before readline.h. + +