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