-
-
-
READLINE(3) READLINE(3)
+
N\bNA\bAM\bME\bE
readline - get a line from a user with editing
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
#\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bst\btd\bdi\bio\bo.\b.h\bh>\b>
- #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<r\bre\bea\bad\bdl\bli\bin\bne\be.\b.h\bh>\b>
- #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<h\bhi\bis\bst\bto\bor\bry\by.\b.h\bh>\b>
+ #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<r\bre\bea\bad\bdl\bli\bin\bne\be/\b/r\bre\bea\bad\bdl\bli\bin\bne\be.\b.h\bh>\b>
+ #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<r\bre\bea\bad\bdl\bli\bin\bne\be/\b/h\bhi\bis\bst\bto\bor\bry\by.\b.h\bh>\b>
- c\bch\bha\bar\br *\b*r\bre\bea\bad\bdl\bli\bin\bne\be (\b(p\bpr\bro\bom\bmp\bpt\bt)\b)
- c\bch\bha\bar\br *\b*p\bpr\bro\bom\bmp\bpt\bt;\b;
+ _\bc_\bh_\ba_\br _\b*
+ r\bre\bea\bad\bdl\bli\bin\bne\be (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bp_\br_\bo_\bm_\bp_\bt);
C\bCO\bOP\bPY\bYR\bRI\bIG\bGH\bHT\bT
- Readline is Copyright (C) 1989, 1991, 1993, 1995, 1996 by
- the Free Software Foundation, Inc.
+ Readline is Copyright (C) 1989-2002 by the Free Software
+ Foundation, Inc.
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
r\bre\bea\bad\bdl\bli\bin\bne\be will read a line from the terminal and return it,
- using p\bpr\bro\bom\bmp\bpt\bt as a prompt. If p\bpr\bro\bom\bmp\bpt\bt is null, no prompt is
- issued. The line returned is allocated with _\bm_\ba_\bl_\bl_\bo_\bc(3), so
- the caller must free it when finished. The line returned
- has the final newline removed, so only the text of the
- line remains.
+ using p\bpr\bro\bom\bmp\bpt\bt as a prompt. If p\bpr\bro\bom\bmp\bpt\bt is N\bNU\bUL\bLL\bL or the empty
+ string, no prompt is issued. The line returned is allo-
+ cated with _\bm_\ba_\bl_\bl_\bo_\bc(3); the caller must free it when fin-
+ ished. The line returned has the final newline removed,
+ so only the text of the line remains.
r\bre\bea\bad\bdl\bli\bin\bne\be offers editing capabilities while the user is
entering the line. By default, the line editing commands
are similar to those of emacs. A vi-style line editing
interface is also available.
+ This manual page describes only the most basic use of
+ r\bre\bea\bad\bdl\bli\bin\bne\be. Much more functionality is available; see _\bT_\bh_\be
+ _\bG_\bN_\bU _\bR_\be_\ba_\bd_\bl_\bi_\bn_\be _\bL_\bi_\bb_\br_\ba_\br_\by and _\bT_\bh_\be _\bG_\bN_\bU _\bH_\bi_\bs_\bt_\bo_\br_\by _\bL_\bi_\bb_\br_\ba_\br_\by for addi-
+ tional information.
+
R\bRE\bET\bTU\bUR\bRN\bN V\bVA\bAL\bLU\bUE\bE
- r\bre\bea\bad\bdl\bli\bin\bne\be returns the text of the line read. A blank line
- returns the empty string. If E\bEO\bOF\bF is encountered while
- reading a line, and the line is empty, N\bNU\bUL\bLL\bL is returned.
- If an E\bEO\bOF\bF is read with a non-empty line, it is treated as
+ r\bre\bea\bad\bdl\bli\bin\bne\be returns the text of the line read. A blank line
+ returns the empty string. If E\bEO\bOF\bF is encountered while
+ reading a line, and the line is empty, N\bNU\bUL\bLL\bL is returned.
+ If an E\bEO\bOF\bF is read with a non-empty line, it is treated as
a newline.
N\bNO\bOT\bTA\bAT\bTI\bIO\bON\bN
- An emacs-style notation is used to denote keystrokes.
- Control keys are denoted by C-_\bk_\be_\by, e.g., C-n means Con-
+ An emacs-style notation is used to denote keystrokes.
+ Control keys are denoted by C-_\bk_\be_\by, e.g., C-n means Con-
trol-N. Similarly, _\bm_\be_\bt_\ba keys are denoted by M-_\bk_\be_\by, so M-x
means Meta-X. (On keyboards without a _\bm_\be_\bt_\ba key, M-_\bx means
- ESC _\bx, i.e., press the Escape key then the _\bx key. This
- makes ESC the _\bm_\be_\bt_\ba _\bp_\br_\be_\bf_\bi_\bx. The combination M-C-_\bx means
- ESC-Control-_\bx, or press the Escape key then hold the Con-
+ ESC _\bx, i.e., press the Escape key then the _\bx key. This
+ makes ESC the _\bm_\be_\bt_\ba _\bp_\br_\be_\bf_\bi_\bx. The combination M-C-_\bx means
+ ESC-Control-_\bx, or press the Escape key then hold the Con-
trol key while pressing the _\bx key.)
- Readline commands may be given numeric _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs, which
+ Readline commands may be given numeric _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs, which
normally act as a repeat count. Sometimes, however, it is
- the sign of the argument that is significant. Passing a
- negative argument to a command that acts in the forward
- direction (e.g., k\bki\bil\bll\bl-\b-l\bli\bin\bne\be) causes that command to act in
- a backward direction. Commands whose behavior with argu-
+ the sign of the argument that is significant. Passing a
+ negative argument to a command that acts in the forward
+ direction (e.g., k\bki\bil\bll\bl-\b-l\bli\bin\bne\be) causes that command to act in
+ a backward direction. Commands whose behavior with argu-
ments deviates from this are noted.
- When a command is described as _\bk_\bi_\bl_\bl_\bi_\bn_\bg text, the text
-
-
-
-GNU 1999 Jun 1 1
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
- deleted is saved for possible future retrieval (_\by_\ba_\bn_\bk_\bi_\bn_\bg).
- The killed text is saved in a _\bk_\bi_\bl_\bl _\br_\bi_\bn_\bg. Consecutive
- kills cause the text to be accumulated into one unit,
- which can be yanked all at once. Commands which do not
+ When a command is described as _\bk_\bi_\bl_\bl_\bi_\bn_\bg text, the text
+ deleted is saved for possible future retrieval (_\by_\ba_\bn_\bk_\bi_\bn_\bg).
+ The killed text is saved in a _\bk_\bi_\bl_\bl _\br_\bi_\bn_\bg. Consecutive
+ kills cause the text to be accumulated into one unit,
+ which can be yanked all at once. Commands which do not
kill text separate the chunks of text on the kill ring.
I\bIN\bNI\bIT\bTI\bIA\bAL\bLI\bIZ\bZA\bAT\bTI\bIO\bON\bN F\bFI\bIL\bLE\bE
- Readline is customized by putting commands in an initial-
+ Readline is customized by putting commands in an initial-
ization file (the _\bi_\bn_\bp_\bu_\bt_\br_\bc file). The name of this file is
- taken from the value of the I\bIN\bNP\bPU\bUT\bTR\bRC\bC environment variable.
- If that variable is unset, the default is _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc.
- When a program which uses the readline library starts up,
- the init file is read, and the key bindings and variables
+ taken from the value of the I\bIN\bNP\bPU\bUT\bTR\bRC\bC environment variable.
+ If that variable is unset, the default is _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc.
+ When a program which uses the readline library starts up,
+ the init file is read, and the key bindings and variables
are set. There are only a few basic constructs allowed in
- the readline init file. Blank lines are ignored. Lines
+ the readline init file. Blank lines are ignored. Lines
beginning with a #\b# are comments. Lines beginning with a $\b$
- indicate conditional constructs. Other lines denote key
- bindings and variable settings. Each program using this
+ indicate conditional constructs. Other lines denote key
+ bindings and variable settings. Each program using this
library may add its own commands and bindings.
For example, placing
M-Control-u: universal-argument
or
C-Meta-u: universal-argument
- into the _\bi_\bn_\bp_\bu_\bt_\br_\bc would make M-C-u execute the readline
+
+ into the _\bi_\bn_\bp_\bu_\bt_\br_\bc would make M-C-u execute the readline
command _\bu_\bn_\bi_\bv_\be_\br_\bs_\ba_\bl_\b-_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt.
- The following symbolic character names are recognized
- while processing key bindings: _\bR_\bU_\bB_\bO_\bU_\bT, _\bD_\bE_\bL, _\bE_\bS_\bC, _\bL_\bF_\bD, _\bN_\bE_\bW_\b-
- _\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.
+ The following symbolic character names are recognized
+ while processing key bindings: _\bD_\bE_\bL, _\bE_\bS_\bC, _\bE_\bS_\bC_\bA_\bP_\bE, _\bL_\bF_\bD, _\bN_\bE_\bW_\b-
+ _\bL_\bI_\bN_\bE, _\bR_\bE_\bT, _\bR_\bE_\bT_\bU_\bR_\bN, _\bR_\bU_\bB_\bO_\bU_\bT, _\bS_\bP_\bA_\bC_\bE, _\bS_\bP_\bC, and _\bT_\bA_\bB.
- In addition to command names, readline allows keys to be
+ In addition to command names, readline allows keys to be
bound to a string that is inserted when the key is pressed
(a _\bm_\ba_\bc_\br_\bo).
K\bKe\bey\by B\bBi\bin\bnd\bdi\bin\bng\bgs\bs
- The syntax for controlling key bindings in the _\bi_\bn_\bp_\bu_\bt_\br_\bc
- file is simple. All that is required is the name of the
+ The syntax for controlling key bindings in the _\bi_\bn_\bp_\bu_\bt_\br_\bc
+ file is simple. All that is required is the name of the
command or the text of a macro and a key sequence to which
- it should be bound. The name may be specified in one of
- two ways: as a symbolic key name, possibly with _\bM_\be_\bt_\ba_\b- or
- _\bC_\bo_\bn_\bt_\br_\bo_\bl_\b- prefixes, or as a key sequence. When using the
- 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
- of a key spelled out in English. For example:
+ it should be bound. The name may be specified in one of
+ two ways: as a symbolic key name, possibly with _\bM_\be_\bt_\ba_\b- or
+ _\bC_\bo_\bn_\bt_\br_\bo_\bl_\b- prefixes, or as a key sequence.
+
+ When using the 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_\b-
+ _\bn_\ba_\bm_\be is the name of a key spelled out in English. For
+ example:
Control-u: universal-argument
Meta-Rubout: backward-kill-word
- Control-o: ">&output"
+ Control-o: "> output"
In the above example, _\bC_\b-_\bu is bound to the function u\bun\bni\biv\bve\ber\br-\b-
- 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-
- 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
-
-
-
-GNU 1999 Jun 1 2
-
-
-
+ 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-
+ 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
+ expressed on the right hand side (that is, to insert the
+ text ``> output'' into the line).
-
-READLINE(3) READLINE(3)
-
-
- expressed on the right hand side (that is, to insert the
- text _\b>_\b&_\bo_\bu_\bt_\bp_\bu_\bt into the line).
-
- 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-
+ 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-
s\bse\beq\bq differs from k\bke\bey\byn\bna\bam\bme\be above in that strings denoting an
- entire key sequence may be specified by placing the
- sequence within double quotes. Some GNU Emacs style key
- escapes can be used, as in the following example.
+ entire key sequence may be specified by placing the
+ sequence within double quotes. Some GNU Emacs style key
+ escapes can be used, as in the following example, but the
+ symbolic character names are not recognized.
"\C-u": universal-argument
"\C-x\C-r": re-read-init-file
In this example, _\bC_\b-_\bu is again bound to the function u\bun\bni\bi-\b-
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
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
- text F\bFu\bun\bnc\bct\bti\bio\bon\bn K\bKe\bey\by 1\b1. The full set of GNU Emacs style
- escape sequences is
+ text ``Function Key 1''.
+
+ The full set of GNU Emacs style escape sequences available
+ when specifying key sequences is
\\b\C\bC-\b- control prefix
\\b\M\bM-\b- meta prefix
\\b\e\be an escape character
\\b\\\b\ backslash
- \\b\"\b" literal "
- \\b\'\b' literal '
+ \\b\"\b" literal ", a double quote
+ \\b\'\b' literal ', a single quote
In addition to the GNU Emacs style escape sequences, a
second set of backslash escapes is available:
\\b\r\br carriage return
\\b\t\bt horizontal tab
\\b\v\bv vertical tab
- \\b\_\bn_\bn_\bn the character whose ASCII code is the octal
- value _\bn_\bn_\bn (one to three digits)
- \\b\x\bx_\bn_\bn_\bn the character whose ASCII code is the hex-
- adecimal value _\bn_\bn_\bn (one to three digits)
+ \\b\_\bn_\bn_\bn the eight-bit character whose value is the
+ octal value _\bn_\bn_\bn (one to three digits)
+ \\b\x\bx_\bH_\bH the eight-bit character whose value is the
+ hexadecimal value _\bH_\bH (one or two hex digits)
When entering the text of a macro, single or double quotes
- should be used to indicate a macro definition. Unquoted
+ should be used to indicate a macro definition. Unquoted
text is assumed to be a function name. In the macro body,
the backslash escapes described above are expanded. Back-
- slash will quote any other character in the macro text,
+ slash will quote any other character in the macro text,
including " and '.
- B\bBa\bas\bsh\bh allows the current readline key bindings to be dis-
- played or modified with the b\bbi\bin\bnd\bd builtin command. The
- editing mode may be switched during interactive use by
- using the -\b-o\bo option to the s\bse\bet\bt builtin command. Other
- programs using this library provide similar mechanisms.
- The _\bi_\bn_\bp_\bu_\bt_\br_\bc file may be edited and re-read if a program
- does not provide any other means to incorporate new
-
-
-
-GNU 1999 Jun 1 3
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
- bindings.
+ B\bBa\bas\bsh\bh allows the current readline key bindings to be dis-
+ played or modified with the b\bbi\bin\bnd\bd builtin command. The
+ editing mode may be switched during interactive use by
+ using the -\b-o\bo option to the s\bse\bet\bt builtin command. Other
+ programs using this library provide similar mechanisms.
+ The _\bi_\bn_\bp_\bu_\bt_\br_\bc file may be edited and re-read if a program
+ does not provide any other means to incorporate new bind-
+ ings.
V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs
- Readline has variables that can be used to further cus-
+ Readline has variables that can be used to further cus-
tomize its behavior. A variable may be set in the _\bi_\bn_\bp_\bu_\bt_\br_\bc
file with a statement of the form
s\bse\bet\bt _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be_\b-_\bn_\ba_\bm_\be _\bv_\ba_\bl_\bu_\be
Except where noted, readline variables can take the values
- O\bOn\bn or O\bOf\bff\bf. The variables and their default values are:
+ O\bOn\bn or O\bOf\bff\bf (without regard to case). The variables and
+ their default values are:
b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be (\b(a\bau\bud\bdi\bib\bbl\ble\be)\b)
Controls what happens when readline wants to ring
c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba (\b(O\bOn\bn)\b)
If set to O\bOn\bn, readline will convert characters with
the eighth bit set to an ASCII key sequence by
- stripping the eighth bit and prepending an escape
- character (in effect, using escape as the _\bm_\be_\bt_\ba _\bp_\br_\be_\b-
- _\bf_\bi_\bx).
+ stripping the eighth bit and prefixing it with an
+ escape character (in effect, using escape as the
+ _\bm_\be_\bt_\ba _\bp_\br_\be_\bf_\bi_\bx).
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)
If set to O\bOn\bn, readline will inhibit word comple-
tion. Completion characters will be inserted into
the line as if they had been mapped to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt.
e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be (\b(e\bem\bma\bac\bcs\bs)\b)
Controls whether readline begins with a set of key
- 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
+ bindings similar to emacs or vi. e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be can
be set to either e\bem\bma\bac\bcs\bs or v\bvi\bi.
e\ben\bna\bab\bbl\ble\be-\b-k\bke\bey\byp\bpa\bad\bd (\b(O\bOf\bff\bf)\b)
When set to O\bOn\bn, readline will try to enable the
application keypad when it is called. Some systems
need this to enable the arrow keys.
-
-
-
-GNU 1999 Jun 1 4
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
e\bex\bxp\bpa\ban\bnd\bd-\b-t\bti\bil\bld\bde\be (\b(O\bOf\bff\bf)\b)
If set to o\bon\bn, tilde expansion is performed when
readline attempts word completion.
+ h\bhi\bis\bst\bto\bor\bry\by-\b-p\bpr\bre\bes\bse\ber\brv\bve\be-\b-p\bpo\boi\bin\bnt\bt
+ If set to o\bon\bn, the history code attempts to place
+ point at the same location on each history line
+ retrived with p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bst\bto\bor\bry\by or n\bne\bex\bxt\bt-\b-h\bhi\bis\bst\bto\bor\bry\by.
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)
When set to O\bOn\bn, makes readline use a single line
for display, scrolling the input horizontally on a
screen width rather than wrapping to a new line.
i\bin\bnp\bpu\but\bt-\b-m\bme\bet\bta\ba (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, readline will enable eight-bit input
- (that is, it will not strip the high bit from the
+ (that is, it will not clear the eighth bit in the
characters it reads), regardless of what the termi-
nal claims it can support. The name m\bme\bet\bta\ba-\b-f\bfl\bla\bag\bg is a
synonym for this variable.
- 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)
+ 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)
The string of characters that should terminate an
incremental search without subsequently executing
the character as a command. If this variable has
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,
_\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.
_\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd; _\be_\bm_\ba_\bc_\bs is equivalent
- 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
- value of e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be also affects the default
+ 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 value of e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be also affects the default
keymap.
m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs (\b(O\bOn\bn)\b)
- If set to O\bOn\bn, complete<d directory names have a
+ If set to O\bOn\bn, completed directory names have a
slash appended.
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)
If set to O\bOn\bn, history lines that have been modified
are displayed with a preceding asterisk (*\b*).
+ m\bma\bar\brk\bk-\b-s\bsy\bym\bml\bli\bin\bnk\bke\bed\bd-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs (\b(O\bOf\bff\bf)\b)
+ If set to O\bOn\bn, completed names which are symbolic
+ links to directories have a slash appended (subject
+ to the value of m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs).
+ m\bma\bat\btc\bch\bh-\b-h\bhi\bid\bdd\bde\ben\bn-\b-f\bfi\bil\ble\bes\bs (\b(O\bOn\bn)\b)
+ This variable, when set to O\bOn\bn, causes readline to
+ match files whose names begin with a `.' (hidden
+ files) when performing filename completion, unless
+ the leading `.' is supplied by the user in the
+ filename to be completed.
o\bou\but\btp\bpu\but\bt-\b-m\bme\bet\bta\ba (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, readline will display characters with
the eighth bit set directly rather than as a meta-
prefixed escape sequence.
+ p\bpa\bag\bge\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(O\bOn\bn)\b)
+ If set to O\bOn\bn, readline uses an internal _\bm_\bo_\br_\be-like
+ pager to display a screenful of possible comple-
+ tions at a time.
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)
If set to O\bOn\bn, readline will display completions
with matches sorted horizontally in alphabetical
be listed immediately instead of ringing the bell.
v\bvi\bis\bsi\bib\bbl\ble\be-\b-s\bst\bta\bat\bts\bs (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, a character denoting a file's type as
- reported by s\bst\bta\bat\bt(2) is appended to the filename
+ reported by _\bs_\bt_\ba_\bt(2) is appended to the filename
when listing possible completions.
C\bCo\bon\bnd\bdi\bit\bti\bio\bon\bna\bal\bl C\bCo\bon\bns\bst\btr\bru\buc\bct\bts\bs
Readline implements a facility similar in spirit to the
-
-
-
-GNU 1999 Jun 1 5
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
conditional compilation features of the C preprocessor
which allows key bindings and variable settings to be per-
formed as the result of tests. There are four parser
that quotes the current or previous word in
Bash:
- $\b$i\bif\bf bash
+ $\b$i\bif\bf Bash
# Quote the current or previous word
"\C-xq": "\eb\"\ef\""
$\b$e\ben\bnd\bdi\bif\bf
$\b$i\bin\bnc\bcl\blu\bud\bde\be
This directive takes a single filename as an argu-
ment and reads commands and bindings from that
-
-
-
-GNU 1999 Jun 1 6
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
file. For example, the following directive would
read _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc:
string is typed, readline displays the next entry from the
history matching the string typed so far. An incremental
search requires only as many characters as needed to find
- the desired history entry. The characters present in the
- value of the _\bi_\bs_\be_\ba_\br_\bc_\bh_\b-_\bt_\be_\br_\bm_\bi_\bn_\ba_\bt_\bo_\br_\bs variable are used to ter-
- minate an incremental search. If that variable has not
- been assigned a value the Escape and Control-J characters
- will terminate an incremental search. Control-G will
- abort an incremental search and restore the original line.
- When the search is terminated, the history entry contain-
- ing the search string becomes the current line. To find
- other matching entries in the history list, type Control-S
- or Control-R as appropriate. This will search backward or
- forward in the history for the next line matching the
- search string typed so far. Any other key sequence bound
- to a readline command will terminate the search and exe-
- cute that command. For instance, a _\bn_\be_\bw_\bl_\bi_\bn_\be will terminate
+ the desired history entry. To search backward in the his-
+ tory for a particular string, type C\bC-\b-r\br. Typing C\bC-\b-s\bs
+ searches forward through the history. The characters pre-
+ sent in the value of the i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs variable are
+ used to terminate an incremental search. If that variable
+ has not been assigned a value the _\bE_\bs_\bc_\ba_\bp_\be and C\bC-\b-J\bJ charac-
+ ters will terminate an incremental search. C\bC-\b-G\bG will abort
+ an incremental search and restore the original line. When
+ the search is terminated, the history entry containing the
+ search string becomes the current line.
+
+ To find other matching entries in the history list, type
+ C\bC-\b-s\bs or C\bC-\b-r\br as appropriate. This will search backward or
+ forward in the history for the next line matching the
+ search string typed so far. Any other key sequence bound
+ to a readline command will terminate the search and exe-
+ cute that command. For instance, a newline will terminate
the search and accept the line, thereby executing the com-
- mand from the history list.
+ mand from the history list. A movement command will ter-
+ minate the search, make the last line found the current
+ line, and begin editing.
- Non-incremental searches read the entire search string
+ Non-incremental searches read the entire search string
before starting to search for matching history lines. The
- search string may be typed by the user or be part of the
+ search string may be typed by the user or be part of the
contents of the current line.
E\bED\bDI\bIT\bTI\bIN\bNG\bG C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
- The following is a list of the names of the commands and
- the default key sequences to which they are bound. Com-
+ The following is a list of the names of the commands and
+ the default key sequences to which they are bound. Com-
mand names without an accompanying key sequence are
unbound by default.
+ In the following descriptions, _\bp_\bo_\bi_\bn_\bt refers to the current
+ cursor position, and _\bm_\ba_\br_\bk refers to a cursor position
+ saved by the s\bse\bet\bt-\b-m\bma\bar\brk\bk command. The text between the point
+ and mark is referred to as the _\br_\be_\bg_\bi_\bo_\bn.
+
C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br M\bMo\bov\bvi\bin\bng\bg
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)
Move to the start of the current line.
Move forward a character.
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-c\bch\bha\bar\br (\b(C\bC-\b-b\bb)\b)
Move back a character.
-
-
-
-
-GNU 1999 Jun 1 7
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-f\bf)\b)
Move forward to the end of the next word. Words
are composed of alphanumeric characters (letters
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
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)
Accept the line regardless of where the cursor is.
- If this line is non-empty, add it to the history
- list. If the line is a modified history line, then
- restore the history line to its original state.
+ If this line is non-empty, it may be added to the
+ history list for future recall with a\bad\bdd\bd_\b_h\bhi\bis\bst\bto\bor\bry\by(\b()\b).
+ If the line is a modified history line, the history
+ line is restored to its original state.
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)
- Fetch the previous command from the history list,
+ Fetch the previous command from the history list,
moving back in the list.
n\bne\bex\bxt\bt-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-n\bn)\b)
- Fetch the next command from the history list, mov-
+ Fetch the next command from the history list, mov-
ing forward in the list.
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)
Move to the first line in the history.
e\ben\bnd\bd-\b-o\bof\bf-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b->\b>)\b)
- Move to the end of the input history, i.e., the
+ Move to the end of the input history, i.e., the
line currently being entered.
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)
- Search backward starting at the current line and
+ Search backward starting at the current line and
moving `up' through the history as necessary. This
is an incremental search.
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)
- Search forward starting at the current line and
- moving `down' through the history as necessary.
+ Search forward starting at the current line and
+ moving `down' through the history as necessary.
This is an incremental search.
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)
Search backward through the history starting at the
- current line using a non-incremental search for a
+ current line using a non-incremental search for a
string supplied by the user.
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)
- Search forward through the history using a non-
- incremental search for a string supplied by the
+ Search forward through the history using a non-
+ incremental search for a string supplied by the
user.
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
- Search forward through the history for the string
+ Search forward through the history for the string
of characters between the start of the current line
- and the current cursor position (the _\bp_\bo_\bi_\bn_\bt). This
+ and the current cursor position (the _\bp_\bo_\bi_\bn_\bt). This
is a non-incremental search.
-
-
-
-
-GNU 1999 Jun 1 8
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
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
- Search backward through the history for the string
+ Search backward through the history for the string
of characters between the start of the current line
and the point. This is a non-incremental search.
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)
- Insert the first argument to the previous command
- (usually the second word on the previous line) at
- point (the current cursor position). With an argu-
- ment _\bn, insert the _\bnth word from the previous com-
- mand (the words in the previous command begin with
- word 0). A negative argument inserts the _\bnth word
- from the end of the previous command.
+ Insert the first argument to the previous command
+ (usually the second word on the previous line) at
+ point. With an argument _\bn, insert the _\bnth word
+ from the previous command (the words in the previ-
+ ous command begin with word 0). A negative argu-
+ ment inserts the _\bnth word from the end of the pre-
+ vious command.
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)
- Insert the last argument to the previous command
- (the last word of the previous history entry).
+ Insert the last argument to the previous command
+ (the last word of the previous history entry).
With an argument, behave exactly like y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg.
Successive calls to y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg move back through
- the history list, inserting the last argument of
+ the history list, inserting the last argument of
each line in turn.
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
d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br (\b(C\bC-\b-d\bd)\b)
- Delete the character under the cursor. If point is
- at the beginning of the line, there are no charac-
- ters in the line, and the last character typed was
- not bound to B\bBd\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br, then return E\bEO\bOF\bF.
+ Delete the character at point. If point is at the
+ beginning of the line, there are no characters in
+ the line, and the last character typed was not
+ bound to d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br, then return E\bEO\bOF\bF.
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)
Delete the character behind the cursor. When given
- a numeric argument, save the deleted text on the
+ a numeric argument, save the deleted text on the
kill ring.
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
- Delete the character under the cursor, unless the
+ Delete the character under the cursor, unless the
cursor is at the end of the line, in which case the
- character behind the cursor is deleted. By
- default, this is not bound to a key.
+ character behind the cursor is deleted.
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)
Add the next character that you type to the line
verbatim. This is how to insert characters like
Insert the character typed.
t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-c\bch\bha\bar\brs\bs (\b(C\bC-\b-t\bt)\b)
Drag the character before point forward over the
- character at point. Point moves forward as well.
- If point is at the end of the line, then transpose
- the two characters before point. Negative argu-
- ments don't work.
+ character at point, moving point forward as well.
+ If point is at the end of the line, then this
+ transposes the two characters before point. Nega-
+ tive arguments have no effect.
t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-w\bwo\bor\brd\bds\bs (\b(M\bM-\b-t\bt)\b)
- Drag the word behind the cursor past the word in
- front of the cursor moving the cursor over that
- word as well.
-
-
-
-
-GNU 1999 Jun 1 9
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
+ Drag the word before point past the word after
+ point, moving point over that word as well. If
+ point is at the end of the line, this transposes
+ the last two words on the line.
u\bup\bpc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-u\bu)\b)
- Uppercase the current (or following) word. With a
+ Uppercase the current (or following) word. With a
negative argument, uppercase the previous word, but
do not move point.
d\bdo\bow\bwn\bnc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-l\bl)\b)
- Lowercase the current (or following) word. With a
+ Lowercase the current (or following) word. With a
negative argument, lowercase the previous word, but
do not move point.
c\bca\bap\bpi\bit\bta\bal\bli\biz\bze\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-c\bc)\b)
Capitalize the current (or following) word. With a
- negative argument, capitalize the previous word,
+ negative argument, capitalize the previous word,
but do not move point.
+ o\bov\bve\ber\brw\bwr\bri\bit\bte\be-\b-m\bmo\bod\bde\be
+ Toggle overwrite mode. With an explicit positive
+ numeric argument, switches to overwrite mode. With
+ an explicit non-positive numeric argument, switches
+ to insert mode. This command affects only e\bem\bma\bac\bcs\bs
+ mode; v\bvi\bi mode does overwrite differently. Each
+ call to _\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b(_\b) starts in insert mode. In over-
+ write mode, characters bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt replace
+ the text at point rather than pushing the text to
+ the right. Characters bound to b\bba\bac\bck\bk-\b-
+ w\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br replace the character before point
+ with a space. By default, this command is unbound.
K\bKi\bil\bll\bli\bin\bng\bg a\ban\bnd\bd Y\bYa\ban\bnk\bki\bin\bng\bg
k\bki\bil\bll\bl-\b-l\bli\bin\bne\be (\b(C\bC-\b-k\bk)\b)
- Kill the text from the current cursor position to
- the end of the line.
+ Kill the text from point to the end of the line.
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)
Kill backward to the beginning of the line.
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)
- Kill backward from point to the beginning of the
+ Kill backward from point to the beginning of the
line. The killed text is saved on the kill-ring.
k\bki\bil\bll\bl-\b-w\bwh\bho\bol\ble\be-\b-l\bli\bin\bne\be
- Kill all characters on the current line, no matter
- where the cursor is.
+ Kill all characters on the current line, no matter
+ where point is.
k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-d\bd)\b)
- Kill from the cursor to the end of the current
- word, or if between words, to the end of the next
- word. Word boundaries are the same as those used
- by f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
+ Kill from point the end of the current word, or if
+ between words, to the end of the next word. Word
+ boundaries are the same as those used by f\bfo\bor\br-\b-
+ w\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
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)
- Kill the word behind the cursor. Word boundaries
- are the same as those used by b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
+ Kill the word behind point. Word boundaries are
+ the same as those used by b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
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)
- Kill the word behind the cursor, using white space
- as a word boundary. The word boundaries are dif-
- ferent from b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd.
+ Kill the word behind point, using white space as a
+ word boundary. The killed text is saved on the
+ kill-ring.
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)
Delete all spaces and tabs around point.
k\bki\bil\bll\bl-\b-r\bre\beg\bgi\bio\bon\bn
- Kill the text between the point and _\bm_\ba_\br_\bk (saved
- cursor position). This text is referred to as the
+ Kill the text between the point and _\bm_\ba_\br_\bk (saved
+ cursor position). This text is referred to as the
_\br_\be_\bg_\bi_\bo_\bn.
c\bco\bop\bpy\by-\b-r\bre\beg\bgi\bio\bon\bn-\b-a\bas\bs-\b-k\bki\bil\bll\bl
Copy the text in the region to the kill buffer.
Copy the word before point to the kill buffer. The
word boundaries are the same as b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
c\bco\bop\bpy\by-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
- Copy the word following point to the kill buffer.
+ Copy the word following point to the kill buffer.
The word boundaries are the same as f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
y\bya\ban\bnk\bk (\b(C\bC-\b-y\by)\b)
- Yank the top of the kill ring into the buffer at
- the cursor.
-
-
-
-GNU 1999 Jun 1 10
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
+ Yank the top of the kill ring into the buffer at
+ point.
y\bya\ban\bnk\bk-\b-p\bpo\bop\bp (\b(M\bM-\b-y\by)\b)
- Rotate the kill ring, and yank the new top. Only
+ Rotate the kill ring, and yank the new top. Only
works following y\bya\ban\bnk\bk or y\bya\ban\bnk\bk-\b-p\bpo\bop\bp.
N\bNu\bum\bme\ber\bri\bic\bc A\bAr\brg\bgu\bum\bme\ben\bnt\bts\bs
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)
- Add this digit to the argument already accumulat-
- ing, or start a new argument. M-- starts a nega-
+ Add this digit to the argument already accumulat-
+ ing, or start a new argument. M-- starts a nega-
tive argument.
u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt
- This is another way to specify an argument. If
- this command is followed by one or more digits,
- optionally with a leading minus sign, those digits
+ This is another way to specify an argument. If
+ this command is followed by one or more digits,
+ optionally with a leading minus sign, those digits
define the argument. If the command is followed by
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
- numeric argument, but is otherwise ignored. As a
- special case, if this command is immediately fol-
- lowed by a character that is neither a digit or
+ numeric argument, but is otherwise ignored. As a
+ special case, if this command is immediately fol-
+ lowed by a character that is neither a digit or
minus sign, the argument count for the next command
- is multiplied by four. The argument count is ini-
- tially one, so executing this function the first
- time makes the argument count four, a second time
+ is multiplied by four. The argument count is ini-
+ tially one, so executing this function the first
+ time makes the argument count four, a second time
makes the argument count sixteen, and so on.
C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg
c\bco\bom\bmp\bpl\ble\bet\bte\be (\b(T\bTA\bAB\bB)\b)
- Attempt to perform completion on the text before
+ Attempt to perform completion on the text before
point. The actual completion performed is applica-
- tion-specific. B\bBa\bas\bsh\bh, for instance, attempts com-
- pletion treating the text as a variable (if the
- text begins with $\b$), username (if the text begins
- with ~\b~), hostname (if the text begins with @\b@), or
- command (including aliases and functions) in turn.
+ tion-specific. B\bBa\bas\bsh\bh, for instance, attempts com-
+ pletion treating the text as a variable (if the
+ text begins with $\b$), username (if the text begins
+ with ~\b~), hostname (if the text begins with @\b@), or
+ command (including aliases and functions) in turn.
If none of these produces a match, filename comple-
- tion is attempted. G\bGd\bdb\bb, on the other hand, allows
- completion of program functions and variables, and
- only attempts filename completion under certain
+ tion is attempted. G\bGd\bdb\bb, on the other hand, allows
+ completion of program functions and variables, and
+ only attempts filename completion under certain
circumstances.
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)
- List the possible completions of the text before
+ List the possible completions of the text before
point.
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)
- Insert all completions of the text before point
- that would have been generated by p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\be-\b-
+ Insert all completions of the text before point
+ that would have been generated by p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\be-\b-
t\bti\bio\bon\bns\bs.
m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be
- Similar to c\bco\bom\bmp\bpl\ble\bet\bte\be, but replaces the word to be
+ Similar to c\bco\bom\bmp\bpl\ble\bet\bte\be, but replaces the word to be
completed with a single match from the list of pos-
sible completions. Repeated execution of m\bme\ben\bnu\bu-\b-c\bco\bom\bm-\b-
- p\bpl\ble\bet\bte\be steps through the list of possible comple-
+ p\bpl\ble\bet\bte\be steps through the list of possible comple-
tions, inserting each match in turn. At the end of
- the list of completions, the bell is rung and the
- original text is restored. An argument of _\bn moves
- _\bn positions forward in the list of matches; a
-
-
-
-GNU 1999 Jun 1 11
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
- negative argument may be used to move backward
- through the list. This command is intended to be
- bound to T\bTA\bAB\bB, but is unbound by default.
+ the list of completions, the bell is rung (subject
+ to the setting of 0\b0a\ban\bnd\bd t\bth\bhe\be o\bor\bri\big\bgi\bin\bna\bal\bl t\bte\bex\bxt\bt i\bis\bs
+ r\bre\bes\bst\bto\bor\bre\bed\bd.\b. A\bAn\bn a\bar\brg\bgu\bum\bme\ben\bnt\bt o\bof\bf _\bn m\bmo\bov\bve\bes\bs _\bn p\bpo\bos\bsi\bit\bti\bio\bon\bns\bs f\bfo\bor\br-\b-
+ w\bwa\bar\brd\bd i\bin\bn t\bth\bhe\be l\bli\bis\bst\bt o\bof\bf m\bma\bat\btc\bch\bhe\bes\bs;\b; a\ba n\bne\beg\bga\bat\bti\biv\bve\be a\bar\brg\bgu\bum\bme\ben\bnt\bt
+ m\bma\bay\by b\bbe\be u\bus\bse\bed\bd t\bto\bo m\bmo\bov\bve\be b\bba\bac\bck\bkw\bwa\bar\brd\bd t\bth\bhr\bro\bou\bug\bgh\bh t\bth\bhe\be l\bli\bis\bst\bt.\b.
+ T\bTh\bhi\bis\bs c\bco\bom\bmm\bma\ban\bnd\bd i\bis\bs i\bin\bnt\bte\ben\bnd\bde\bed\bd t\bto\bo b\bbe\be b\bbo\bou\bun\bnd\bd t\bto\bo T\bTA\bAB\bB,\b, b\bbu\but\bt i\bis\bs
+ u\bun\bnb\bbo\bou\bun\bnd\bd b\bby\by d\bde\bef\bfa\bau\bul\blt\bt.\b.
d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br-\b-o\bor\br-\b-l\bli\bis\bst\bt
Deletes the character under the cursor if not at
the beginning or end of the line (like d\bde\bel\ble\bet\bte\be-\b-
c\bch\bha\bar\br). If at the end of the line, behaves identi-
- 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
- unbound by default.
+ cally to p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs.
K\bKe\bey\byb\bbo\boa\bar\brd\bd M\bMa\bac\bcr\bro\bos\bs
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)
- Begin saving the characters typed into the current
+ Begin saving the characters typed into the current
keyboard macro.
e\ben\bnd\bd-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx )\b))\b)
- Stop saving the characters typed into the current
+ Stop saving the characters typed into the current
keyboard macro and store the definition.
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)
Re-execute the last keyboard macro defined, by mak-
- ing the characters in the macro appear as if typed
+ ing the characters in the macro appear as if typed
at the keyboard.
M\bMi\bis\bsc\bce\bel\bll\bla\ban\bne\beo\bou\bus\bs
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)
- Read in the contents of the _\bi_\bn_\bp_\bu_\bt_\br_\bc file, and
- incorporate any bindings or variable assignments
+ Read in the contents of the _\bi_\bn_\bp_\bu_\bt_\br_\bc file, and
+ incorporate any bindings or variable assignments
found there.
a\bab\bbo\bor\brt\bt (\b(C\bC-\b-g\bg)\b)
Abort the current editing command and ring the ter-
minal's bell (subject to the setting of
b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be).
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)
- If the metafied character _\bx is lowercase, run the
- command that is bound to the corresponding upper-
+ If the metafied character _\bx is lowercase, run the
+ command that is bound to the corresponding upper-
case character.
p\bpr\bre\bef\bfi\bix\bx-\b-m\bme\bet\bta\ba (\b(E\bES\bSC\bC)\b)
- Metafy the next character typed. E\bES\bSC\bC f\bf is equiva-
+ Metafy the next character typed. E\bES\bSC\bC f\bf is equiva-
lent to M\bMe\bet\bta\ba-\b-f\bf.
u\bun\bnd\bdo\bo (\b(C\bC-\b-_\b_,\b, C\bC-\b-x\bx C\bC-\b-u\bu)\b)
- Incremental undo, separately remembered for each
+ Incremental undo, separately remembered for each
line.
r\bre\bev\bve\ber\brt\bt-\b-l\bli\bin\bne\be (\b(M\bM-\b-r\br)\b)
- Undo all changes made to this line. This is like
- executing the u\bun\bnd\bdo\bo command enough times to return
+ Undo all changes made to this line. This is like
+ executing the u\bun\bnd\bdo\bo command enough times to return
the line to its initial state.
t\bti\bil\bld\bde\be-\b-e\bex\bxp\bpa\ban\bnd\bd (\b(M\bM-\b-&\b&)\b)
Perform tilde expansion on the current word.
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)
- Set the mark to the current point. If a numeric
- argument is supplied, the mark is set to that posi-
- tion.
+ Set the mark to the point. If a numeric argument
+ is supplied, the mark is set to that position.
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)
Swap the point with the mark. The current cursor
position is set to the saved position, and the old
-
-
-
-GNU 1999 Jun 1 12
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
cursor position is saved as the mark.
c\bch\bha\bar\bra\bac\bct\bte\ber\br-\b-s\bse\bea\bar\brc\bch\bh (\b(C\bC-\b-]\b])\b)
A character is read and point is moved to the next
vious occurrence of that character. A negative
count searches for subsequent occurrences.
i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt (\b(M\bM-\b-#\b#)\b)
- The value of the readline c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn variable is
- inserted at the beginning of the current line, and
- the line is accepted as if a newline had been
- typed. This makes the current line a shell com-
- ment.
+ Without a numeric argument, the value of the read-
+ line c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn variable is inserted at the
+ beginning of the current line. If a numeric argu-
+ ment is supplied, this command acts as a toggle:
+ if the characters at the beginning of the line do
+ not match the value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn, the value is
+ inserted, otherwise the characters in c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn
+ are deleted from the beginning of the line. In
+ either case, the line is accepted as if a newline
+ had been typed. The default value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn
+ makes the current line a shell comment. If a
+ numeric argument causes the comment character to be
+ removed, the line will be executed by the shell.
d\bdu\bum\bmp\bp-\b-f\bfu\bun\bnc\bct\bti\bio\bon\bns\bs
Print all of the functions and their key bindings
- to the readline output stream. If a numeric argu-
- ment is supplied, the output is formatted in such a
- way that it can be made part of an _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
+ to the readline output stream. If a numeric
+ argument is supplied, the output is formatted in
+ such a way that it can be made part of an _\bi_\bn_\bp_\bu_\bt_\br_\bc
+ file.
d\bdu\bum\bmp\bp-\b-v\bva\bar\bri\bia\bab\bbl\ble\bes\bs
- Print all of the settable variables and their val-
- ues to the readline output stream. If a numeric
- argument is supplied, the output is formatted in
- such a way that it can be made part of an _\bi_\bn_\bp_\bu_\bt_\br_\bc
+ Print all of the settable variables and their val-
+ ues to the readline output stream. If a numeric
+ argument is supplied, the output is formatted in
+ such a way that it can be made part of an _\bi_\bn_\bp_\bu_\bt_\br_\bc
file.
d\bdu\bum\bmp\bp-\b-m\bma\bac\bcr\bro\bos\bs
- Print all of the readline key sequences bound to
- macros and the strings they ouput. If a numeric
- argument is supplied, the output is formatted in
- such a way that it can be made part of an _\bi_\bn_\bp_\bu_\bt_\br_\bc
+ Print all of the readline key sequences bound to
+ macros and the strings they ouput. If a numeric
+ argument is supplied, the output is formatted in
+ such a way that it can be made part of an _\bi_\bn_\bp_\bu_\bt_\br_\bc
file.
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)
- When in v\bvi\bi editing mode, this causes a switch to
+ When in v\bvi\bi command mode, this causes a switch to
e\bem\bma\bac\bcs\bs editing mode.
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)
When in e\bem\bma\bac\bcs\bs editing mode, this causes a switch to
v\bvi\bi editing mode.
D\bDE\bEF\bFA\bAU\bUL\bLT\bT K\bKE\bEY\bY B\bBI\bIN\bND\bDI\bIN\bNG\bGS\bS
- The following is a list of the default emacs and vi bind-
- ings. Characters with the 8th bit set are written as
+ The following is a list of the default emacs and vi bind-
+ ings. Characters with the eighth bit set are written as
M-<character>, and are referred to as _\bm_\be_\bt_\ba_\bf_\bi_\be_\bd characters.
- The printable ASCII characters not mentioned in the list
- of emacs standard bindings are bound to the _\bs_\be_\bl_\bf_\b-_\bi_\bn_\bs_\be_\br_\bt
- function, which just inserts the given character into the
- input line. In vi insertion mode, all characters not
- specifically mentioned are bound to _\bs_\be_\bl_\bf_\b-_\bi_\bn_\bs_\be_\br_\bt. Charac-
- ters assigned to signal generation by _\bs_\bt_\bt_\by(1) or the ter-
- minal driver, such as C-Z or C-C, retain that function.
- Upper and lower case _\bm_\be_\bt_\ba_\bf_\bi_\be_\bd characters are bound to the
- same function in the emacs mode meta keymap. The remain-
- ing characters are unbound, which causes readline to ring
- the bell (subject to the setting of the b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be
-
-
-
-GNU 1999 Jun 1 13
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
- variable).
+ The printable ASCII characters not mentioned in the list
+ of emacs standard bindings are bound to the s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt
+ function, which just inserts the given character into the
+ input line. In vi insertion mode, all characters not
+ specifically mentioned are bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt. Charac-
+ ters assigned to signal generation by _\bs_\bt_\bt_\by(1) or the ter-
+ minal driver, such as C-Z or C-C, retain that function.
+ Upper and lower case metafied characters are bound to the
+ same function in the emacs mode meta keymap. The remain-
+ ing characters are unbound, which causes readline to ring
+ the bell (subject to the setting of the b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be vari-
+ able).
E\bEm\bma\bac\bcs\bs M\bMo\bod\bde\be
Emacs Standard bindings
"M-." yank-last-arg
"M-0" digit-argument
"M-1" digit-argument
-
-
-
-GNU 1999 Jun 1 14
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
"M-2" digit-argument
"M-3" digit-argument
"M-4" digit-argument
"M-Y" yank-pop
"M-\" delete-horizontal-space
"M-~" tilde-expand
- "M-C-?" backward-delete-word
+ "M-C-?" backward-kill-word
"M-_" yank-last-arg
Emacs Control-X bindings
"C-U" unix-line-discard
"C-V" quoted-insert
"C-W" unix-word-rubout
-
-
-
-GNU 1999 Jun 1 15
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
"C-Y" yank
"C-[" vi-movement-mode
"C-_" undo
"C-V" quoted-insert
"C-W" unix-word-rubout
"C-Y" yank
+ "C-_" vi-undo
" " forward-char
"#" insert-comment
"$" end-of-line
"P" vi-put
"R" vi-replace
"S" vi-subst
-
-
-
-GNU 1999 Jun 1 16
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
"T" vi-char-search
"U" revert-line
"W" vi-next-word
"r" vi-change-char
"s" vi-subst
"t" vi-char-search
- "u" undo
+ "u" vi-undo
"w" vi-next-word
"x" vi-delete
"y" vi-yank-to
chet@ins.CWRU.Edu
B\bBU\bUG\bG R\bRE\bEP\bPO\bOR\bRT\bTS\bS
- If you find a bug in r\bre\bea\bad\bdl\bli\bin\bne\be,\b, you should report it. But
- first, you should make sure that it really is a bug, and
- that it appears in the latest version of the r\bre\bea\bad\bdl\bli\bin\bne\be
+ If you find a bug in r\bre\bea\bad\bdl\bli\bin\bne\be,\b, you should report it. But
+ first, you should make sure that it really is a bug, and
+ that it appears in the latest version of the r\bre\bea\bad\bdl\bli\bin\bne\be
library that you have.
-
-
-GNU 1999 Jun 1 17
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
- Once you have determined that a bug actually exists, mail
- 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,
- you are welcome to mail that as well! Suggestions and
- `philosophical' bug reports may be mailed to _\bb_\bu_\bg_\b-_\br_\be_\ba_\bd_\b-
+ Once you have determined that a bug actually exists, mail
+ 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,
+ you are welcome to mail that as well! Suggestions and
+ `philosophical' bug reports may be mailed to _\bb_\bu_\bg_\b-_\br_\be_\ba_\bd_\b-
_\bl_\bi_\bn_\be@_\bg_\bn_\bu_\b._\bo_\br_\bg or posted to the Usenet newsgroup
g\bgn\bnu\bu.\b.b\bba\bas\bsh\bh.\b.b\bbu\bug\bg.
- Comments and bug reports concerning this manual page
+ Comments and bug reports concerning this manual page
should be directed to _\bc_\bh_\be_\bt_\b@_\bi_\bn_\bs_\b._\bC_\bW_\bR_\bU_\b._\bE_\bd_\bu.
B\bBU\bUG\bGS\bS
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-GNU 1999 Jun 1 18
-
-
+GNU Readline 4.3 2002 January 22 READLINE(3)