annotate doc/interpreter/rluser.texi @ 2342:95e511896bf5

[project @ 1996-07-24 18:05:43 by jwe]
author jwe
date Wed, 24 Jul 1996 18:08:39 +0000
parents b1a56412c385
children e7908588548a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
1 @comment %**start of header (This is for running Texinfo on a region.)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
2 @c @setfilename rluser.info
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
3 @comment %**end of header (This is for running Texinfo on a region.)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
4 @c @setchapternewpage odd
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
5
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
6 @ignore
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
7 This file documents the end user interface to the GNU command line
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
8 editing features. It is to be an appendix to manuals for programs which
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
9 use these features. There is a document entitled "readline.texinfo"
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
10 which contains both end-user and programmer documentation for the GNU
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
11 Readline Library.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
12
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
13 Copyright (C) 1988 Free Software Foundation, Inc.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
14
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
15 Authored by Brian Fox.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
16
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
17 Permission is granted to process this file through Tex and print the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
18 results, provided the printed document carries copying permission notice
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
19 identical to this one except for the removal of this paragraph (this
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
20 paragraph not being relevant to the printed manual).
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
21
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
22 Permission is granted to make and distribute verbatim copies of this manual
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
23 provided the copyright notice and this permission notice are preserved on
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
24 all copies.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
25
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
26 Permission is granted to copy and distribute modified versions of this
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
27 manual under the conditions for verbatim copying, provided also that the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
28 GNU Copyright statement is available to the distributee, and provided that
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
29 the entire resulting derived work is distributed under the terms of a
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
30 permission notice identical to this one.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
31
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
32 Permission is granted to copy and distribute translations of this manual
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
33 into another language, under the above conditions for modified versions.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
34 @end ignore
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
35
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
36 @node Command Line Editing, Using Info, Trouble, Top
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
37 @appendix Command Line Editing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
38
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
39 This text describes GNU's command line editing interface. It is
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
40 relatively old and may not be entirely correct now. Please send a
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
41 message to @code{bug-octave@@bevo.che.wisc.edu} if you find any errors.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
42 @xref{Reporting Bugs}, for more information about how to report bugs.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
43
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
44 @menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
45 * Introduction and Notation:: Notation used in this text.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
46 * Readline Interaction:: The minimum set of commands for editing a line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
47 * Readline Bare Essentials::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
48 * Readline Movement Commands::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
49 * Readline Killing Commands::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
50 * Readline Arguments::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
51 * Readline Init File:: Customizing Readline from a user's view.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
52 * Readline Init Syntax::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
53 * Readline Vi Mode::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
54 @end menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
55
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
56 @node Introduction and Notation, Readline Interaction, Command Line Editing, Command Line Editing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
57 @appendixsec Introduction to Line Editing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
58
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
59 The following paragraphs describe the notation we use to represent
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
60 keystrokes.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
61
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
62 The text @key{C-k} is read as `Control-K' and describes the character
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
63 produced when the Control key is depressed and the @key{k} key is struck.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
64
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
65 The text @key{M-k} is read as `Meta-K' and describes the character
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
66 produced when the meta key (if you have one) is depressed, and the @key{k}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
67 key is struck. If you do not have a meta key, the identical keystroke
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
68 can be generated by typing @key{ESC} @i{first}, and then typing @key{k}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
69 Either process is known as @dfn{metafying} the @key{k} key.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
70
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
71 The text @key{M-C-k} is read as `Meta-Control-k' and describes the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
72 character produced by @dfn{metafying} @key{C-k}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
73
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
74 In addition, several keys have their own names. Specifically,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
75 @key{DEL}, @key{ESC}, @key{LFD}, @key{SPC}, @key{RET}, and @key{TAB} all
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
76 stand for themselves when seen in this text, or in an init file
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
77 (@pxref{Readline Init File}, for more info).
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
78
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
79 @node Readline Interaction, Readline Bare Essentials, Introduction and Notation, Command Line Editing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
80 @appendixsec Readline Interaction
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
81 @cindex interaction, readline
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
82
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
83 Often during an interactive session you type in a long line of text,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
84 only to notice that the first word on the line is misspelled. The
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
85 Readline library gives you a set of commands for manipulating the text
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
86 as you type it in, allowing you to just fix your typo, and not forcing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
87 you to retype the majority of the line. Using these editing commands,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
88 you move the cursor to the place that needs correction, and delete or
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
89 insert the text of the corrections. Then, when you are satisfied with
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
90 the line, you simply press @key{RETURN}. You do not have to be at the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
91 end of the line to press @key{RETURN}; the entire line is accepted
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
92 regardless of the location of the cursor within the line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
93
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
94 @menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
95 * Readline Bare Essentials:: The least you need to know about Readline.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
96 * Readline Movement Commands:: Moving about the input line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
97 * Readline Killing Commands:: How to delete text, and how to get it back!
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
98 * Readline Arguments:: Giving numeric arguments to commands.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
99 @end menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
100
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
101 @node Readline Bare Essentials, Readline Movement Commands, Readline Interaction, Command Line Editing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
102 @appendixsec Readline Bare Essentials
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
103
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
104 In order to enter characters into the line, simply type them. The typed
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
105 character appears where the cursor was, and then the cursor moves one
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
106 space to the right. If you mistype a character, you can use @key{DEL} to
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
107 back up, and delete the mistyped character.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
108
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
109 Sometimes you may miss typing a character that you wanted to type, and
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
110 not notice your error until you have typed several other characters. In
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
111 that case, you can type @key{C-b} to move the cursor to the left, and then
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
112 correct your mistake. Afterwards, you can move the cursor to the right
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
113 with @key{C-f}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
114
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
115 When you add text in the middle of a line, you will notice that characters
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
116 to the right of the cursor get `pushed over' to make room for the text
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
117 that you have inserted. Likewise, when you delete text behind the cursor,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
118 characters to the right of the cursor get `pulled back' to fill in the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
119 blank space created by the removal of the text. A list of the basic bare
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
120 essentials for editing the text of an input line follows.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
121
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
122 @table @asis
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
123 @item @key{C-b}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
124 Move back one character.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
125 @item @key{C-f}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
126 Move forward one character.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
127 @item @key{DEL}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
128 Delete the character to the left of the cursor.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
129 @item @key{C-d}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
130 Delete the character underneath the cursor.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
131 @item @w{Printing characters}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
132 Insert itself into the line at the cursor.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
133 @item @key{C-_}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
134 Undo the last thing that you did. You can undo all the way back to an
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
135 empty line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
136 @end table
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
137
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
138 @node Readline Movement Commands, Readline Killing Commands, Readline Bare Essentials, Command Line Editing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
139 @appendixsec Readline Movement Commands
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
140
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
141
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
142 The above table describes the most basic possible keystrokes that you need
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
143 in order to do editing of the input line. For your convenience, many
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
144 other commands have been added in addition to @key{C-b}, @key{C-f},
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
145 @key{C-d}, and @key{DEL}. Here are some commands for moving more rapidly
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
146 about the line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
147
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
148 @table @key
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
149 @item C-a
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
150 Move to the start of the line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
151 @item C-e
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
152 Move to the end of the line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
153 @item M-f
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
154 Move forward a word.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
155 @item M-b
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
156 Move backward a word.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
157 @item C-l
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
158 Clear the screen, reprinting the current line at the top.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
159 @end table
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
160
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
161 Notice how @key{C-f} moves forward a character, while @key{M-f} moves
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
162 forward a word. It is a loose convention that control keystrokes
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
163 operate on characters while meta keystrokes operate on words.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
164
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
165 @node Readline Killing Commands, Readline Arguments, Readline Movement Commands, Command Line Editing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
166 @appendixsec Readline Killing Commands
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
167
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
168 @dfn{Killing} text means to delete the text from the line, but to save
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
169 it away for later use, usually by @dfn{yanking} it back into the line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
170 If the description for a command says that it `kills' text, then you can
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
171 be sure that you can get the text back in a different (or the same)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
172 place later.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
173
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
174 Here is the list of commands for killing text.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
175
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
176 @table @key
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
177 @item C-k
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
178 Kill the text from the current cursor position to the end of the line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
179
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
180 @item M-d
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
181 Kill from the cursor to the end of the current word, or if between
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
182 words, to the end of the next word.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
183
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
184 @item M-DEL
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
185 Kill from the cursor to the start of the previous word, or if between
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
186 words, to the start of the previous word.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
187
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
188 @item C-w
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
189 Kill from the cursor to the previous whitespace. This is different than
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
190 @key{M-DEL} because the word boundaries differ.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
191
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
192 @end table
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
193
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
194 And, here is how to @dfn{yank} the text back into the line. Yanking
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
195 is
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
196
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
197 @table @key
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
198 @item C-y
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
199 Yank the most recently killed text back into the buffer at the cursor.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
200
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
201 @item M-y
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
202 Rotate the kill-ring, and yank the new top. You can only do this if
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
203 the prior command is @key{C-y} or @key{M-y}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
204 @end table
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
205
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
206 When you use a kill command, the text is saved in a @dfn{kill-ring}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
207 Any number of consecutive kills save all of the killed text together, so
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
208 that when you yank it back, you get it in one clean sweep. The kill
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
209 ring is not line specific; the text that you killed on a previously
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
210 typed line is available to be yanked back later, when you are typing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
211 another line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
212
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
213 @node Readline Arguments, Readline Init File, Readline Killing Commands, Command Line Editing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
214 @appendixsec Readline Arguments
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
215
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
216 You can pass numeric arguments to Readline commands. Sometimes the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
217 argument acts as a repeat count, other times it is the @i{sign} of the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
218 argument that is significant. If you pass a negative argument to a
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
219 command which normally acts in a forward direction, that command will
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
220 act in a backward direction. For example, to kill text back to the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
221 start of the line, you might type @key{M--} @key{C-k}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
222
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
223 The general way to pass numeric arguments to a command is to type meta
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
224 digits before the command. If the first `digit' you type is a minus
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
225 sign (@key{-}), then the sign of the argument will be negative. Once
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
226 you have typed one meta digit to get the argument started, you can type
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
227 the remainder of the digits, and then the command. For example, to give
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
228 the @key{C-d} command an argument of 10, you could type @key{M-1 0 C-d}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
229
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
230
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
231 @node Readline Init File, Readline Init Syntax, Readline Arguments, Command Line Editing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
232 @appendixsec Readline Init File
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
233
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
234 Although the Readline library comes with a set of Emacs-like
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
235 keybindings, it is possible that you would like to use a different set
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
236 of keybindings. You can customize programs that use Readline by putting
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
237 commands in an @dfn{init} file in your home directory. The name of this
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
238 file is @file{~/.inputrc}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
239
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
240 When a program which uses the Readline library starts up, the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
241 @file{~/.inputrc} file is read, and the keybindings are set.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
242
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
243 In addition, the @key{C-x C-r} command re-reads this init file, thus
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
244 incorporating any changes that you might have made to it.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
245
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
246 @menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
247 * Readline Init Syntax:: Syntax for the commands in @file{~/.inputrc}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
248 * Readline Vi Mode:: Switching to @code{vi} mode in Readline.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
249 @end menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
250
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
251 @node Readline Init Syntax, Readline Vi Mode, Readline Init File, Command Line Editing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
252 @appendixsec Readline Init Syntax
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
253
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
254 There are only four constructs allowed in the @file{~/.inputrc}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
255 file:
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
256
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
257 @table @asis
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
258 @item Variable Settings
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
259 You can change the state of a few variables in Readline. You do this by
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
260 using the @code{set} command within the init file. Here is how you
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
261 would specify that you wish to use Vi line editing commands:
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
262
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
263 @example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
264 set editing-mode vi
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
265 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
266
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
267 Right now, there are only a few variables which can be set; so few in
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
268 fact, that we just iterate them here:
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
269
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
270 @table @code
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
271
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
272 @item editing-mode
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
273 @vindex editing-mode
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
274 The @code{editing-mode} variable controls which editing mode you are
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
275 using. By default, GNU Readline starts up in Emacs editing mode, where
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
276 the keystrokes are most similar to Emacs. This variable can either be
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
277 set to @code{emacs} or @code{vi}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
278
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
279 @item horizontal-scroll-mode
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
280 @vindex horizontal-scroll-mode
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
281 This variable can either be set to @code{On} or @code{Off}. Setting it
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
282 to @code{On} means that the text of the lines that you edit will scroll
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
283 horizontally on a single screen line when they are larger than the width
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
284 of the screen, instead of wrapping onto a new screen line. By default,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
285 this variable is set to @code{Off}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
286
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
287 @item mark-modified-lines
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
288 @vindex mark-modified-lines
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
289 This variable when set to @code{On}, says to display an asterisk
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
290 (@samp{*}) at the starts of history lines which have been modified.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
291 This variable is off by default.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
292
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
293 @item prefer-visible-bell
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
294 @vindex prefer-visible-bell
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
295 If this variable is set to @code{On} it means to use a visible bell if
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
296 one is available, rather than simply ringing the terminal bell. By
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
297 default, the value is @code{Off}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
298 @end table
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
299
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
300 @item Key Bindings
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
301 The syntax for controlling keybindings in the @file{~/.inputrc} file is
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
302 simple. First you have to know the @i{name} of the command that you
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
303 want to change. The following pages contain tables of the command name,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
304 the default keybinding, and a short description of what the command
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
305 does.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
306
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
307 Once you know the name of the command, simply place the name of the key
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
308 you wish to bind the command to, a colon, and then the name of the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
309 command on a line in the @file{~/.inputrc} file. The name of the key
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
310 can be expressed in different ways, depending on which is most
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
311 comfortable for you.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
312
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
313 @table @asis
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
314 @item @w{@var{keyname}: @var{function-name} or @var{macro}}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
315 @var{keyname} is the name of a key spelled out in English. For example:
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
316 @example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
317 Control-u: universal-argument
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
318 Meta-Rubout: backward-kill-word
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
319 Control-o: ">&output"
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
320 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
321
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
322 In the above example, @key{C-u} is bound to the function
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
323 @code{universal-argument}, and @key{C-o} is bound to run the macro
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
324 expressed on the right hand side (that is, to insert the text
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
325 @samp{>&output} into the line).
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
326
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
327 @item @w{"@var{keyseq}": @var{function-name} or @var{macro}}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
328 @var{keyseq} differs from @var{keyname} above in that strings denoting
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
329 an entire key sequence can be specified. Simply place the key sequence
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
330 in double quotes. GNU Emacs style key escapes can be used, as in the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
331 following example:
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
332
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
333 @example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
334 "\C-u": universal-argument
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
335 "\C-x\C-r": re-read-init-file
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
336 "\e[11~": "Function Key 1"
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
337 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
338
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
339 In the above example, @key{C-u} is bound to the function
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
340 @code{universal-argument} (just as it was in the first example),
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
341 @key{C-x C-r} is bound to the function @code{re-read-init-file}, and
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
342 @key{ESC [ 1 1 ~} is bound to insert the text @samp{Function Key 1}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
343
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
344 @end table
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
345 @end table
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
346
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
347 @menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
348 * Commands For Moving:: Moving about the line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
349 * Commands For History:: Getting at previous lines.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
350 * Commands For Text:: Commands for changing text.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
351 * Commands For Killing:: Commands for killing and yanking.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
352 * Numeric Arguments:: Specifying numeric arguments, repeat counts.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
353 * Commands For Completion:: Getting Readline to do the typing for you.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
354 * Miscellaneous Commands:: Other miscellaneous commands.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
355 @end menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
356
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
357 @node Commands For Moving, Commands For History, Readline Init Syntax, Readline Init Syntax
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
358 @appendixsubsec Commands For Moving
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
359 @ftable @code
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
360 @item beginning-of-line (@key{C-a})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
361 Move to the start of the current line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
362
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
363 @item end-of-line (@key{C-e})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
364 Move to the end of the line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
365
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
366 @item forward-char (@key{C-f})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
367 Move forward a character.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
368
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
369 @item backward-char (@key{C-b})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
370 Move back a character.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
371
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
372 @item forward-word (@key{M-f})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
373 Move forward to the end of the next word.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
374
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
375 @item backward-word (@key{M-b})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
376 Move back to the start of this, or the previous, word.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
377
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
378 @item clear-screen (@key{C-l})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
379 Clear the screen leaving the current line at the top of the screen.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
380
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
381 @end ftable
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
382
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
383 @node Commands For History, Commands For Text, Commands For Moving, Readline Init Syntax
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
384 @appendixsubsec Commands For Manipulating The History
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
385
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
386 @ftable @code
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
387 @item accept-line (Newline, Return)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
388 Accept the line regardless of where the cursor is. If this line is
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
389 non-empty, add it to the history list. If this line was a history
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
390 line, then restore the history line to its original state.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
391
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
392 @item previous-history (@key{C-p})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
393 Move `up' through the history list.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
394
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
395 @item next-history (@key{C-n})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
396 Move `down' through the history list.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
397
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
398 @item beginning-of-history (@key{M-<})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
399 Move to the first line in the history.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
400
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
401 @item end-of-history (@key{M->})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
402 Move to the end of the input history, i.e., the line you are entering!
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
403
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
404 @item reverse-search-history (@key{C-r})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
405 Search backward starting at the current line and moving `up' through
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
406 the history as necessary. This is an incremental search.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
407
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
408 @item forward-search-history (@key{C-s})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
409 Search forward starting at the current line and moving `down' through
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
410 the the history as necessary.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
411
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
412 @end ftable
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
413
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
414 @node Commands For Text, Commands For Killing, Commands For History, Readline Init Syntax
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
415 @appendixsubsec Commands For Changing Text
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
416
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
417 @ftable @code
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
418 @item delete-char (@key{C-d})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
419 Delete the character under the cursor. If the cursor is at the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
420 beginning of the line, and there are no characters in the line, and
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
421 the last character typed was not @key{C-d}, then return EOF.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
422
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
423 @item backward-delete-char (Rubout)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
424 Delete the character behind the cursor. A numeric arg says to kill
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
425 the characters instead of deleting them.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
426
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
427 @item quoted-insert (@key{C-q}, @key{C-v})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
428 Add the next character that you type to the line verbatim. This is
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
429 how to insert things like @key{C-q} for example.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
430
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
431 @item tab-insert (@key{M-TAB})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
432 Insert a tab character.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
433
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
434 @item self-insert (a, b, A, 1, !, ...)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
435 Insert yourself.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
436
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
437 @item transpose-chars (@key{C-t})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
438 Drag the character before point forward over the character at point.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
439 Point moves forward as well. If point is at the end of the line, then
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
440 transpose the two characters before point. Negative args don't work.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
441
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
442 @item transpose-words (@key{M-t})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
443 Drag the word behind the cursor past the word in front of the cursor
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
444 moving the cursor over that word as well.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
445
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
446 @item upcase-word (@key{M-u})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
447 Uppercase the current (or following) word. With a negative argument,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
448 do the previous word, but do not move point.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
449
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
450 @item downcase-word (@key{M-l})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
451 Lowercase the current (or following) word. With a negative argument,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
452 do the previous word, but do not move point.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
453
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
454 @item capitalize-word (@key{M-c})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
455 Uppercase the current (or following) word. With a negative argument,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
456 do the previous word, but do not move point.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
457
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
458 @end ftable
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
459
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
460 @node Commands For Killing, Numeric Arguments, Commands For Text, Readline Init Syntax
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
461 @appendixsubsec Killing And Yanking
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
462
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
463 @ftable @code
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
464
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
465 @item kill-line (@key{C-k})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
466 Kill the text from the current cursor position to the end of the line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
467
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
468 @item backward-kill-line ()
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
469 Kill backward to the beginning of the line. This is normally unbound.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
470
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
471 @item kill-word (@key{M-d})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
472 Kill from the cursor to the end of the current word, or if between
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
473 words, to the end of the next word.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
474
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
475 @item backward-kill-word (@key{M-DEL})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
476 Kill the word behind the cursor.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
477
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
478 @item unix-line-discard (@key{C-u})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
479 Do what @key{C-u} used to do in Unix line input. We save the killed text on
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
480 the kill-ring, though.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
481
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
482 @item unix-word-rubout (@key{C-w})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
483 Do what @key{C-w} used to do in Unix line input. The killed text is saved
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
484 on the kill-ring. This is different than backward-kill-word because
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
485 the word boundaries differ.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
486
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
487 @item yank (@key{C-y})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
488 Yank the top of the kill ring into the buffer at point.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
489
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
490 @item yank-pop (@key{M-y})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
491 Rotate the kill-ring, and yank the new top. You can only do this if
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
492 the prior command is yank or yank-pop.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
493 @end ftable
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
494
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
495 @node Numeric Arguments, Commands For Completion, Commands For Killing, Readline Init Syntax
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
496 @appendixsubsec Specifying Numeric Arguments
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
497 @ftable @code
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
498
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
499 @item digit-argument (@key{M-0}, @key{M-1}, ... @key{M--})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
500 Add this digit to the argument already accumulating, or start a new
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
501 argument. @key{M--} starts a negative argument.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
502
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
503 @item universal-argument ()
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
504 Do what @key{C-u} does in emacs. By default, this is not bound.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
505 @end ftable
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
506
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
507
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
508 @node Commands For Completion, Miscellaneous Commands, Numeric Arguments, Readline Init Syntax
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
509 @appendixsubsec Letting Readline Type For You
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
510
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
511 @ftable @code
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
512 @item complete (TAB)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
513 Attempt to do completion on the text before point. This is
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
514 implementation defined. Generally, if you are typing a file name
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
515 argument, you can do file name completion; if you are typing a command,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
516 you can do command completion, if you are typing in a symbol to GDB, you
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
517 can do symbol name completion, if you are typing in a variable to Bash,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
518 you can do variable name completion...
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
519
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
520 @item possible-completions (M-?)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
521 List the possible completions of the text before point.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
522 @end ftable
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
523
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
524 @node Miscellaneous Commands, , Commands For Completion, Readline Init Syntax
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
525 @appendixsubsec Some Miscellaneous Commands
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
526 @ftable @code
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
527
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
528 @item re-read-init-file (@key{C-x} @key{C-r})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
529 Read in the contents of your @file{~/.inputrc} file, and incorporate
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
530 any bindings found there.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
531
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
532 @item abort (@key{C-g})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
533 Ding! Stops things.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
534
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
535 @item do-uppercase-version (@key{M-a}, @key{M-b}, ...)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
536 Run the command that is bound to your uppercase brother.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
537
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
538 @item prefix-meta (ESC)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
539 Make the next character that you type be metafied. This is for people
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
540 without a meta key. Typing @key{ESC f} is equivalent to typing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
541 @key{M-f}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
542
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
543 @item undo (@key{C-_})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
544 Incremental undo, separately remembered for each line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
545
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
546 @item revert-line (@key{M-r})
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
547 Undo all changes made to this line. This is like typing the `undo'
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
548 command enough times to get back to the beginning.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
549 @end ftable
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
550
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
551 @node Readline Vi Mode, , Readline Init Syntax, Command Line Editing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
552 @appendixsec Readline Vi Mode
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
553
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
554 While the Readline library does not have a full set of Vi editing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
555 functions, it does contain enough to allow simple editing of the line.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
556
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
557 In order to switch interactively between Emacs and Vi editing modes, use
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
558 the command @key{M-C-j} (toggle-editing-mode).
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
559
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
560 When you enter a line in Vi mode, you are already placed in `insertion'
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
561 mode, as if you had typed an `i'. Pressing @key{ESC} switches you into
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
562 `edit' mode, where you can edit the text of the line with the standard
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
563 Vi movement keys, move to previous history lines with `k', and following
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
564 lines with `j', and so forth.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
565