[__GO32__]: Don't undef HANDLE_SIGNALS for DJGPP v2.x.
[deliverable/binutils-gdb.git] / readline / doc / readline.0
CommitLineData
aac48392
SS
1
2
3
4READLINE(3) READLINE(3)
5
6
7N\bNA\bAM\bME\bE
8 readline - get a line from a user with editing
9
10S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
c862e87b 11 #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bst\btd\bdi\bio\bo.\b.h\bh>\b>
aac48392
SS
12 #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<r\bre\bea\bad\bdl\bli\bin\bne\be.\b.h\bh>\b>
13 #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<h\bhi\bis\bst\bto\bor\bry\by.\b.h\bh>\b>
14
15 c\bch\bha\bar\br *\b*r\bre\bea\bad\bdl\bli\bin\bne\be (\b(p\bpr\bro\bom\bmp\bpt\bt)\b)
16 c\bch\bha\bar\br *\b*p\bpr\bro\bom\bmp\bpt\bt;\b;
17
18C\bCO\bOP\bPY\bYR\bRI\bIG\bGH\bHT\bT
19 Readline is Copyright (C) 1989, 1991, 1993, 1995, 1996 by
20 the Free Software Foundation, Inc.
21
22D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
23 r\bre\bea\bad\bdl\bli\bin\bne\be will read a line from the terminal and return it,
24 using p\bpr\bro\bom\bmp\bpt\bt as a prompt. If p\bpr\bro\bom\bmp\bpt\bt is null, no prompt is
25 issued. The line returned is allocated with _\bm_\ba_\bl_\bl_\bo_\bc(3), so
26 the caller must free it when finished. The line returned
27 has the final newline removed, so only the text of the
28 line remains.
29
30 r\bre\bea\bad\bdl\bli\bin\bne\be offers editing capabilities while the user is
31 entering the line. By default, the line editing commands
32 are similar to those of emacs. A vi-style line editing
33 interface is also available.
34
35R\bRE\bET\bTU\bUR\bRN\bN V\bVA\bAL\bLU\bUE\bE
36 r\bre\bea\bad\bdl\bli\bin\bne\be returns the text of the line read. A blank line
37 returns the empty string. If E\bEO\bOF\bF is encountered while
38 reading a line, and the line is empty, N\bNU\bUL\bLL\bL is returned.
39 If an E\bEO\bOF\bF is read with a non-empty line, it is treated as
40 a newline.
41
42N\bNO\bOT\bTA\bAT\bTI\bIO\bON\bN
43 An emacs-style notation is used to denote keystrokes.
44 Control keys are denoted by C-_\bk_\be_\by, e.g., C-n means Con-
45 trol-N. Similarly, _\bm_\be_\bt_\ba keys are denoted by M-_\bk_\be_\by, so M-x
46 means Meta-X. (On keyboards without a _\bm_\be_\bt_\ba key, M-_\bx means
47 ESC _\bx, i.e., press the Escape key then the _\bx key. This
48 makes ESC the _\bm_\be_\bt_\ba _\bp_\br_\be_\bf_\bi_\bx. The combination M-C-_\bx means
49 ESC-Control-_\bx, or press the Escape key then hold the Con-
50 trol key while pressing the _\bx key.)
51
52 Readline commands may be given numeric _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs, which
53 normally act as a repeat count. Sometimes, however, it is
54 the sign of the argument that is significant. Passing a
55 negative argument to a command that acts in the forward
56 direction (e.g., k\bki\bil\bll\bl-\b-l\bli\bin\bne\be) causes that command to act in
57 a backward direction. Commands whose behavior with argu-
58 ments deviates from this are noted.
59
60 When a command is described as _\bk_\bi_\bl_\bl_\bi_\bn_\bg text, the text
aac48392
SS
61
62
63
c862e87b 64GNU 1998 Dec 31 1
aac48392
SS
65
66
67
68
69
70READLINE(3) READLINE(3)
71
72
c862e87b 73 deleted is saved for possible future retrieval (_\by_\ba_\bn_\bk_\bi_\bn_\bg).
aac48392
SS
74 The killed text is saved in a _\bk_\bi_\bl_\bl _\br_\bi_\bn_\bg. Consecutive
75 kills cause the text to be accumulated into one unit,
76 which can be yanked all at once. Commands which do not
77 kill text separate the chunks of text on the kill ring.
78
79I\bIN\bNI\bIT\bTI\bIA\bAL\bLI\bIZ\bZA\bAT\bTI\bIO\bON\bN F\bFI\bIL\bLE\bE
80 Readline is customized by putting commands in an initial-
81 ization file (the _\bi_\bn_\bp_\bu_\bt_\br_\bc file). The name of this file is
82 taken from the value of the I\bIN\bNP\bPU\bUT\bTR\bRC\bC environment variable.
83 If that variable is unset, the default is _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc.
84 When a program which uses the readline library starts up,
85 the init file is read, and the key bindings and variables
86 are set. There are only a few basic constructs allowed in
87 the readline init file. Blank lines are ignored. Lines
88 beginning with a #\b# are comments. Lines beginning with a $\b$
89 indicate conditional constructs. Other lines denote key
90 bindings and variable settings. Each program using this
91 library may add its own commands and bindings.
92
93 For example, placing
94
95 M-Control-u: universal-argument
96 or
97 C-Meta-u: universal-argument
98 into the _\bi_\bn_\bp_\bu_\bt_\br_\bc would make M-C-u execute the readline
99 command _\bu_\bn_\bi_\bv_\be_\br_\bs_\ba_\bl_\b-_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt.
100
101 The following symbolic character names are recognized
102 while processing key bindings: _\bR_\bU_\bB_\bO_\bU_\bT, _\bD_\bE_\bL, _\bE_\bS_\bC, _\bL_\bF_\bD, _\bN_\bE_\bW_\b-
103 _\bL_\bI_\bN_\bE, _\bR_\bE_\bT, _\bR_\bE_\bT_\bU_\bR_\bN, _\bS_\bP_\bC, _\bS_\bP_\bA_\bC_\bE, and _\bT_\bA_\bB. In addition to
104 command names, readline allows keys to be bound to a
105 string that is inserted when the key is pressed (a _\bm_\ba_\bc_\br_\bo).
106
107
108 K\bKe\bey\by B\bBi\bin\bnd\bdi\bin\bng\bgs\bs
109 The syntax for controlling key bindings in the _\bi_\bn_\bp_\bu_\bt_\br_\bc
110 file is simple. All that is required is the name of the
111 command or the text of a macro and a key sequence to which
112 it should be bound. The name may be specified in one of
113 two ways: as a symbolic key name, possibly with _\bM_\be_\bt_\ba_\b- or
114 _\bC_\bo_\bn_\bt_\br_\bo_\bl_\b- prefixes, or as a key sequence. When using the
115 form k\bke\bey\byn\bna\bam\bme\be:_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be or _\bm_\ba_\bc_\br_\bo, _\bk_\be_\by_\bn_\ba_\bm_\be is the name
116 of a key spelled out in English. For example:
117
118 Control-u: universal-argument
119 Meta-Rubout: backward-kill-word
120 Control-o: ">&output"
121
122 In the above example, _\bC_\b-_\bu is bound to the function u\bun\bni\biv\bve\ber\br-\b-
123 s\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt, _\bM_\b-_\bD_\bE_\bL is bound to the function b\bba\bac\bck\bk-\b-
124 w\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd, and _\bC_\b-_\bo is bound to run the macro
125 expressed on the right hand side (that is, to insert the
126 text _\b>_\b&_\bo_\bu_\bt_\bp_\bu_\bt into the line).
127
128
129
c862e87b 130GNU 1998 Dec 31 2
aac48392
SS
131
132
133
134
135
136READLINE(3) READLINE(3)
137
138
139 In the second form, "\b"k\bke\bey\bys\bse\beq\bq"\b":_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be or _\bm_\ba_\bc_\br_\bo, k\bke\bey\by-\b-
140 s\bse\beq\bq differs from k\bke\bey\byn\bna\bam\bme\be above in that strings denoting an
141 entire key sequence may be specified by placing the
142 sequence within double quotes. Some GNU Emacs style key
143 escapes can be used, as in the following example.
144
145 "\C-u": universal-argument
146 "\C-x\C-r": re-read-init-file
147 "\e[11~": "Function Key 1"
148
149 In this example, _\bC_\b-_\bu is again bound to the function u\bun\bni\bi-\b-
150 v\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt. _\bC_\b-_\bx _\bC_\b-_\br is bound to the function
151 r\bre\be-\b-r\bre\bea\bad\bd-\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be, and _\bE_\bS_\bC _\b[ _\b1 _\b1 _\b~ is bound to insert the
152 text F\bFu\bun\bnc\bct\bti\bio\bon\bn K\bKe\bey\by 1\b1. The full set of GNU Emacs style
153 escape sequences is
154 \\b\C\bC-\b- control prefix
155 \\b\M\bM-\b- meta prefix
156 \\b\e\be an escape character
157 \\b\\\b\ backslash
158 \\b\"\b" literal "
159 \\b\'\b' literal '
160
161 In addition to the GNU Emacs style escape sequences, a
162 second set of backslash escapes is available:
163 \\b\a\ba alert (bell)
164 \\b\b\bb backspace
165 \\b\d\bd delete
166 \\b\f\bf form feed
167 \\b\n\bn newline
168 \\b\r\br carriage return
169 \\b\t\bt horizontal tab
170 \\b\v\bv vertical tab
171 \\b\_\bn_\bn_\bn the character whose ASCII code is the octal
172 value _\bn_\bn_\bn (one to three digits)
173 \\b\x\bx_\bn_\bn_\bn the character whose ASCII code is the hex-
174 adecimal value _\bn_\bn_\bn (one to three digits)
175
176 When entering the text of a macro, single or double quotes
177 should be used to indicate a macro definition. Unquoted
178 text is assumed to be a function name. In the macro body,
179 the backslash escapes described above are expanded. Back-
180 slash will quote any other character in the macro text,
181 including " and '.
182
183 B\bBa\bas\bsh\bh allows the current readline key bindings to be dis-
184 played or modified with the b\bbi\bin\bnd\bd builtin command. The
185 editing mode may be switched during interactive use by
186 using the -\b-o\bo option to the s\bse\bet\bt builtin command. Other
187 programs using this library provide similar mechanisms.
188 The _\bi_\bn_\bp_\bu_\bt_\br_\bc file may be edited and re-read if a program
189 does not provide any other means to incorporate new bind-
190 ings.
191
192
193
194
195
c862e87b 196GNU 1998 Dec 31 3
aac48392
SS
197
198
199
200
201
202READLINE(3) READLINE(3)
203
204
205 V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs
206 Readline has variables that can be used to further cus-
207 tomize its behavior. A variable may be set in the _\bi_\bn_\bp_\bu_\bt_\br_\bc
208 file with a statement of the form
209
210 s\bse\bet\bt _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be_\b-_\bn_\ba_\bm_\be _\bv_\ba_\bl_\bu_\be
211
212 Except where noted, readline variables can take the values
213 O\bOn\bn or O\bOf\bff\bf. The variables and their default values are:
214
215 b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be (\b(a\bau\bud\bdi\bib\bbl\ble\be)\b)
216 Controls what happens when readline wants to ring
217 the terminal bell. If set to n\bno\bon\bne\be, readline never
218 rings the bell. If set to v\bvi\bis\bsi\bib\bbl\ble\be, readline uses a
219 visible bell if one is available. If set to a\bau\bud\bdi\bi-\b-
220 b\bbl\ble\be, readline attempts to ring the terminal's bell.
221 c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn (\b(`\b``\b`#\b#'\b''\b')\b)
222 The string that is inserted in v\bvi\bi mode when the
223 i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt command is executed. This command
224 is bound to M\bM-\b-#\b# in emacs mode and to #\b# in vi com-
225 mand mode.
226 c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-i\big\bgn\bno\bor\bre\be-\b-c\bca\bas\bse\be (\b(O\bOf\bff\bf)\b)
227 If set to O\bOn\bn, readline performs filename matching
228 and completion in a case-insensitive fashion.
229 c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-q\bqu\bue\ber\bry\by-\b-i\bit\bte\bem\bms\bs (\b(1\b10\b00\b0)\b)
230 This determines when the user is queried about
231 viewing the number of possible completions gener-
232 ated by the p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs command. It may
233 be set to any integer value greater than or equal
234 to zero. If the number of possible completions is
235 greater than or equal to the value of this vari-
236 able, the user is asked whether or not he wishes to
237 view them; otherwise they are simply listed on the
238 terminal.
239 c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba (\b(O\bOn\bn)\b)
240 If set to O\bOn\bn, readline will convert characters with
241 the eighth bit set to an ASCII key sequence by
242 stripping the eighth bit and prepending an escape
243 character (in effect, using escape as the _\bm_\be_\bt_\ba _\bp_\br_\be_\b-
244 _\bf_\bi_\bx).
245 d\bdi\bis\bsa\bab\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn (\b(O\bOf\bff\bf)\b)
246 If set to O\bOn\bn, readline will inhibit word comple-
247 tion. Completion characters will be inserted into
248 the line as if they had been mapped to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt.
249 e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be (\b(e\bem\bma\bac\bcs\bs)\b)
250 Controls whether readline begins with a set of key
251 bindings similar to _\be_\bm_\ba_\bc_\bs or _\bv_\bi. e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be can
252 be set to either e\bem\bma\bac\bcs\bs or v\bvi\bi.
253 e\ben\bna\bab\bbl\ble\be-\b-k\bke\bey\byp\bpa\bad\bd (\b(O\bOf\bff\bf)\b)
254 When set to O\bOn\bn, readline will try to enable the
255 application keypad when it is called. Some systems
256 need this to enable the arrow keys.
257 e\bex\bxp\bpa\ban\bnd\bd-\b-t\bti\bil\bld\bde\be (\b(O\bOf\bff\bf)\b)
258 If set to o\bon\bn, tilde expansion is performed when
259
260
261
c862e87b 262GNU 1998 Dec 31 4
aac48392
SS
263
264
265
266
267
268READLINE(3) READLINE(3)
269
270
271 readline attempts word completion.
272 h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bl-\b-s\bsc\bcr\bro\bol\bll\bl-\b-m\bmo\bod\bde\be (\b(O\bOf\bff\bf)\b)
273 When set to O\bOn\bn, makes readline use a single line
274 for display, scrolling the input horizontally on a
275 single screen line when it becomes longer than the
276 screen width rather than wrapping to a new line.
c862e87b
JM
277 i\bin\bnp\bpu\but\bt-\b-m\bme\bet\bta\ba (\b(O\bOf\bff\bf)\b)
278 If set to O\bOn\bn, readline will enable eight-bit input
279 (that is, it will not strip the high bit from the
280 characters it reads), regardless of what the termi-
281 nal claims it can support. The name m\bme\bet\bta\ba-\b-f\bfl\bla\bag\bg is a
282 synonym for this variable.
283 i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs (\b(`\b``\b`C\bC-\b-[\b[C\bC-\b-J\bJ'\b''\b')\b)
284 The string of characters that should terminate an
285 incremental search without subsequently executing
286 the character as a command. If this variable has
287 not been given a value, the characters _\bE_\bS_\bC and _\bC_\b-_\bJ
288 will terminate an incremental search.
aac48392
SS
289 k\bke\bey\bym\bma\bap\bp (\b(e\bem\bma\bac\bcs\bs)\b)
290 Set the current readline keymap. The set of legal
291 keymap names is _\be_\bm_\ba_\bc_\bs_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b,
292 _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b, _\bv_\bi_\b, _\bv_\bi_\b-_\bm_\bo_\bv_\be_\b, _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd, and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt.
293 _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd; _\be_\bm_\ba_\bc_\bs is equivalent
294 to _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd. The default value is _\be_\bm_\ba_\bc_\bs; the
295 value of e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be also affects the default
296 keymap.
297 m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs (\b(O\bOn\bn)\b)
298 If set to O\bOn\bn, complete<d directory names have a
299 slash appended.
300 m\bma\bar\brk\bk-\b-m\bmo\bod\bdi\bif\bfi\bie\bed\bd-\b-l\bli\bin\bne\bes\bs (\b(O\bOf\bff\bf)\b)
301 If set to O\bOn\bn, history lines that have been modified
302 are displayed with a preceding asterisk (*\b*).
aac48392
SS
303 o\bou\but\btp\bpu\but\bt-\b-m\bme\bet\bta\ba (\b(O\bOf\bff\bf)\b)
304 If set to O\bOn\bn, readline will display characters with
c862e87b 305 the eighth bit set directly rather than as a meta-
aac48392
SS
306 prefixed escape sequence.
307 p\bpr\bri\bin\bnt\bt-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs-\b-h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bll\bly\by (\b(O\bOf\bff\bf)\b)
c862e87b
JM
308 If set to O\bOn\bn, readline will display completions
309 with matches sorted horizontally in alphabetical
aac48392
SS
310 order, rather than down the screen.
311 s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-a\bam\bmb\bbi\big\bgu\buo\bou\bus\bs (\b(O\bOf\bff\bf)\b)
c862e87b
JM
312 This alters the default behavior of the completion
313 functions. If set to o\bon\bn, words which have more
314 than one possible completion cause the matches to
315 be listed immediately instead of ringing the bell.
aac48392
SS
316 v\bvi\bis\bsi\bib\bbl\ble\be-\b-s\bst\bta\bat\bts\bs (\b(O\bOf\bff\bf)\b)
317 If set to O\bOn\bn, a character denoting a file's type as
c862e87b 318 reported by s\bst\bta\bat\bt(2) is appended to the filename
aac48392
SS
319 when listing possible completions.
320
321 C\bCo\bon\bnd\bdi\bit\bti\bio\bon\bna\bal\bl C\bCo\bon\bns\bst\btr\bru\buc\bct\bts\bs
c862e87b
JM
322 Readline implements a facility similar in spirit to the
323 conditional compilation features of the C preprocessor
324 which allows key bindings and variable settings to be
aac48392
SS
325
326
327
c862e87b 328GNU 1998 Dec 31 5
aac48392
SS
329
330
331
332
333
334READLINE(3) READLINE(3)
335
336
c862e87b
JM
337 performed as the result of tests. There are four parser
338 directives used.
339
340 $\b$i\bif\bf The $\b$i\bif\bf construct allows bindings to be made based
341 on the editing mode, the terminal being used, or
342 the application using readline. The text of the
343 test extends to the end of the line; no characters
aac48392
SS
344 are required to isolate it.
345
c862e87b
JM
346 m\bmo\bod\bde\be The m\bmo\bod\bde\be=\b= form of the $\b$i\bif\bf directive is used
347 to test whether readline is in emacs or vi
348 mode. This may be used in conjunction with
aac48392 349 the s\bse\bet\bt k\bke\bey\bym\bma\bap\bp command, for instance, to set
c862e87b
JM
350 bindings in the _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd and _\be_\bm_\ba_\bc_\bs_\b-
351 _\bc_\bt_\bl_\bx keymaps only if readline is starting
aac48392
SS
352 out in emacs mode.
353
354 t\bte\ber\brm\bm The t\bte\ber\brm\bm=\b= form may be used to include termi-
c862e87b
JM
355 nal-specific key bindings, perhaps to bind
356 the key sequences output by the terminal's
357 function keys. The word on the right side
358 of the =\b= is tested against the full name of
aac48392
SS
359 the terminal and the portion of the terminal
360 name before the first -\b-. This allows _\bs_\bu_\bn to
361 match both _\bs_\bu_\bn and _\bs_\bu_\bn_\b-_\bc_\bm_\bd, for instance.
362
363 a\bap\bpp\bpl\bli\bic\bca\bat\bti\bio\bon\bn
364 The a\bap\bpp\bpl\bli\bic\bca\bat\bti\bio\bon\bn construct is used to include
365 application-specific settings. Each program
366 using the readline library sets the _\ba_\bp_\bp_\bl_\bi_\bc_\ba_\b-
c862e87b
JM
367 _\bt_\bi_\bo_\bn _\bn_\ba_\bm_\be, and an initialization file can
368 test for a particular value. This could be
aac48392 369 used to bind key sequences to functions use-
c862e87b
JM
370 ful for a specific program. For instance,
371 the following command adds a key sequence
372 that quotes the current or previous word in
aac48392
SS
373 Bash:
374
375 $\b$i\bif\bf bash
376 # Quote the current or previous word
377 "\C-xq": "\eb\"\ef\""
378 $\b$e\ben\bnd\bdi\bif\bf
379
380 $\b$e\ben\bnd\bdi\bif\bf This command, as seen in the previous example, ter-
381 minates an $\b$i\bif\bf command.
382
c862e87b 383 $\b$e\bel\bls\bse\be Commands in this branch of the $\b$i\bif\bf directive are
aac48392
SS
384 executed if the test fails.
385
386 $\b$i\bin\bnc\bcl\blu\bud\bde\be
c862e87b
JM
387 This directive takes a single filename as an argu-
388 ment and reads commands and bindings from that
389 file. For example, the following directive would
aac48392
SS
390 read _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc:
391
aac48392
SS
392
393
c862e87b 394GNU 1998 Dec 31 6
aac48392
SS
395
396
397
398
399
400READLINE(3) READLINE(3)
401
402
c862e87b
JM
403 $\b$i\bin\bnc\bcl\blu\bud\bde\be _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc
404
405S\bSE\bEA\bAR\bRC\bCH\bHI\bIN\bNG\bG
406 Readline provides commands for searching through the com-
407 mand history for lines containing a specified string.
408 There are two search modes: _\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt_\ba_\bl and _\bn_\bo_\bn_\b-_\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\b-
409 _\bt_\ba_\bl.
aac48392 410
c862e87b 411 Incremental searches begin before the user has finished
aac48392
SS
412 typing the search string. As each character of the search
413 string is typed, readline displays the next entry from the
c862e87b
JM
414 history matching the string typed so far. An incremental
415 search requires only as many characters as needed to find
416 the desired history entry. The characters present in the
417 value of the _\bi_\bs_\be_\ba_\br_\bc_\bh_\b-_\bt_\be_\br_\bm_\bi_\bn_\ba_\bt_\bo_\br_\bs variable are used to ter-
418 minate an incremental search. If that variable has not
419 been assigned a value the Escape and Control-J characters
420 will terminate an incremental search. Control-G will
421 abort an incremental search and restore the original line.
422 When the search is terminated, the history entry contain-
423 ing the search string becomes the current line. To find
424 other matching entries in the history list, type Control-S
425 or Control-R as appropriate. This will search backward or
426 forward in the history for the next line matching the
427 search string typed so far. Any other key sequence bound
428 to a readline command will terminate the search and exe-
429 cute that command. For instance, a _\bn_\be_\bw_\bl_\bi_\bn_\be will terminate
430 the search and accept the line, thereby executing the com-
431 mand from the history list.
432
433 Non-incremental searches read the entire search string
aac48392 434 before starting to search for matching history lines. The
c862e87b 435 search string may be typed by the user or be part of the
aac48392
SS
436 contents of the current line.
437
438E\bED\bDI\bIT\bTI\bIN\bNG\bG C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
c862e87b
JM
439 The following is a list of the names of the commands and
440 the default key sequences to which they are bound. Com-
aac48392
SS
441 mand names without an accompanying key sequence are
442 unbound by default.
443
444 C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br M\bMo\bov\bvi\bin\bng\bg
445 b\bbe\beg\bgi\bin\bnn\bni\bin\bng\bg-\b-o\bof\bf-\b-l\bli\bin\bne\be (\b(C\bC-\b-a\ba)\b)
446 Move to the start of the current line.
447 e\ben\bnd\bd-\b-o\bof\bf-\b-l\bli\bin\bne\be (\b(C\bC-\b-e\be)\b)
448 Move to the end of the line.
449 f\bfo\bor\brw\bwa\bar\brd\bd-\b-c\bch\bha\bar\br (\b(C\bC-\b-f\bf)\b)
450 Move forward a character.
451 b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-c\bch\bha\bar\br (\b(C\bC-\b-b\bb)\b)
452 Move back a character.
453 f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-f\bf)\b)
c862e87b
JM
454 Move forward to the end of the next word. Words
455 are composed of alphanumeric characters (letters
aac48392 456 and digits).
aac48392
SS
457
458
459
c862e87b 460GNU 1998 Dec 31 7
aac48392
SS
461
462
463
464
465
466READLINE(3) READLINE(3)
467
468
c862e87b
JM
469 b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-b\bb)\b)
470 Move back to the start of this, or the previous,
471 word. Words are composed of alphanumeric charac-
472 ters (letters and digits).
473 c\bcl\ble\bea\bar\br-\b-s\bsc\bcr\bre\bee\ben\bn (\b(C\bC-\b-l\bl)\b)
474 Clear the screen leaving the current line at the
475 top of the screen. With an argument, refresh the
476 current line without clearing the screen.
aac48392
SS
477 r\bre\bed\bdr\bra\baw\bw-\b-c\bcu\bur\brr\bre\ben\bnt\bt-\b-l\bli\bin\bne\be
478 Refresh the current line.
479
480 C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br M\bMa\ban\bni\bip\bpu\bul\bla\bat\bti\bin\bng\bg t\bth\bhe\be H\bHi\bis\bst\bto\bor\bry\by
481 a\bac\bcc\bce\bep\bpt\bt-\b-l\bli\bin\bne\be (\b(N\bNe\bew\bwl\bli\bin\bne\be,\b, R\bRe\bet\btu\bur\brn\bn)\b)
c862e87b
JM
482 Accept the line regardless of where the cursor is.
483 If this line is non-empty, add it to the history
484 list. If the line is a modified history line, then
aac48392
SS
485 restore the history line to its original state.
486 p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-p\bp)\b)
c862e87b 487 Fetch the previous command from the history list,
aac48392
SS
488 moving back in the list.
489 n\bne\bex\bxt\bt-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-n\bn)\b)
c862e87b 490 Fetch the next command from the history list, mov-
aac48392
SS
491 ing forward in the list.
492 b\bbe\beg\bgi\bin\bnn\bni\bin\bng\bg-\b-o\bof\bf-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-<\b<)\b)
493 Move to the first line in the history.
494 e\ben\bnd\bd-\b-o\bof\bf-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b->\b>)\b)
c862e87b 495 Move to the end of the input history, i.e., the
aac48392
SS
496 line currently being entered.
497 r\bre\bev\bve\ber\brs\bse\be-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-r\br)\b)
c862e87b 498 Search backward starting at the current line and
aac48392
SS
499 moving `up' through the history as necessary. This
500 is an incremental search.
501 f\bfo\bor\brw\bwa\bar\brd\bd-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-s\bs)\b)
c862e87b
JM
502 Search forward starting at the current line and
503 moving `down' through the history as necessary.
aac48392
SS
504 This is an incremental search.
505 n\bno\bon\bn-\b-i\bin\bnc\bcr\bre\bem\bme\ben\bnt\bta\bal\bl-\b-r\bre\bev\bve\ber\brs\bse\be-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-p\bp)\b)
506 Search backward through the history starting at the
c862e87b 507 current line using a non-incremental search for a
aac48392
SS
508 string supplied by the user.
509 n\bno\bon\bn-\b-i\bin\bnc\bcr\bre\bem\bme\ben\bnt\bta\bal\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-n\bn)\b)
c862e87b
JM
510 Search forward through the history using a non-
511 incremental search for a string supplied by the
aac48392
SS
512 user.
513 h\bhi\bis\bst\bto\bor\bry\by-\b-s\bse\bea\bar\brc\bch\bh-\b-f\bfo\bor\brw\bwa\bar\brd\bd
c862e87b 514 Search forward through the history for the string
aac48392 515 of characters between the start of the current line
c862e87b 516 and the current cursor position (the _\bp_\bo_\bi_\bn_\bt). This
aac48392
SS
517 is a non-incremental search.
518 h\bhi\bis\bst\bto\bor\bry\by-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd
c862e87b 519 Search backward through the history for the string
aac48392
SS
520 of characters between the start of the current line
521 and the point. This is a non-incremental search.
aac48392
SS
522
523
524
525
c862e87b 526GNU 1998 Dec 31 8
aac48392
SS
527
528
529
530
531
532READLINE(3) READLINE(3)
533
534
c862e87b
JM
535 y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg (\b(M\bM-\b-C\bC-\b-y\by)\b)
536 Insert the first argument to the previous command
537 (usually the second word on the previous line) at
538 point (the current cursor position). With an argu-
539 ment _\bn, insert the _\bnth word from the previous com-
540 mand (the words in the previous command begin with
541 word 0). A negative argument inserts the _\bnth word
542 from the end of the previous command.
aac48392 543 y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg (\b(M\bM-\b-.\b.,\b, M\bM-\b-_\b_)\b)
c862e87b
JM
544 Insert the last argument to the previous command
545 (the last word of the previous history entry).
aac48392
SS
546 With an argument, behave exactly like y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg.
547 Successive calls to y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg move back through
c862e87b 548 the history list, inserting the last argument of
aac48392
SS
549 each line in turn.
550
551 C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br C\bCh\bha\ban\bng\bgi\bin\bng\bg T\bTe\bex\bxt\bt
552 d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br (\b(C\bC-\b-d\bd)\b)
553 Delete the character under the cursor. If point is
c862e87b
JM
554 at the beginning of the line, there are no charac-
555 ters in the line, and the last character typed was
aac48392
SS
556 not bound to B\bBd\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br, then return E\bEO\bOF\bF.
557 b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br (\b(R\bRu\bub\bbo\bou\but\bt)\b)
558 Delete the character behind the cursor. When given
c862e87b 559 a numeric argument, save the deleted text on the
aac48392 560 kill ring.
c862e87b
JM
561 f\bfo\bor\brw\bwa\bar\brd\bd-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br
562 Delete the character under the cursor, unless the
563 cursor is at the end of the line, in which case the
564 character behind the cursor is deleted. By
565 default, this is not bound to a key.
aac48392
SS
566 q\bqu\buo\bot\bte\bed\bd-\b-i\bin\bns\bse\ber\brt\bt (\b(C\bC-\b-q\bq,\b, C\bC-\b-v\bv)\b)
567 Add the next character that you type to the line
568 verbatim. This is how to insert characters like
569 C\bC-\b-q\bq, for example.
570 t\bta\bab\bb-\b-i\bin\bns\bse\ber\brt\bt (\b(M\bM-\b-T\bTA\bAB\bB)\b)
571 Insert a tab character.
572 s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt (\b(a\ba,\b, b\bb,\b, A\bA,\b, 1\b1,\b, !\b!,\b, .\b..\b..\b.)\b)
573 Insert the character typed.
574 t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-c\bch\bha\bar\brs\bs (\b(C\bC-\b-t\bt)\b)
575 Drag the character before point forward over the
576 character at point. Point moves forward as well.
577 If point is at the end of the line, then transpose
578 the two characters before point. Negative argu-
579 ments don't work.
580 t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-w\bwo\bor\brd\bds\bs (\b(M\bM-\b-t\bt)\b)
581 Drag the word behind the cursor past the word in
582 front of the cursor moving the cursor over that
583 word as well.
584 u\bup\bpc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-u\bu)\b)
585 Uppercase the current (or following) word. With a
586 negative argument, uppercase the previous word, but
587 do not move point.
c862e87b
JM
588
589
590
591
592GNU 1998 Dec 31 9
593
594
595
596
597
598READLINE(3) READLINE(3)
599
600
aac48392
SS
601 d\bdo\bow\bwn\bnc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-l\bl)\b)
602 Lowercase the current (or following) word. With a
603 negative argument, lowercase the previous word, but
604 do not move point.
605 c\bca\bap\bpi\bit\bta\bal\bli\biz\bze\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-c\bc)\b)
606 Capitalize the current (or following) word. With a
607 negative argument, capitalize the previous word,
608 but do not move point.
609
610 K\bKi\bil\bll\bli\bin\bng\bg a\ban\bnd\bd Y\bYa\ban\bnk\bki\bin\bng\bg
611 k\bki\bil\bll\bl-\b-l\bli\bin\bne\be (\b(C\bC-\b-k\bk)\b)
612 Kill the text from the current cursor position to
613 the end of the line.
aac48392
SS
614 b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-l\bli\bin\bne\be (\b(C\bC-\b-x\bx R\bRu\bub\bbo\bou\but\bt)\b)
615 Kill backward to the beginning of the line.
616 u\bun\bni\bix\bx-\b-l\bli\bin\bne\be-\b-d\bdi\bis\bsc\bca\bar\brd\bd (\b(C\bC-\b-u\bu)\b)
617 Kill backward from point to the beginning of the
618 line. The killed text is saved on the kill-ring.
619 k\bki\bil\bll\bl-\b-w\bwh\bho\bol\ble\be-\b-l\bli\bin\bne\be
620 Kill all characters on the current line, no matter
621 where the cursor is.
622 k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-d\bd)\b)
623 Kill from the cursor to the end of the current
624 word, or if between words, to the end of the next
625 word. Word boundaries are the same as those used
626 by f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
627 b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-R\bRu\bub\bbo\bou\but\bt)\b)
628 Kill the word behind the cursor. Word boundaries
629 are the same as those used by b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
630 u\bun\bni\bix\bx-\b-w\bwo\bor\brd\bd-\b-r\bru\bub\bbo\bou\but\bt (\b(C\bC-\b-w\bw)\b)
631 Kill the word behind the cursor, using white space
632 as a word boundary. The word boundaries are dif-
633 ferent from b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd.
634 d\bde\bel\ble\bet\bte\be-\b-h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bl-\b-s\bsp\bpa\bac\bce\be (\b(M\bM-\b-\\b\)\b)
635 Delete all spaces and tabs around point.
636 k\bki\bil\bll\bl-\b-r\bre\beg\bgi\bio\bon\bn
637 Kill the text between the point and _\bm_\ba_\br_\bk (saved
638 cursor position). This text is referred to as the
639 _\br_\be_\bg_\bi_\bo_\bn.
640 c\bco\bop\bpy\by-\b-r\bre\beg\bgi\bio\bon\bn-\b-a\bas\bs-\b-k\bki\bil\bll\bl
641 Copy the text in the region to the kill buffer.
642 c\bco\bop\bpy\by-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
643 Copy the word before point to the kill buffer. The
644 word boundaries are the same as b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
645 c\bco\bop\bpy\by-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
646 Copy the word following point to the kill buffer.
647 The word boundaries are the same as f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
648 y\bya\ban\bnk\bk (\b(C\bC-\b-y\by)\b)
649 Yank the top of the kill ring into the buffer at
650 the cursor.
651 y\bya\ban\bnk\bk-\b-p\bpo\bop\bp (\b(M\bM-\b-y\by)\b)
652 Rotate the kill ring, and yank the new top. Only
653 works following y\bya\ban\bnk\bk or y\bya\ban\bnk\bk-\b-p\bpo\bop\bp.
654
c862e87b
JM
655
656
657
658GNU 1998 Dec 31 10
659
660
661
662
663
664READLINE(3) READLINE(3)
665
666
aac48392
SS
667 N\bNu\bum\bme\ber\bri\bic\bc A\bAr\brg\bgu\bum\bme\ben\bnt\bts\bs
668 d\bdi\big\bgi\bit\bt-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt (\b(M\bM-\b-0\b0,\b, M\bM-\b-1\b1,\b, .\b..\b..\b.,\b, M\bM-\b--\b-)\b)
669 Add this digit to the argument already accumulat-
670 ing, or start a new argument. M-- starts a nega-
671 tive argument.
672 u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt
673 This is another way to specify an argument. If
674 this command is followed by one or more digits,
675 optionally with a leading minus sign, those digits
676 define the argument. If the command is followed by
677 digits, executing u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt again ends the
678 numeric argument, but is otherwise ignored. As a
c862e87b
JM
679 special case, if this command is immediately fol-
680 lowed by a character that is neither a digit or
aac48392
SS
681 minus sign, the argument count for the next command
682 is multiplied by four. The argument count is ini-
683 tially one, so executing this function the first
684 time makes the argument count four, a second time
685 makes the argument count sixteen, and so on.
686
687 C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg
688 c\bco\bom\bmp\bpl\ble\bet\bte\be (\b(T\bTA\bAB\bB)\b)
689 Attempt to perform completion on the text before
690 point. The actual completion performed is applica-
691 tion-specific. B\bBa\bas\bsh\bh, for instance, attempts com-
692 pletion treating the text as a variable (if the
693 text begins with $\b$), username (if the text begins
694 with ~\b~), hostname (if the text begins with @\b@), or
695 command (including aliases and functions) in turn.
696 If none of these produces a match, filename comple-
697 tion is attempted. G\bGd\bdb\bb, on the other hand, allows
698 completion of program functions and variables, and
699 only attempts filename completion under certain
700 circumstances.
701 p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(M\bM-\b-?\b?)\b)
702 List the possible completions of the text before
703 point.
704 i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(M\bM-\b-*\b*)\b)
705 Insert all completions of the text before point
706 that would have been generated by p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\be-\b-
707 t\bti\bio\bon\bns\bs.
708 m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be
709 Similar to c\bco\bom\bmp\bpl\ble\bet\bte\be, but replaces the word to be
710 completed with a single match from the list of pos-
711 sible completions. Repeated execution of m\bme\ben\bnu\bu-\b-c\bco\bom\bm-\b-
712 p\bpl\ble\bet\bte\be steps through the list of possible comple-
713 tions, inserting each match in turn. At the end of
714 the list of completions, the bell is rung and the
715 original text is restored. An argument of _\bn moves
716 _\bn positions forward in the list of matches; a nega-
717 tive argument may be used to move backward through
718 the list. This command is intended to be bound to
719 T\bTA\bAB\bB, but is unbound by default.
720
aac48392
SS
721
722
723
c862e87b 724GNU 1998 Dec 31 11
aac48392
SS
725
726
aac48392
SS
727
728
729
c862e87b 730READLINE(3) READLINE(3)
aac48392
SS
731
732
c862e87b
JM
733 d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br-\b-o\bor\br-\b-l\bli\bis\bst\bt
734 Deletes the character under the cursor if not at
735 the beginning or end of the line (like d\bde\bel\ble\bet\bte\be-\b-
736 c\bch\bha\bar\br). If at the end of the line, behaves identi-
737 cally to p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs. This command is
738 unbound by default.
aac48392 739
c862e87b
JM
740 K\bKe\bey\byb\bbo\boa\bar\brd\bd M\bMa\bac\bcr\bro\bos\bs
741 s\bst\bta\bar\brt\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx (\b()\b)
742 Begin saving the characters typed into the current
743 keyboard macro.
744 e\ben\bnd\bd-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx )\b))\b)
745 Stop saving the characters typed into the current
746 keyboard macro and store the definition.
747 c\bca\bal\bll\bl-\b-l\bla\bas\bst\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx e\be)\b)
748 Re-execute the last keyboard macro defined, by mak-
749 ing the characters in the macro appear as if typed
750 at the keyboard.
aac48392
SS
751
752 M\bMi\bis\bsc\bce\bel\bll\bla\ban\bne\beo\bou\bus\bs
753 r\bre\be-\b-r\bre\bea\bad\bd-\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be (\b(C\bC-\b-x\bx C\bC-\b-r\br)\b)
754 Read in the contents of the _\bi_\bn_\bp_\bu_\bt_\br_\bc file, and
755 incorporate any bindings or variable assignments
756 found there.
757 a\bab\bbo\bor\brt\bt (\b(C\bC-\b-g\bg)\b)
758 Abort the current editing command and ring the ter-
759 minal's bell (subject to the setting of
760 b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be).
761 d\bdo\bo-\b-u\bup\bpp\bpe\ber\brc\bca\bas\bse\be-\b-v\bve\ber\brs\bsi\bio\bon\bn (\b(M\bM-\b-a\ba,\b, M\bM-\b-b\bb,\b, M\bM-\b-_\bx,\b, .\b..\b..\b.)\b)
762 If the metafied character _\bx is lowercase, run the
763 command that is bound to the corresponding upper-
764 case character.
765 p\bpr\bre\bef\bfi\bix\bx-\b-m\bme\bet\bta\ba (\b(E\bES\bSC\bC)\b)
766 Metafy the next character typed. E\bES\bSC\bC f\bf is equiva-
767 lent to M\bMe\bet\bta\ba-\b-f\bf.
768 u\bun\bnd\bdo\bo (\b(C\bC-\b-_\b_,\b, C\bC-\b-x\bx C\bC-\b-u\bu)\b)
769 Incremental undo, separately remembered for each
770 line.
771 r\bre\bev\bve\ber\brt\bt-\b-l\bli\bin\bne\be (\b(M\bM-\b-r\br)\b)
772 Undo all changes made to this line. This is like
773 executing the u\bun\bnd\bdo\bo command enough times to return
774 the line to its initial state.
c862e87b 775 t\bti\bil\bld\bde\be-\b-e\bex\bxp\bpa\ban\bnd\bd (\b(M\bM-\b-&\b&)\b)
aac48392
SS
776 Perform tilde expansion on the current word.
777 s\bse\bet\bt-\b-m\bma\bar\brk\bk (\b(C\bC-\b-@\b@,\b, M\bM-\b-<\b<s\bsp\bpa\bac\bce\be>\b>)\b)
778 Set the mark to the current point. If a numeric
779 argument is supplied, the mark is set to that posi-
780 tion.
781 e\bex\bxc\bch\bha\ban\bng\bge\be-\b-p\bpo\boi\bin\bnt\bt-\b-a\ban\bnd\bd-\b-m\bma\bar\brk\bk (\b(C\bC-\b-x\bx C\bC-\b-x\bx)\b)
782 Swap the point with the mark. The current cursor
783 position is set to the saved position, and the old
784 cursor position is saved as the mark.
785 c\bch\bha\bar\bra\bac\bct\bte\ber\br-\b-s\bse\bea\bar\brc\bch\bh (\b(C\bC-\b-]\b])\b)
786 A character is read and point is moved to the next
c862e87b
JM
787
788
789
790GNU 1998 Dec 31 12
791
792
793
794
795
796READLINE(3) READLINE(3)
797
798
aac48392
SS
799 occurrence of that character. A negative count
800 searches for previous occurrences.
801 c\bch\bha\bar\bra\bac\bct\bte\ber\br-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd (\b(M\bM-\b-C\bC-\b-]\b])\b)
802 A character is read and point is moved to the pre-
803 vious occurrence of that character. A negative
804 count searches for subsequent occurrences.
805 i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt (\b(M\bM-\b-#\b#)\b)
806 The value of the readline c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn variable is
807 inserted at the beginning of the current line, and
808 the line is accepted as if a newline had been
809 typed. This makes the current line a shell com-
810 ment.
811 d\bdu\bum\bmp\bp-\b-f\bfu\bun\bnc\bct\bti\bio\bon\bns\bs
812 Print all of the functions and their key bindings
813 to the readline output stream. If a numeric argu-
814 ment is supplied, the output is formatted in such a
815 way that it can be made part of an _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
816 d\bdu\bum\bmp\bp-\b-v\bva\bar\bri\bia\bab\bbl\ble\bes\bs
c862e87b
JM
817 Print all of the settable variables and their val-
818 ues to the readline output stream. If a numeric
aac48392
SS
819 argument is supplied, the output is formatted in
820 such a way that it can be made part of an _\bi_\bn_\bp_\bu_\bt_\br_\bc
821 file.
822 d\bdu\bum\bmp\bp-\b-m\bma\bac\bcr\bro\bos\bs
823 Print all of the readline key sequences bound to
824 macros and the strings they ouput. If a numeric
825 argument is supplied, the output is formatted in
826 such a way that it can be made part of an _\bi_\bn_\bp_\bu_\bt_\br_\bc
827 file.
828 e\bem\bma\bac\bcs\bs-\b-e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be (\b(C\bC-\b-e\be)\b)
829 When in v\bvi\bi editing mode, this causes a switch to
830 e\bem\bma\bac\bcs\bs editing mode.
831 v\bvi\bi-\b-e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be (\b(M\bM-\b-C\bC-\b-j\bj)\b)
832 When in e\bem\bma\bac\bcs\bs editing mode, this causes a switch to
833 v\bvi\bi editing mode.
834
835D\bDE\bEF\bFA\bAU\bUL\bLT\bT K\bKE\bEY\bY B\bBI\bIN\bND\bDI\bIN\bNG\bGS\bS
836 The following is a list of the default emacs and vi bind-
837 ings. Characters with the 8th bit set are written as
838 M-<character>, and are referred to as _\bm_\be_\bt_\ba_\bf_\bi_\be_\bd characters.
839 The printable ASCII characters not mentioned in the list
840 of emacs standard bindings are bound to the _\bs_\be_\bl_\bf_\b-_\bi_\bn_\bs_\be_\br_\bt
841 function, which just inserts the given character into the
842 input line. In vi insertion mode, all characters not
843 specifically mentioned are bound to _\bs_\be_\bl_\bf_\b-_\bi_\bn_\bs_\be_\br_\bt. Charac-
844 ters assigned to signal generation by _\bs_\bt_\bt_\by(1) or the ter-
845 minal driver, such as C-Z or C-C, retain that function.
846 Upper and lower case _\bm_\be_\bt_\ba_\bf_\bi_\be_\bd characters are bound to the
847 same function in the emacs mode meta keymap. The remain-
848 ing characters are unbound, which causes readline to ring
849 the bell (subject to the setting of the b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be vari-
850 able).
851
c862e87b
JM
852
853
854
855
856GNU 1998 Dec 31 13
857
858
859
860
861
862READLINE(3) READLINE(3)
863
864
aac48392
SS
865 E\bEm\bma\bac\bcs\bs M\bMo\bod\bde\be
866 Emacs Standard bindings
867
868 "C-@" set-mark
869 "C-A" beginning-of-line
870 "C-B" backward-char
871 "C-D" delete-char
872 "C-E" end-of-line
873 "C-F" forward-char
874 "C-G" abort
875 "C-H" backward-delete-char
876 "C-I" complete
877 "C-J" accept-line
878 "C-K" kill-line
879 "C-L" clear-screen
880 "C-M" accept-line
881 "C-N" next-history
882 "C-P" previous-history
883 "C-Q" quoted-insert
884 "C-R" reverse-search-history
aac48392
SS
885 "C-S" forward-search-history
886 "C-T" transpose-chars
887 "C-U" unix-line-discard
888 "C-V" quoted-insert
889 "C-W" unix-word-rubout
890 "C-Y" yank
891 "C-]" character-search
892 "C-_" undo
893 " " to "/" self-insert
894 "0" to "9" self-insert
895 ":" to "~" self-insert
896 "C-?" backward-delete-char
897
898 Emacs Meta bindings
899
900 "M-C-G" abort
901 "M-C-H" backward-kill-word
902 "M-C-I" tab-insert
903 "M-C-J" vi-editing-mode
904 "M-C-M" vi-editing-mode
905 "M-C-R" revert-line
906 "M-C-Y" yank-nth-arg
907 "M-C-[" complete
908 "M-C-]" character-search-backward
909 "M-space" set-mark
910 "M-#" insert-comment
911 "M-&" tilde-expand
912 "M-*" insert-completions
913 "M--" digit-argument
914 "M-." yank-last-arg
915 "M-0" digit-argument
916 "M-1" digit-argument
917 "M-2" digit-argument
918 "M-3" digit-argument
c862e87b
JM
919
920
921
922GNU 1998 Dec 31 14
923
924
925
926
927
928READLINE(3) READLINE(3)
929
930
aac48392
SS
931 "M-4" digit-argument
932 "M-5" digit-argument
933 "M-6" digit-argument
934 "M-7" digit-argument
935 "M-8" digit-argument
936 "M-9" digit-argument
937 "M-<" beginning-of-history
938 "M-=" possible-completions
939 "M->" end-of-history
940 "M-?" possible-completions
941 "M-B" backward-word
942 "M-C" capitalize-word
943 "M-D" kill-word
944 "M-F" forward-word
945 "M-L" downcase-word
946 "M-N" non-incremental-forward-search-history
947 "M-P" non-incremental-reverse-search-history
948 "M-R" revert-line
949 "M-T" transpose-words
950 "M-U" upcase-word
aac48392
SS
951 "M-Y" yank-pop
952 "M-\" delete-horizontal-space
953 "M-~" tilde-expand
954 "M-C-?" backward-delete-word
955 "M-_" yank-last-arg
956
957 Emacs Control-X bindings
958
959 "C-XC-G" abort
960 "C-XC-R" re-read-init-file
961 "C-XC-U" undo
962 "C-XC-X" exchange-point-and-mark
963 "C-X(" start-kbd-macro
964 "C-X)" end-kbd-macro
965 "C-XE" call-last-kbd-macro
966 "C-XC-?" backward-kill-line
967
968
969 V\bVI\bI M\bMo\bod\bde\be b\bbi\bin\bnd\bdi\bin\bng\bgs\bs
970 VI Insert Mode functions
971
972 "C-D" vi-eof-maybe
973 "C-H" backward-delete-char
974 "C-I" complete
975 "C-J" accept-line
976 "C-M" accept-line
977 "C-R" reverse-search-history
978 "C-S" forward-search-history
979 "C-T" transpose-chars
980 "C-U" unix-line-discard
981 "C-V" quoted-insert
982 "C-W" unix-word-rubout
983 "C-Y" yank
984 "C-[" vi-movement-mode
c862e87b
JM
985
986
987
988GNU 1998 Dec 31 15
989
990
991
992
993
994READLINE(3) READLINE(3)
995
996
aac48392
SS
997 "C-_" undo
998 " " to "~" self-insert
999 "C-?" backward-delete-char
1000
1001 VI Command Mode functions
1002
1003 "C-D" vi-eof-maybe
1004 "C-E" emacs-editing-mode
1005 "C-G" abort
1006 "C-H" backward-char
1007 "C-J" accept-line
1008 "C-K" kill-line
1009 "C-L" clear-screen
1010 "C-M" accept-line
1011 "C-N" next-history
1012 "C-P" previous-history
1013 "C-Q" quoted-insert
1014 "C-R" reverse-search-history
1015 "C-S" forward-search-history
1016 "C-T" transpose-chars
aac48392
SS
1017 "C-U" unix-line-discard
1018 "C-V" quoted-insert
1019 "C-W" unix-word-rubout
1020 "C-Y" yank
1021 " " forward-char
1022 "#" insert-comment
1023 "$" end-of-line
1024 "%" vi-match
1025 "&" vi-tilde-expand
1026 "*" vi-complete
1027 "+" next-history
1028 "," vi-char-search
1029 "-" previous-history
1030 "." vi-redo
1031 "/" vi-search
1032 "0" beginning-of-line
1033 "1" to "9" vi-arg-digit
1034 ";" vi-char-search
1035 "=" vi-complete
1036 "?" vi-search
1037 "A" vi-append-eol
1038 "B" vi-prev-word
1039 "C" vi-change-to
1040 "D" vi-delete-to
1041 "E" vi-end-word
1042 "F" vi-char-search
1043 "G" vi-fetch-history
1044 "I" vi-insert-beg
1045 "N" vi-search-again
1046 "P" vi-put
1047 "R" vi-replace
1048 "S" vi-subst
1049 "T" vi-char-search
1050 "U" revert-line
c862e87b
JM
1051
1052
1053
1054GNU 1998 Dec 31 16
1055
1056
1057
1058
1059
1060READLINE(3) READLINE(3)
1061
1062
aac48392
SS
1063 "W" vi-next-word
1064 "X" backward-delete-char
1065 "Y" vi-yank-to
1066 "\" vi-complete
1067 "^" vi-first-print
1068 "_" vi-yank-arg
1069 "`" vi-goto-mark
1070 "a" vi-append-mode
1071 "b" vi-prev-word
1072 "c" vi-change-to
1073 "d" vi-delete-to
1074 "e" vi-end-word
1075 "f" vi-char-search
1076 "h" backward-char
1077 "i" vi-insertion-mode
1078 "j" next-history
1079 "k" prev-history
1080 "l" forward-char
1081 "m" vi-set-mark
1082 "n" vi-search-again
aac48392
SS
1083 "p" vi-put
1084 "r" vi-change-char
1085 "s" vi-subst
1086 "t" vi-char-search
1087 "u" undo
1088 "w" vi-next-word
1089 "x" vi-delete
1090 "y" vi-yank-to
1091 "|" vi-column
1092 "~" vi-change-case
1093
1094S\bSE\bEE\bE A\bAL\bLS\bSO\bO
1095 _\bT_\bh_\be _\bG_\bn_\bu _\bR_\be_\ba_\bd_\bl_\bi_\bn_\be _\bL_\bi_\bb_\br_\ba_\br_\by, Brian Fox and Chet Ramey
1096 _\bT_\bh_\be _\bG_\bn_\bu _\bH_\bi_\bs_\bt_\bo_\br_\by _\bL_\bi_\bb_\br_\ba_\br_\by, Brian Fox and Chet Ramey
1097 _\bb_\ba_\bs_\bh(1)
1098
1099F\bFI\bIL\bLE\bES\bS
1100 _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc
1101 Individual r\bre\bea\bad\bdl\bli\bin\bne\be initialization file
1102
1103A\bAU\bUT\bTH\bHO\bOR\bRS\bS
1104 Brian Fox, Free Software Foundation (primary author)
1105 bfox@ai.MIT.Edu
1106
1107 Chet Ramey, Case Western Reserve University
1108 chet@ins.CWRU.Edu
1109
1110B\bBU\bUG\bG R\bRE\bEP\bPO\bOR\bRT\bTS\bS
1111 If you find a bug in r\bre\bea\bad\bdl\bli\bin\bne\be,\b, you should report it. But
1112 first, you should make sure that it really is a bug, and
1113 that it appears in the latest version of the r\bre\bea\bad\bdl\bli\bin\bne\be
1114 library that you have.
1115
1116 Once you have determined that a bug actually exists, mail
c862e87b
JM
1117
1118
1119
1120GNU 1998 Dec 31 17
1121
1122
1123
1124
1125
1126READLINE(3) READLINE(3)
1127
1128
aac48392
SS
1129 a bug report to _\bb_\bu_\bg_\b-_\br_\be_\ba_\bd_\bl_\bi_\bn_\be@_\bg_\bn_\bu_\b._\bo_\br_\bg. If you have a fix,
1130 you are welcome to mail that as well! Suggestions and
1131 `philosophical' bug reports may be mailed to _\bb_\bu_\bg_\b-_\br_\be_\ba_\bd_\b-
1132 _\bl_\bi_\bn_\be@_\bg_\bn_\bu_\b._\bo_\br_\bg or posted to the Usenet newsgroup
1133 g\bgn\bnu\bu.\b.b\bba\bas\bsh\bh.\b.b\bbu\bug\bg.
1134
1135 Comments and bug reports concerning this manual page
1136 should be directed to _\bc_\bh_\be_\bt_\b@_\bi_\bn_\bs_\b._\bC_\bW_\bR_\bU_\b._\bE_\bd_\bu.
1137
1138B\bBU\bUG\bGS\bS
1139 It's too big and too slow.
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
c862e87b
JM
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186GNU 1998 Dec 31 18
aac48392
SS
1187
1188
This page took 0.117199 seconds and 4 git commands to generate.