Commit | Line | Data |
---|---|---|
775e241e TT |
1 | This is a terse description of the new features added to readline-7.0 since |
2 | the release of readline-6.3. | |
b585a9fa | 3 | |
775e241e | 4 | New Features in Readline |
b585a9fa | 5 | |
775e241e TT |
6 | a. The history truncation code now uses the same error recovery mechansim as |
7 | the history writing code, and restores the old version of the history file | |
8 | on error. The error recovery mechanism handles symlinked history files. | |
b585a9fa | 9 | |
775e241e TT |
10 | b. There is a new bindable variable, `enable-bracketed-paste', which enables |
11 | support for a terminal's bracketed paste mode. | |
b585a9fa | 12 | |
775e241e TT |
13 | c. The editing mode indicators can now be strings and are user-settable |
14 | (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string' | |
15 | variables). Mode strings can contain invisible character sequences. | |
16 | Setting mode strings to null strings restores the defaults. | |
b585a9fa | 17 | |
775e241e TT |
18 | d. Prompt expansion adds the mode string to the last line of a multi-line |
19 | prompt (one with embedded newlines). | |
20 | ||
21 | e. There is a new bindable variable, `colored-completion-prefix', which, if | |
22 | set, causes the common prefix of a set of possible completions to be | |
23 | displayed in color. | |
24 | ||
25 | f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs- | |
26 | mode yank-pop. | |
27 | ||
28 | g. The redisplay code underwent several efficiency improvements for multibyte | |
29 | locales. | |
30 | ||
31 | h. The insert-char function attempts to batch-insert all pending typeahead | |
32 | that maps to self-insert, as long as it is coming from the terminal. | |
33 | ||
34 | i. rl_callback_sigcleanup: a new application function that can clean up and | |
35 | unset any state set by readline's callback mode. Intended to be used | |
36 | after a signal. | |
37 | ||
38 | j. If an incremental search string has its last character removed with DEL, the | |
39 | resulting empty search string no longer matches the previous line. | |
40 | ||
41 | k. If readline reads a history file that begins with `#' (or the value of | |
42 | the history comment character) and has enabled history timestamps, the history | |
43 | entries are assumed to be delimited by timestamps. This allows multi-line | |
44 | history entries. | |
45 | ||
46 | l. Readline now throws an error if it parses a key binding without a terminating | |
47 | `:' or whitespace. | |
48 | ||
49 | ------------------------------------------------------------------------------- | |
50 | This is a terse description of the new features added to readline-6.3 since | |
51 | the release of readline-6.2. | |
52 | ||
53 | New Features in Readline | |
54 | ||
55 | a. Readline is now more responsive to SIGHUP and other fatal signals when | |
56 | reading input from the terminal or performing word completion but no | |
57 | longer attempts to run any not-allowable functions from a signal handler | |
58 | context. | |
59 | ||
60 | b. There are new bindable commands to search the history for the string of | |
61 | characters between the beginning of the line and the point | |
62 | (history-substring-search-forward, history-substring-search-backward) | |
63 | ||
64 | c. Readline allows quoted strings as the values of variables when setting | |
65 | them with `set'. As a side effect, trailing spaces and tabs are ignored | |
66 | when setting a string variable's value. | |
67 | ||
68 | d. The history library creates a backup of the history file when writing it | |
69 | and restores the backup on a write error. | |
70 | ||
71 | e. New application-settable variable: rl_filename_stat_hook: a function called | |
72 | with a filename before using it in a call to stat(2). Bash uses it to | |
73 | expand shell variables so things like $HOME/Downloads have a slash | |
74 | appended. | |
75 | ||
76 | f. New bindable function `print-last-kbd-macro', prints the most-recently- | |
77 | defined keyboard macro in a reusable format. | |
78 | ||
79 | g. New user-settable variable `colored-stats', enables use of colored text | |
80 | to denote file types when displaying possible completions (colored analog | |
81 | of visible-stats). | |
82 | ||
83 | h. New user-settable variable `keyseq-timout', acts as an inter-character | |
84 | timeout when reading input or incremental search strings. | |
85 | ||
86 | i. New application-callable function: rl_clear_history. Clears the history list | |
87 | and frees all readline-associated private data. | |
88 | ||
89 | j. New user-settable variable, show-mode-in-prompt, adds a characters to the | |
90 | beginning of the prompt indicating the current editing mode. | |
91 | ||
92 | k. New application-settable variable: rl_input_available_hook; function to be | |
93 | called when readline detects there is data available on its input file | |
94 | descriptor. | |
95 | ||
96 | l. Readline calls an application-set event hook (rl_event_hook) after it gets | |
97 | a signal while reading input (read returns -1/EINTR but readline does not | |
98 | handle the signal immediately) to allow the application to handle or | |
99 | otherwise note it. | |
100 | ||
101 | m. If the user-settable variable `history-size' is set to a value less than | |
102 | 0, the history list size is unlimited. | |
103 | ||
104 | n. New application-settable variable: rl_signal_event_hook; function that is | |
105 | called when readline is reading terminal input and read(2) is interrupted | |
106 | by a signal. Currently not called for SIGHUP or SIGTERM. | |
107 | ||
108 | ------------------------------------------------------------------------------- | |
109 | This is a terse description of the new features added to readline-6.1 since | |
110 | the release of readline-6.0. | |
111 | ||
112 | New Features in Readline | |
113 | ||
114 | a. New bindable function: menu-complete-backward. | |
115 | ||
116 | b. In the vi insertion keymap, C-n is now bound to menu-complete by default, | |
117 | and C-p to menu-complete-backward. | |
118 | ||
119 | c. When in vi command mode, repeatedly hitting ESC now does nothing, even | |
120 | when ESC introduces a bound key sequence. This is closer to how | |
121 | historical vi behaves. | |
122 | ||
123 | d. New bindable function: skip-csi-sequence. Can be used as a default to | |
124 | consume key sequences generated by keys like Home and End without having | |
125 | to bind all keys. | |
126 | ||
127 | e. New application-settable function: rl_filename_rewrite_hook. Can be used | |
128 | to rewite or modify filenames read from the file system before they are | |
129 | compared to the word to be completed. | |
130 | ||
131 | f. New bindable variable: skip-completed-text, active when completing in the | |
132 | middle of a word. If enabled, it means that characters in the completion | |
133 | that match characters in the remainder of the word are "skipped" rather | |
134 | than inserted into the line. | |
135 | ||
136 | g. The pre-readline-6.0 version of menu completion is available as | |
137 | "old-menu-complete" for users who do not like the readline-6.0 version. | |
138 | ||
139 | h. New bindable variable: echo-control-characters. If enabled, and the | |
140 | tty ECHOCTL bit is set, controls the echoing of characters corresponding | |
141 | to keyboard-generated signals. | |
142 | ||
143 | i. New bindable variable: enable-meta-key. Controls whether or not readline | |
144 | sends the smm/rmm sequences if the terminal indicates it has a meta key | |
145 | that enables eight-bit characters. | |
146 | ||
147 | ------------------------------------------------------------------------------- | |
148 | This is a terse description of the new features added to readline-6.0 since | |
149 | the release of readline-5.2. | |
150 | ||
151 | New Features in Readline | |
152 | ||
153 | a. A new variable, rl_sort_completion_matches; allows applications to inhibit | |
154 | match list sorting (but beware: some things don't work right if | |
155 | applications do this). | |
156 | ||
157 | b. A new variable, rl_completion_invoking_key; allows applications to discover | |
158 | the key that invoked rl_complete or rl_menu_complete. | |
159 | ||
160 | c. The functions rl_block_sigint and rl_release_sigint are now public and | |
161 | available to calling applications who want to protect critical sections | |
162 | (like redisplay). | |
163 | ||
164 | d. The functions rl_save_state and rl_restore_state are now public and | |
165 | available to calling applications; documented rest of readline's state | |
166 | flag values. | |
167 | ||
168 | e. A new user-settable variable, `history-size', allows setting the maximum | |
169 | number of entries in the history list. | |
170 | ||
171 | f. There is a new implementation of menu completion, with several improvements | |
172 | over the old; the most notable improvement is a better `completions | |
173 | browsing' mode. | |
174 | ||
175 | g. The menu completion code now uses the rl_menu_completion_entry_function | |
176 | variable, allowing applications to provide their own menu completion | |
177 | generators. | |
178 | ||
179 | h. There is support for replacing a prefix of a pathname with a `...' when | |
180 | displaying possible completions. This is controllable by setting the | |
181 | `completion-prefix-display-length' variable. Matches with a common prefix | |
182 | longer than this value have the common prefix replaced with `...'. | |
183 | ||
184 | i. There is a new `revert-all-at-newline' variable. If enabled, readline will | |
185 | undo all outstanding changes to all history lines when `accept-line' is | |
186 | executed. | |
187 | ||
188 | ------------------------------------------------------------------------------- | |
189 | This is a terse description of the new features added to readline-5.2 since | |
190 | the release of readline-5.1. | |
191 | ||
192 | New Features in Readline | |
193 | ||
194 | a. Calling applications can now set the keyboard timeout to 0, allowing | |
195 | poll-like behavior. | |
196 | ||
197 | b. The value of SYS_INPUTRC (configurable at compilation time) is now used as | |
198 | the default last-ditch startup file. | |
199 | ||
200 | c. The history file reading functions now allow windows-like \r\n line | |
201 | terminators. | |
202 | ||
203 | ------------------------------------------------------------------------------- | |
204 | This is a terse description of the new features added to readline-5.1 since | |
205 | the release of readline-5.0. | |
206 | ||
207 | New Features in Readline | |
208 | ||
209 | a. The key sequence sent by the keypad `delete' key is now automatically | |
210 | bound to delete-char. | |
211 | ||
212 | b. A negative argument to menu-complete now cycles backward through the | |
213 | completion list. | |
214 | ||
215 | c. A new bindable readline variable: bind-tty-special-chars. If non-zero, | |
216 | readline will bind the terminal special characters to their readline | |
217 | equivalents when it's called (on by default). | |
218 | ||
219 | d. New bindable command: vi-rubout. Saves deleted text for possible | |
220 | reinsertion, as with any vi-mode `text modification' command; `X' is bound | |
221 | to this in vi command mode. | |
222 | ||
223 | e. If the rl_completion_query_items is set to a value < 0, readline never | |
224 | asks the user whether or not to view the possible completions. | |
225 | ||
226 | f. New application-callable auxiliary function, rl_variable_value, returns | |
227 | a string corresponding to a readline variable's value. | |
228 | ||
229 | g. When parsing inputrc files and variable binding commands, the parser | |
230 | strips trailing whitespace from values assigned to boolean variables | |
231 | before checking them. | |
232 | ||
233 | h. A new external application-controllable variable that allows the LINES | |
234 | and COLUMNS environment variables to set the window size regardless of | |
235 | what the kernel returns. | |
236 | ||
237 | ||
238 | ------------------------------------------------------------------------------- | |
239 | This is a terse description of the new features added to readline-5.0 since | |
240 | the release of readline-4.3. | |
241 | ||
242 | New Features in Readline | |
243 | ||
244 | a. History expansion has a new `a' modifier equivalent to the `g' modifier | |
245 | for compatibility with the BSD csh. | |
246 | ||
247 | b. History expansion has a new `G' modifier equivalent to the BSD csh `g' | |
248 | modifier, which performs a substitution once per word. | |
249 | ||
250 | c. All non-incremental search operations may now undo the operation of | |
251 | replacing the current line with the history line. | |
252 | ||
253 | d. The text inserted by an `a' command in vi mode can be reinserted with | |
254 | `.'. | |
255 | ||
256 | e. New bindable variable, `show-all-if-unmodified'. If set, the readline | |
257 | completer will list possible completions immediately if there is more | |
258 | than one completion and partial completion cannot be performed. | |
259 | ||
260 | f. There is a new application-callable `free_history_entry()' function. | |
261 | ||
262 | g. History list entries now contain timestamp information; the history file | |
263 | functions know how to read and write timestamp information associated | |
264 | with each entry. | |
265 | ||
266 | h. Four new key binding functions have been added: | |
267 | ||
268 | rl_bind_key_if_unbound() | |
269 | rl_bind_key_if_unbound_in_map() | |
270 | rl_bind_keyseq_if_unbound() | |
271 | rl_bind_keyseq_if_unbound_in_map() | |
272 | ||
273 | i. New application variable, rl_completion_quote_character, set to any | |
274 | quote character readline finds before it calls the application completion | |
275 | function. | |
276 | ||
277 | j. New application variable, rl_completion_suppress_quote, settable by an | |
278 | application completion function. If set to non-zero, readline does not | |
279 | attempt to append a closing quote to a completed word. | |
280 | ||
281 | k. New application variable, rl_completion_found_quote, set to a non-zero | |
282 | value if readline determines that the word to be completed is quoted. | |
283 | Set before readline calls any application completion function. | |
284 | ||
285 | l. New function hook, rl_completion_word_break_hook, called when readline | |
286 | needs to break a line into words when completion is attempted. Allows | |
287 | the word break characters to vary based on position in the line. | |
288 | ||
289 | m. New bindable command: unix-filename-rubout. Does the same thing as | |
290 | unix-word-rubout, but adds `/' to the set of word delimiters. | |
291 | ||
292 | n. When listing completions, directories have a `/' appended if the | |
293 | `mark-directories' option has been enabled. |