summaryrefslogtreecommitdiff
path: root/doc/readline.0
diff options
context:
space:
mode:
Diffstat (limited to 'doc/readline.0')
-rw-r--r--doc/readline.0439
1 files changed, 124 insertions, 315 deletions
diff --git a/doc/readline.0 b/doc/readline.0
index af2efae..87beeac 100644
--- a/doc/readline.0
+++ b/doc/readline.0
@@ -1,9 +1,7 @@
-
-
-
READLINE(3) READLINE(3)
+
NNAAMMEE
readline - get a line from a user with editing
@@ -16,7 +14,7 @@ SSYYNNOOPPSSIISS
rreeaaddlliinnee (_c_o_n_s_t _c_h_a_r _*_p_r_o_m_p_t);
CCOOPPYYRRIIGGHHTT
- Readline is Copyright (C) 1989-2001 by the Free Software
+ Readline is Copyright (C) 1989-2002 by the Free Software
Foundation, Inc.
DDEESSCCRRIIPPTTIIOONN
@@ -58,18 +56,6 @@ NNOOTTAATTIIOONN
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
-
-
-
-GNU Readline 4.2a 2001 October 9 1
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
direction (e.g., kkiillll--lliinnee) causes that command to act in
a backward direction. Commands whose behavior with argu-
ments deviates from this are noted.
@@ -125,17 +111,6 @@ IINNIITTIIAALLIIZZAATTIIOONN FFIILLEE
_n_a_m_e is the name of a key spelled out in English. For
example:
-
-
-GNU Readline 4.2a 2001 October 9 2
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
Control-u: universal-argument
Meta-Rubout: backward-kill-word
Control-o: "> output"
@@ -189,21 +164,9 @@ READLINE(3) READLINE(3)
When entering the text of a macro, single or double quotes
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.
-
-
-
-GNU Readline 4.2a 2001 October 9 3
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
- Backslash will quote any other character in the macro
- text, including " and '.
+ the backslash escapes described above are expanded. Back-
+ slash will quote any other character in the macro text,
+ including " and '.
BBaasshh allows the current readline key bindings to be dis-
played or modified with the bbiinndd builtin command. The
@@ -255,19 +218,6 @@ READLINE(3) READLINE(3)
stripping the eighth bit and prefixing it with an
escape character (in effect, using escape as the
_m_e_t_a _p_r_e_f_i_x).
-
-
-
-
-GNU Readline 4.2a 2001 October 9 4
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
ddiissaabbllee--ccoommpplleettiioonn ((OOffff))
If set to OOnn, readline will inhibit word comple-
tion. Completion characters will be inserted into
@@ -318,28 +268,24 @@ READLINE(3) READLINE(3)
mmaarrkk--mmooddiiffiieedd--lliinneess ((OOffff))
If set to OOnn, history lines that have been modified
are displayed with a preceding asterisk (**).
+ mmaarrkk--ssyymmlliinnkkeedd--ddiirreeccttoorriieess ((OOffff))
+ If set to OOnn, completed names which are symbolic
+ links to directories have a slash appended (subject
+ to the value of mmaarrkk--ddiirreeccttoorriieess).
mmaattcchh--hhiiddddeenn--ffiilleess ((OOnn))
This variable, when set to OOnn, causes readline to
match files whose names begin with a `.' (hidden
files) when performing filename completion, unless
-
-
-
-GNU Readline 4.2a 2001 October 9 5
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
the leading `.' is supplied by the user in the
filename to be completed.
oouuttppuutt--mmeettaa ((OOffff))
If set to OOnn, readline will display characters with
the eighth bit set directly rather than as a meta-
prefixed escape sequence.
+ ppaaggee--ccoommpplleettiioonnss ((OOnn))
+ If set to OOnn, readline uses an internal _m_o_r_e-like
+ pager to display a screenful of possible comple-
+ tions at a time.
pprriinntt--ccoommpplleettiioonnss--hhoorriizzoonnttaallllyy ((OOffff))
If set to OOnn, readline will display completions
with matches sorted horizontally in alphabetical
@@ -387,26 +333,14 @@ READLINE(3) READLINE(3)
aapppplliiccaattiioonn
The aapppplliiccaattiioonn construct is used to include
application-specific settings. Each program
- using the readline library sets the
-
-
-
-GNU Readline 4.2a 2001 October 9 6
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
- _a_p_p_l_i_c_a_t_i_o_n _n_a_m_e, and an initialization file
- can test for a particular value. This could
- be used to bind key sequences to functions
- useful for a specific program. For
- instance, the following command adds a key
- sequence that quotes the current or previous
- word in Bash:
+ using the readline library sets the _a_p_p_l_i_c_a_-
+ _t_i_o_n _n_a_m_e, and an initialization file can
+ test for a particular value. This could be
+ used to bind key sequences to functions use-
+ ful for a specific program. For instance,
+ the following command adds a key sequence
+ that quotes the current or previous word in
+ Bash:
$$iiff Bash
# Quote the current or previous word
@@ -453,23 +387,11 @@ SSEEAARRCCHHIINNGG
CC--ss or CC--rr 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
-
-
-
-GNU Readline 4.2a 2001 October 9 7
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
- execute that command. For instance, a newline will termi-
- nate the search and accept the line, thereby executing the
- command from the history list. A movement command will
- terminate the search, make the last line found the current
+ 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. 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
@@ -519,19 +441,6 @@ EEDDIITTIINNGG CCOOMMMMAANNDDSS
history list for future recall with aadddd__hhiissttoorryy(()).
If the line is a modified history line, the history
line is restored to its original state.
-
-
-
-
-GNU Readline 4.2a 2001 October 9 8
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
pprreevviioouuss--hhiissttoorryy ((CC--pp))
Fetch the previous command from the history list,
moving back in the list.
@@ -585,19 +494,6 @@ READLINE(3) READLINE(3)
each line in turn.
CCoommmmaannddss ffoorr CChhaannggiinngg TTeexxtt
-
-
-
-
-GNU Readline 4.2a 2001 October 9 9
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
ddeelleettee--cchhaarr ((CC--dd))
Delete the character at point. If point is at the
beginning of the line, there are no characters in
@@ -642,6 +538,18 @@ READLINE(3) READLINE(3)
Capitalize the current (or following) word. With a
negative argument, capitalize the previous word,
but do not move point.
+ oovveerrwwrriittee--mmooddee
+ 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 eemmaaccss
+ mode; vvii mode does overwrite differently. Each
+ call to _r_e_a_d_l_i_n_e_(_) starts in insert mode. In over-
+ write mode, characters bound to sseellff--iinnsseerrtt replace
+ the text at point rather than pushing the text to
+ the right. Characters bound to bbaacckk--
+ wwaarrdd--ddeelleettee--cchhaarr replace the character before point
+ with a space. By default, this command is unbound.
KKiilllliinngg aanndd YYaannkkiinngg
kkiillll--lliinnee ((CC--kk))
@@ -649,41 +557,28 @@ READLINE(3) READLINE(3)
bbaacckkwwaarrdd--kkiillll--lliinnee ((CC--xx RRuubboouutt))
Kill backward to the beginning of the line.
uunniixx--lliinnee--ddiissccaarrdd ((CC--uu))
- 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.
-
-
-
-
-GNU Readline 4.2a 2001 October 9 10
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
kkiillll--wwhhoollee--lliinnee
- Kill all characters on the current line, no matter
+ Kill all characters on the current line, no matter
where point is.
kkiillll--wwoorrdd ((MM--dd))
- 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 ffoorr--
+ 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 ffoorr--
wwaarrdd--wwoorrdd.
bbaacckkwwaarrdd--kkiillll--wwoorrdd ((MM--RRuubboouutt))
- Kill the word behind point. Word boundaries are
+ Kill the word behind point. Word boundaries are
the same as those used by bbaacckkwwaarrdd--wwoorrdd.
uunniixx--wwoorrdd--rruubboouutt ((CC--ww))
- Kill the word behind point, using white space as a
- word boundary. The killed text is saved on the
+ Kill the word behind point, using white space as a
+ word boundary. The killed text is saved on the
kill-ring.
ddeelleettee--hhoorriizzoonnttaall--ssppaaccee ((MM--\\))
Delete all spaces and tabs around point.
kkiillll--rreeggiioonn
- Kill the text between the point and _m_a_r_k (saved
- cursor position). This text is referred to as the
+ Kill the text between the point and _m_a_r_k (saved
+ cursor position). This text is referred to as the
_r_e_g_i_o_n.
ccooppyy--rreeggiioonn--aass--kkiillll
Copy the text in the region to the kill buffer.
@@ -691,177 +586,150 @@ READLINE(3) READLINE(3)
Copy the word before point to the kill buffer. The
word boundaries are the same as bbaacckkwwaarrdd--wwoorrdd.
ccooppyy--ffoorrwwaarrdd--wwoorrdd
- 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 ffoorrwwaarrdd--wwoorrdd.
yyaannkk ((CC--yy))
- Yank the top of the kill ring into the buffer at
+ Yank the top of the kill ring into the buffer at
point.
yyaannkk--ppoopp ((MM--yy))
- Rotate the kill ring, and yank the new top. Only
+ Rotate the kill ring, and yank the new top. Only
works following yyaannkk or yyaannkk--ppoopp.
NNuummeerriicc AArrgguummeennttss
ddiiggiitt--aarrgguummeenntt ((MM--00,, MM--11,, ......,, MM----))
- 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.
uunniivveerrssaall--aarrgguummeenntt
- 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 uunniivveerrssaall--aarrgguummeenntt 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
-
-
-
-GNU Readline 4.2a 2001 October 9 11
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
+ 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.
CCoommpplleettiinngg
ccoommpplleettee ((TTAABB))
- 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. BBaasshh, for instance, attempts com-
- pletion treating the text as a variable (if the
- text begins with $$), username (if the text begins
- with ~~), hostname (if the text begins with @@), or
- command (including aliases and functions) in turn.
+ tion-specific. BBaasshh, for instance, attempts com-
+ pletion treating the text as a variable (if the
+ text begins with $$), username (if the text begins
+ with ~~), hostname (if the text begins with @@), or
+ command (including aliases and functions) in turn.
If none of these produces a match, filename comple-
- tion is attempted. GGddbb, on the other hand, allows
- completion of program functions and variables, and
- only attempts filename completion under certain
+ tion is attempted. GGddbb, on the other hand, allows
+ completion of program functions and variables, and
+ only attempts filename completion under certain
circumstances.
ppoossssiibbllee--ccoommpplleettiioonnss ((MM--??))
- List the possible completions of the text before
+ List the possible completions of the text before
point.
iinnsseerrtt--ccoommpplleettiioonnss ((MM--**))
- Insert all completions of the text before point
- that would have been generated by ppoossssiibbllee--ccoommppllee--
+ Insert all completions of the text before point
+ that would have been generated by ppoossssiibbllee--ccoommppllee--
ttiioonnss.
mmeennuu--ccoommpplleettee
- Similar to ccoommpplleettee, but replaces the word to be
+ Similar to ccoommpplleettee, but replaces the word to be
completed with a single match from the list of pos-
sible completions. Repeated execution of mmeennuu--ccoomm--
- pplleettee steps through the list of possible comple-
+ pplleettee 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 (subject
- to the setting of Bbell-style)) aanndd tthhee oorriiggiinnaall
- tteexxtt iiss rreessttoorreedd.. AAnn aarrgguummeenntt ooff _n mmoovveess _n ppoossii--
- ttiioonnss ffoorrwwaarrdd iinn tthhee lliisstt ooff mmaattcchheess;; aa nneeggaattiivvee
- aarrgguummeenntt mmaayy bbee uusseedd ttoo mmoovvee bbaacckkwwaarrdd tthhrroouugghh tthhee
- lliisstt.. TThhiiss ccoommmmaanndd iiss iinntteennddeedd ttoo bbee bboouunndd ttoo TTAABB,,
- bbuutt iiss uunnbboouunndd bbyy ddeeffaauulltt..
+ the list of completions, the bell is rung (subject
+ to the setting of 00aanndd tthhee oorriiggiinnaall tteexxtt iiss
+ rreessttoorreedd.. AAnn aarrgguummeenntt ooff _n mmoovveess _n ppoossiittiioonnss ffoorr--
+ wwaarrdd iinn tthhee lliisstt ooff mmaattcchheess;; aa nneeggaattiivvee aarrgguummeenntt
+ mmaayy bbee uusseedd ttoo mmoovvee bbaacckkwwaarrdd tthhrroouugghh tthhee lliisstt..
+ TThhiiss ccoommmmaanndd iiss iinntteennddeedd ttoo bbee bboouunndd ttoo TTAABB,, bbuutt iiss
+ uunnbboouunndd bbyy ddeeffaauulltt..
ddeelleettee--cchhaarr--oorr--lliisstt
- Deletes the character under the cursor if not at
- the beginning or end of the line (like ddeelleettee--
- cchhaarr). If at the end of the line, behaves identi-
+ Deletes the character under the cursor if not at
+ the beginning or end of the line (like ddeelleettee--
+ cchhaarr). If at the end of the line, behaves identi-
cally to ppoossssiibbllee--ccoommpplleettiioonnss.
KKeeyybbooaarrdd MMaaccrrooss
ssttaarrtt--kkbbdd--mmaaccrroo ((CC--xx (())
- Begin saving the characters typed into the current
+ Begin saving the characters typed into the current
keyboard macro.
eenndd--kkbbdd--mmaaccrroo ((CC--xx ))))
- Stop saving the characters typed into the current
+ Stop saving the characters typed into the current
keyboard macro and store the definition.
ccaallll--llaasstt--kkbbdd--mmaaccrroo ((CC--xx ee))
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.
-
-
-
-GNU Readline 4.2a 2001 October 9 12
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
MMiisscceellllaanneeoouuss
rree--rreeaadd--iinniitt--ffiillee ((CC--xx CC--rr))
- Read in the contents of the _i_n_p_u_t_r_c file, and
- incorporate any bindings or variable assignments
+ Read in the contents of the _i_n_p_u_t_r_c file, and
+ incorporate any bindings or variable assignments
found there.
aabboorrtt ((CC--gg))
Abort the current editing command and ring the ter-
minal's bell (subject to the setting of
bbeellll--ssttyyllee).
ddoo--uuppppeerrccaassee--vveerrssiioonn ((MM--aa,, MM--bb,, MM--_x,, ......))
- If the metafied character _x is lowercase, run the
- command that is bound to the corresponding upper-
+ If the metafied character _x is lowercase, run the
+ command that is bound to the corresponding upper-
case character.
pprreeffiixx--mmeettaa ((EESSCC))
- Metafy the next character typed. EESSCC ff is equiva-
+ Metafy the next character typed. EESSCC ff is equiva-
lent to MMeettaa--ff.
uunnddoo ((CC--__,, CC--xx CC--uu))
- Incremental undo, separately remembered for each
+ Incremental undo, separately remembered for each
line.
rreevveerrtt--lliinnee ((MM--rr))
- Undo all changes made to this line. This is like
- executing the uunnddoo command enough times to return
+ Undo all changes made to this line. This is like
+ executing the uunnddoo command enough times to return
the line to its initial state.
ttiillddee--eexxppaanndd ((MM--&&))
Perform tilde expansion on the current word.
sseett--mmaarrkk ((CC--@@,, MM--<<ssppaaccee>>))
- Set the mark to the point. If a numeric argument
+ Set the mark to the point. If a numeric argument
is supplied, the mark is set to that position.
eexxcchhaannggee--ppooiinntt--aanndd--mmaarrkk ((CC--xx CC--xx))
- Swap the point with the mark. The current cursor
- position is set to the saved position, and the old
+ Swap the point with the mark. The current cursor
+ position is set to the saved position, and the old
cursor position is saved as the mark.
cchhaarraacctteerr--sseeaarrcchh ((CC--]]))
- A character is read and point is moved to the next
- occurrence of that character. A negative count
+ A character is read and point is moved to the next
+ occurrence of that character. A negative count
searches for previous occurrences.
cchhaarraacctteerr--sseeaarrcchh--bbaacckkwwaarrdd ((MM--CC--]]))
- A character is read and point is moved to the pre-
- vious occurrence of that character. A negative
+ A character is read and point is moved to the pre-
+ vious occurrence of that character. A negative
count searches for subsequent occurrences.
iinnsseerrtt--ccoommmmeenntt ((MM--##))
- The value of the readline ccoommmmeenntt--bbeeggiinn variable is
- inserted at the beginning of the current line, and
- the line is accepted as if a newline had been
- typed. The default value of ccoommmmeenntt--bbeeggiinn makes
- the current line a shell comment.
+ Without a numeric argument, the value of the read-
+ line ccoommmmeenntt--bbeeggiinn 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 ccoommmmeenntt--bbeeggiinn, the value is
+ inserted, otherwise the characters in ccoommmmeenntt--bbeeggiinn
+ 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 ccoommmmeenntt--bbeeggiinn
+ 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.
dduummpp--ffuunnccttiioonnss
- 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 _i_n_p_u_t_r_c file.
+ Print all of the functions and their key bindings
+ 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 _i_n_p_u_t_r_c
+ file.
dduummpp--vvaarriiaabblleess
Print all of the settable variables and their val-
ues to the readline output stream. If a numeric
-
-
-
-GNU Readline 4.2a 2001 October 9 13
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
argument is supplied, the output is formatted in
such a way that it can be made part of an _i_n_p_u_t_r_c
file.
@@ -872,7 +740,7 @@ READLINE(3) READLINE(3)
such a way that it can be made part of an _i_n_p_u_t_r_c
file.
eemmaaccss--eeddiittiinngg--mmooddee ((CC--ee))
- When in vvii editing mode, this causes a switch to
+ When in vvii command mode, this causes a switch to
eemmaaccss editing mode.
vvii--eeddiittiinngg--mmooddee ((MM--CC--jj))
When in eemmaaccss editing mode, this causes a switch to
@@ -916,18 +784,6 @@ DDEEFFAAUULLTT KKEEYY BBIINNDDIINNGGSS
"C-Q" quoted-insert
"C-R" reverse-search-history
"C-S" forward-search-history
-
-
-
-GNU Readline 4.2a 2001 October 9 14
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
"C-T" transpose-chars
"C-U" unix-line-discard
"C-V" quoted-insert
@@ -982,18 +838,6 @@ READLINE(3) READLINE(3)
"M-T" transpose-words
"M-U" upcase-word
"M-Y" yank-pop
-
-
-
-GNU Readline 4.2a 2001 October 9 15
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
"M-\" delete-horizontal-space
"M-~" tilde-expand
"M-C-?" backward-kill-word
@@ -1048,18 +892,6 @@ READLINE(3) READLINE(3)
"C-S" forward-search-history
"C-T" transpose-chars
"C-U" unix-line-discard
-
-
-
-GNU Readline 4.2a 2001 October 9 16
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
"C-V" quoted-insert
"C-W" unix-word-rubout
"C-Y" yank
@@ -1114,18 +946,6 @@ READLINE(3) READLINE(3)
"l" forward-char
"m" vi-set-mark
"n" vi-search-again
-
-
-
-GNU Readline 4.2a 2001 October 9 17
-
-
-
-
-
-READLINE(3) READLINE(3)
-
-
"p" vi-put
"r" vi-change-char
"s" vi-subst
@@ -1174,15 +994,4 @@ BBUUGGSS
-
-
-
-
-
-
-
-
-
-GNU Readline 4.2a 2001 October 9 18
-
-
+GNU Readline 4.3 2002 January 22 READLINE(3)