1@comment %**start of header (This is for running Texinfo on a region.) 2@setfilename rluser.info 3@comment %**end of header (This is for running Texinfo on a region.) 4@setchapternewpage odd 5 6@ignore 7This file documents the end user interface to the GNU command line 8editing features. It is to be an appendix to manuals for programs which 9use these features. There is a document entitled "readline.texinfo" 10which contains both end-user and programmer documentation for the 11GNU Readline Library. 12 |
13Copyright (C) 1988-2005 Free Software Foundation, Inc. |
14 15Authored by Brian Fox and Chet Ramey. 16 17Permission is granted to process this file through Tex and print the 18results, provided the printed document carries copying permission notice 19identical to this one except for the removal of this paragraph (this 20paragraph not being relevant to the printed manual). 21 --- 356 unchanged lines hidden (view full) --- 378change from the default Emacs-like key binding to use 379@code{vi} line editing commands: 380 381@example 382set editing-mode vi 383@end example 384 385Variable names and values, where appropriate, are recognized without regard |
386to case. Unrecognized variable names are ignored. |
387 |
388Boolean variables (those that can be set to on or off) are set to on if 389the value is null or empty, @var{on} (case-insensitive), or 1. Any other 390value results in the variable being set to off. 391 |
392@ifset BashFeatures 393The @w{@code{bind -V}} command lists the current Readline variable names 394and values. @xref{Bash Builtins}. 395@end ifset 396 397A great deal of run-time behavior is changeable with the following 398variables. 399 400@cindex variables, readline 401@table @code 402 403@item bell-style 404@vindex bell-style 405Controls what happens when Readline wants to ring the terminal bell. 406If set to @samp{none}, Readline never rings the bell. If set to 407@samp{visible}, Readline uses a visible bell if one is available. 408If set to @samp{audible} (the default), Readline attempts to ring 409the terminal's bell. 410 |
411@item bind-tty-special-chars 412@vindex bind-tty-special-chars 413If set to @samp{on}, Readline attempts to bind the control characters 414treated specially by the kernel's terminal driver to their Readline 415equivalents. 416 |
417@item comment-begin 418@vindex comment-begin 419The string to insert at the beginning of the line when the 420@code{insert-comment} command is executed. The default value 421is @code{"#"}. 422 423@item completion-ignore-case 424If set to @samp{on}, Readline performs filename matching and completion 425in a case-insensitive fashion. 426The default value is @samp{off}. 427 428@item completion-query-items 429@vindex completion-query-items 430The number of possible completions that determines when the user is 431asked whether the list of possibilities should be displayed. 432If the number of possible completions is greater than this value, 433Readline will ask the user whether or not he wishes to view 434them; otherwise, they are simply listed. 435This variable must be set to an integer value greater than or equal to 0. |
436A negative value means Readline should never ask. |
437The default limit is @code{100}. 438 439@item convert-meta 440@vindex convert-meta 441If set to @samp{on}, Readline will convert characters with the 442eighth bit set to an @sc{ascii} key sequence by stripping the eighth 443bit and prefixing an @key{ESC} character, converting them to a 444meta-prefixed key sequence. The default value is @samp{on}. --- 17 unchanged lines hidden (view full) --- 462keypad when it is called. Some systems need this to enable the 463arrow keys. The default is @samp{off}. 464 465@item expand-tilde 466@vindex expand-tilde 467If set to @samp{on}, tilde expansion is performed when Readline 468attempts word completion. The default is @samp{off}. 469 |
470@item history-preserve-point |
471@vindex history-preserve-point 472If set to @samp{on}, the history code attempts to place point at the 473same location on each history line retrieved with @code{previous-history} |
474or @code{next-history}. The default is @samp{off}. |
475 476@item horizontal-scroll-mode 477@vindex horizontal-scroll-mode 478This variable can be set to either @samp{on} or @samp{off}. Setting it 479to @samp{on} means that the text of the lines being edited will scroll 480horizontally on a single screen line when they are longer than the width 481of the screen, instead of wrapping onto a new screen line. By default, 482this variable is set to @samp{off}. --- 536 unchanged lines hidden (view full) --- 1019 1020@item yank-nth-arg (M-C-y) 1021Insert the first argument to the previous command (usually 1022the second word on the previous line) at point. 1023With an argument @var{n}, 1024insert the @var{n}th word from the previous command (the words 1025in the previous command begin with word 0). A negative argument 1026inserts the @var{n}th word from the end of the previous command. |
1027Once the argument @var{n} is computed, the argument is extracted 1028as if the @samp{!@var{n}} history expansion had been specified. |
1029 1030@item yank-last-arg (M-. or M-_) 1031Insert last argument to the previous command (the last word of the 1032previous history entry). With an 1033argument, behave exactly like @code{yank-nth-arg}. 1034Successive calls to @code{yank-last-arg} move back through the history 1035list, inserting the last argument of each line in turn. |
1036The history expansion facilities are used to extract the last argument, 1037as if the @samp{!$} history expansion had been specified. |
1038 1039@end ftable 1040 1041@node Commands For Text 1042@subsection Commands For Changing Text 1043 1044@ftable @code 1045@item delete-char (C-d) --- 495 unchanged lines hidden (view full) --- 1541 1542Next, the string specified as the argument to the @option{-W} option 1543is considered. 1544The string is first split using the characters in the @env{IFS} 1545special variable as delimiters. 1546Shell quoting is honored. 1547Each word is then expanded using 1548brace expansion, tilde expansion, parameter and variable expansion, |
1549command substitution, and arithmetic expansion, |
1550as described above (@pxref{Shell Expansions}). 1551The results are split using the rules described above 1552(@pxref{Word Splitting}). 1553The results of the expansion are prefix-matched against the word being 1554completed, and the matching words become the possible completions. 1555 1556After these matches have been generated, any shell function or command 1557specified with the @option{-F} and @option{-C} options is invoked. --- 146 unchanged lines hidden (view full) --- 1704Tell Readline that the compspec generates filenames, so it can perform any 1705filename-specific processing (like adding a slash to directory names or 1706suppressing trailing spaces). This option is intended to be used with 1707shell functions specified with @option{-F}. 1708 1709@item nospace 1710Tell Readline not to append a space (the default) to words completed at 1711the end of the line. |
1712 1713@item plusdirs 1714After any matches defined by the compspec are generated, 1715directory name completion is attempted and any 1716matches are added to the results of the other actions. 1717 |
1718@end table 1719 1720@item -A @var{action} 1721The @var{action} may be one of the following to generate a list of possible 1722completions: 1723 1724@table @code 1725@item alias --- 121 unchanged lines hidden --- |