Debian Codegraph @

NEWS

raw
1 This is a terse description of the new features added to readline-8.3 since
2 the release of readline-8.2.
3
4 New Features in Readline
5
6 a. Output a newline if there is no prompt and readline reads an empty line.
7
8 b. The history library falls back to stdio when writing the history list if
9 mmap fails.
10
11 c. New bindable variable `search-ignore-case', causes readline to perform
12 case-insensitive incremental and non-incremental history searches.
13
14 d. rl_full_quoting_desired: new application-settable variable, causes all
15 completions to be quoted as if they were filenames.
16
17 e. rl_macro_display_hook: new application-settable function pointer, used if
18 the application wants to print macro values itself instead of letting
19 readline do it
20
21 f. rl_reparse_colors: new application-callable function, reparses $LS_COLORS
22 (presumably after the user changes it)
23
24 g. rl_completion_rewrite_hook: new application-settable function pointer,
25 called to modify the word being completed before comparing it against
26 pathnames from the file system.
27
28 h. execute-named-command: a new bindable command that reads the name of a
29 readline command from the standard input and executes it. Bound to M-x
30 in emacs mode by default.
31
32 i. Incremental and non-incremental searches now allow ^V/^Q (or, in the former
33 case, anything bound to quoted-insert) to quote characters in the search
34 string.
35
36 j. Documentation has been significantly updated.
37
38 k. New `force-meta-prefix' bindable variable, which forces the use of ESC as
39 the meta prefix when using "\M-" in key bindings instead of overloading
40 convert-meta.
41
42 l. The default value for `readline-colored-completion-prefix' no longer has a
43 leading `.'; the original report was based on a misunderstanding.
44
45 m. There is a new bindable command, `export-completions', which writes the
46 possible completions for a word to the standard output in a defined format.
47
48 n. Readline can reset its idea of the screen dimensions when executing after
49 a SIGCONT.
50
51 -------------------------------------------------------------------------------
52 This is a terse description of the new features added to readline-8.2 since
53 the release of readline-8.1.
54
55 New Features in Readline
56
57 a. There is now an HS_HISTORY_VERSION containing the version number of the
58 history library for applications to use.
59
60 b. History expansion better understands multiple history expansions that may
61 contain strings that would ordinarily inhibit history expansion (e.g.,
62 `abc!$!$').
63
64 c. There is a new framework for readline timeouts, including new public
65 functions to set timeouts and query how much time is remaining before a
66 timeout hits, and a hook function that can trigger when readline times
67 out. There is a new state value to indicate a timeout.
68
69 d. Automatically bind termcap key sequences for page-up and page-down to
70 history-search-backward and history-search-forward, respectively.
71
72 e. There is a new `fetch-history' bindable command that retrieves the history
73 entry corresponding to its numeric argument. Negative arguments count back
74 from the end of the history.
75
76 f. `vi-undo' is now a bindable command.
77
78 g. There is a new option: `enable-active-region'. This separates control of
79 the active region and bracketed-paste. It has the same default value as
80 bracketed-paste, and enabling bracketed paste enables the active region.
81 Users can now turn off the active region while leaving bracketed paste
82 enabled.
83
84 h. rl_completer_word_break_characters is now `const char *' like
85 rl_basic_word_break_characters.
86
87 i. Readline looks in $LS_COLORS for a custom filename extension
88 (*.readline-colored-completion-prefix) and uses that as the default color
89 for the common prefix displayed when `colored-completion-prefix' is set.
90
91 j. Two new bindable string variables: active-region-start-color and
92 active-region-end-color. The first sets the color used to display the
93 active region; the second turns it off. If set, these are used in place
94 of terminal standout mode.
95
96 k. New readline state (RL_STATE_EOF) and application-visible variable
97 (rl_eof_found) to allow applications to detect when readline reads EOF
98 before calling the deprep-terminal hook.
99
100 l. There is a new configuration option: --with-shared-termcap-library, which
101 forces linking the shared readline library with the shared termcap (or
102 curses/ncurses/termlib) library so applications don't have to do it.
103
104 m. Readline now checks for changes to locale settings (LC_ALL/LC_CTYPE/LANG)
105 each time it is called, and modifies the appropriate locale-specific display
106 and key binding variables when the locale changes.
107
108 -------------------------------------------------------------------------------
109 This is a terse description of the new features added to readline-8.1 since
110 the release of readline-8.0.
111
112 New Features in Readline
113
114 a. If a second consecutive completion attempt produces matches where the first
115 did not, treat it as a new completion attempt and insert a match as
116 appropriate.
117
118 b. Bracketed paste mode works in more places: incremental search strings, vi
119 overstrike mode, character search, and reading numeric arguments.
120
121 c. Readline automatically switches to horizontal scrolling if the terminal has
122 only one line.
123
124 d. Unbinding all key sequences bound to a particular readline function now
125 descends into keymaps for multi-key sequences.
126
127 e. rl-clear-display: new bindable command that clears the screen and, if
128 possible, the scrollback buffer (bound to emacs mode M-C-l by default).
129
130 f. New active mark and face feature: when enabled, it will highlight the text
131 inserted by a bracketed paste (the `active region') and the text found by
132 incremental and non-incremental history searches. This is tied to bracketed
133 paste and can be disabled by turning off bracketed paste.
134
135 g. Readline sets the mark in several additional commands.
136
137 h. Bracketed paste mode is enabled by default. There is a configure-time
138 option (--enable-bracketed-paste-default) to set the default to on or off.
139
140 i. Readline tries to take advantage of the more regular structure of UTF-8
141 characters to identify the beginning and end of characters when moving
142 through the line buffer.
143
144 j. The bindable operate-and-get-next command (and its default bindings) are
145 now part of readline instead of a bash-specific addition.
146
147 k. The signal cleanup code now blocks SIGINT while processing after a SIGINT.
148
149 -------------------------------------------------------------------------------
150 This is a terse description of the new features added to readline-8.0 since
151 the release of readline-7.0.
152
153 New Features in Readline
154
155 a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as
156 Posix specifies (uses fnmatch(3) if available).
157
158 b. There are new `next-screen-line' and `previous-screen-line' bindable
159 commands, which move the cursor to the same column in the next, or previous,
160 physical line, respectively.
161
162 c. There are default key bindings for control-arrow-key key combinations.
163
164 d. A negative argument (-N) to `quoted-insert' means to insert the next N
165 characters using quoted-insert.
166
167 e. New public function: rl_check_signals(), which allows applications to
168 respond to signals that readline catches while waiting for input using
169 a custom read function.
170
171 f. There is new support for conditionally testing the readline version in an
172 inputrc file, with a full set of arithmetic comparison operators available.
173
174 g. There is a simple variable comparison facility available for use within an
175 inputrc file. Allowable operators are equality and inequality; string
176 variables may be compared to a value; boolean variables must be compared to
177 either `on' or `off'; variable names are separated from the operator by
178 whitespace.
179
180 h. The history expansion library now understands command and process
181 substitution and extended globbing and allows them to appear anywhere in a
182 word.
183
184 i. The history library has a new variable that allows applications to set the
185 initial quoting state, so quoting state can be inherited from a previous
186 line.
187
188 j. Readline now allows application-defined keymap names; there is a new public
189 function, rl_set_keymap_name(), to do that.
190
191 k. The "Insert" keypad key, if available, now puts readline into overwrite
192 mode.
193
194 -------------------------------------------------------------------------------
195 This is a terse description of the new features added to readline-7.0 since
196 the release of readline-6.3.
197
198 New Features in Readline
199
200 a. The history truncation code now uses the same error recovery mechanism as
201 the history writing code, and restores the old version of the history file
202 on error. The error recovery mechanism handles symlinked history files.
203
204 b. There is a new bindable variable, `enable-bracketed-paste', which enables
205 support for a terminal's bracketed paste mode.
206
207 c. The editing mode indicators can now be strings and are user-settable
208 (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
209 variables). Mode strings can contain invisible character sequences.
210 Setting mode strings to null strings restores the defaults.
211
212 d. Prompt expansion adds the mode string to the last line of a multi-line
213 prompt (one with embedded newlines).
214
215 e. There is a new bindable variable, `colored-completion-prefix', which, if
216 set, causes the common prefix of a set of possible completions to be
217 displayed in color.
218
219 f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
220 mode yank-pop.
221
222 g. The redisplay code underwent several efficiency improvements for multibyte
223 locales.
224
225 h. The insert-char function attempts to batch-insert all pending typeahead
226 that maps to self-insert, as long as it is coming from the terminal.
227
228 i. rl_callback_sigcleanup: a new application function that can clean up and
229 unset any state set by readline's callback mode. Intended to be used
230 after a signal.
231
232 j. If an incremental search string has its last character removed with DEL, the
233 resulting empty search string no longer matches the previous line.
234
235 k. If readline reads a history file that begins with `#' (or the value of
236 the history comment character) and has enabled history timestamps, the history
237 entries are assumed to be delimited by timestamps. This allows multi-line
238 history entries.
239
240 l. Readline now throws an error if it parses a key binding without a terminating
241 `:' or whitespace.
242
243 m. The default binding for ^W in vi mode now uses word boundaries specified
244 by Posix (vi-unix-word-rubout is bindable command name).
245
246 n. rl_clear_visible_line: new application-callable function; clears all
247 screen lines occupied by the current visible readline line.
248
249 o. rl_tty_set_echoing: application-callable function that controls whether
250 or not readline thinks it is echoing terminal output.
251
252 p. Handle >| and strings of digits preceding and following redirection
253 specifications as single tokens when tokenizing the line for history
254 expansion.
255
256 q. Fixed a bug with displaying completions when the prefix display length
257 is greater than the length of the completions to be displayed.
258
259 r. The :p history modifier now applies to the entire line, so any expansion
260 specifying :p causes the line to be printed instead of expanded.
261
262 s. New application-callable function: rl_pending_signal(): returns the signal
263 number of any signal readline has caught but not yet handled.
264
265 t. New application-settable variable: rl_persistent_signal_handlers: if set
266 to a non-zero value, readline will enable the readline-6.2 signal handler
267 behavior in callback mode: handlers are installed when
268 rl_callback_handler_install is called and removed removed when a complete
269 line has been read.
270
271 -------------------------------------------------------------------------------
272 This is a terse description of the new features added to readline-6.3 since
273 the release of readline-6.2.
274
275 New Features in Readline
276
277 a. Readline is now more responsive to SIGHUP and other fatal signals when
278 reading input from the terminal or performing word completion but no
279 longer attempts to run any not-allowable functions from a signal handler
280 context.
281
282 b. There are new bindable commands to search the history for the string of
283 characters between the beginning of the line and the point
284 (history-substring-search-forward, history-substring-search-backward)
285
286 c. Readline allows quoted strings as the values of variables when setting
287 them with `set'. As a side effect, trailing spaces and tabs are ignored
288 when setting a string variable's value.
289
290 d. The history library creates a backup of the history file when writing it
291 and restores the backup on a write error.
292
293 e. New application-settable variable: rl_filename_stat_hook: a function called
294 with a filename before using it in a call to stat(2). Bash uses it to
295 expand shell variables so things like $HOME/Downloads have a slash
296 appended.
297
298 f. New bindable function `print-last-kbd-macro', prints the most-recently-
299 defined keyboard macro in a reusable format.
300
301 g. New user-settable variable `colored-stats', enables use of colored text
302 to denote file types when displaying possible completions (colored analog
303 of visible-stats).
304
305 h. New user-settable variable `keyseq-timout', acts as an inter-character
306 timeout when reading input or incremental search strings.
307
308 i. New application-callable function: rl_clear_history. Clears the history list
309 and frees all readline-associated private data.
310
311 j. New user-settable variable, show-mode-in-prompt, adds a characters to the
312 beginning of the prompt indicating the current editing mode.
313
314 k. New application-settable variable: rl_input_available_hook; function to be
315 called when readline detects there is data available on its input file
316 descriptor.
317
318 l. Readline calls an application-set event hook (rl_event_hook) after it gets
319 a signal while reading input (read returns -1/EINTR but readline does not
320 handle the signal immediately) to allow the application to handle or
321 otherwise note it.
322
323 m. If the user-settable variable `history-size' is set to a value less than
324 0, the history list size is unlimited.
325
326 n. New application-settable variable: rl_signal_event_hook; function that is
327 called when readline is reading terminal input and read(2) is interrupted
328 by a signal. Currently not called for SIGHUP or SIGTERM.
329
330 -------------------------------------------------------------------------------
331 This is a terse description of the new features added to readline-6.2 since
332 the release of readline-6.1.
333
334 a. The history library does not try to write the history filename in the
335 current directory if $HOME is unset. This closes a potential security
336 problem if the application does not specify a history filename.
337
338 b. New bindable variable `completion-display-width' to set the number of
339 columns used when displaying completions.
340
341 c. New bindable variable `completion-case-map' to cause case-insensitive
342 completion to treat `-' and `_' as identical.
343
344 d. There are new bindable vi-mode command names to avoid readline's case-
345 insensitive matching not allowing them to be bound separately.
346
347 e. New bindable variable `menu-complete-display-prefix' causes the menu
348 completion code to display the common prefix of the possible completions
349 before cycling through the list, instead of after.
350
351 -------------------------------------------------------------------------------
352 This is a terse description of the new features added to readline-6.1 since
353 the release of readline-6.0.
354
355 New Features in Readline
356
357 a. New bindable function: menu-complete-backward.
358
359 b. In the vi insertion keymap, C-n is now bound to menu-complete by default,
360 and C-p to menu-complete-backward.
361
362 c. When in vi command mode, repeatedly hitting ESC now does nothing, even
363 when ESC introduces a bound key sequence. This is closer to how
364 historical vi behaves.
365
366 d. New bindable function: skip-csi-sequence. Can be used as a default to
367 consume key sequences generated by keys like Home and End without having
368 to bind all keys.
369
370 e. New application-settable function: rl_filename_rewrite_hook. Can be used
371 to rewrite or modify filenames read from the file system before they are
372 compared to the word to be completed.
373
374 f. New bindable variable: skip-completed-text, active when completing in the
375 middle of a word. If enabled, it means that characters in the completion
376 that match characters in the remainder of the word are "skipped" rather
377 than inserted into the line.
378
379 g. The pre-readline-6.0 version of menu completion is available as
380 "old-menu-complete" for users who do not like the readline-6.0 version.
381
382 h. New bindable variable: echo-control-characters. If enabled, and the
383 tty ECHOCTL bit is set, controls the echoing of characters corresponding
384 to keyboard-generated signals.
385
386 i. New bindable variable: enable-meta-key. Controls whether or not readline
387 sends the smm/rmm sequences if the terminal indicates it has a meta key
388 that enables eight-bit characters.
389
390 -------------------------------------------------------------------------------
391 This is a terse description of the new features added to readline-6.0 since
392 the release of readline-5.2.
393
394 New Features in Readline
395
396 a. A new variable, rl_sort_completion_matches; allows applications to inhibit
397 match list sorting (but beware: some things don't work right if
398 applications do this).
399
400 b. A new variable, rl_completion_invoking_key; allows applications to discover
401 the key that invoked rl_complete or rl_menu_complete.
402
403 c. The functions rl_block_sigint and rl_release_sigint are now public and
404 available to calling applications who want to protect critical sections
405 (like redisplay).
406
407 d. The functions rl_save_state and rl_restore_state are now public and
408 available to calling applications; documented rest of readline's state
409 flag values.
410
411 e. A new user-settable variable, `history-size', allows setting the maximum
412 number of entries in the history list.
413
414 f. There is a new implementation of menu completion, with several improvements
415 over the old; the most notable improvement is a better `completions
416 browsing' mode.
417
418 g. The menu completion code now uses the rl_menu_completion_entry_function
419 variable, allowing applications to provide their own menu completion
420 generators.
421
422 h. There is support for replacing a prefix of a pathname with a `...' when
423 displaying possible completions. This is controllable by setting the
424 `completion-prefix-display-length' variable. Matches with a common prefix
425 longer than this value have the common prefix replaced with `...'.
426
427 i. There is a new `revert-all-at-newline' variable. If enabled, readline will
428 undo all outstanding changes to all history lines when `accept-line' is
429 executed.
430
431 -------------------------------------------------------------------------------
432 This is a terse description of the new features added to readline-5.2 since
433 the release of readline-5.1.
434
435 New Features in Readline
436
437 a. Calling applications can now set the keyboard timeout to 0, allowing
438 poll-like behavior.
439
440 b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
441 the default last-ditch startup file.
442
443 c. The history file reading functions now allow windows-like \r\n line
444 terminators.
445
446 -------------------------------------------------------------------------------
447 This is a terse description of the new features added to readline-5.1 since
448 the release of readline-5.0.
449
450 New Features in Readline
451
452 a. The key sequence sent by the keypad `delete' key is now automatically
453 bound to delete-char.
454
455 b. A negative argument to menu-complete now cycles backward through the
456 completion list.
457
458 c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
459 readline will bind the terminal special characters to their readline
460 equivalents when it's called (on by default).
461
462 d. New bindable command: vi-rubout. Saves deleted text for possible
463 reinsertion, as with any vi-mode `text modification' command; `X' is bound
464 to this in vi command mode.
465
466 e. If the rl_completion_query_items is set to a value < 0, readline never
467 asks the user whether or not to view the possible completions.
468
469 f. New application-callable auxiliary function, rl_variable_value, returns
470 a string corresponding to a readline variable's value.
471
472 g. When parsing inputrc files and variable binding commands, the parser
473 strips trailing whitespace from values assigned to boolean variables
474 before checking them.
475
476 h. A new external application-controllable variable that allows the LINES
477 and COLUMNS environment variables to set the window size regardless of
478 what the kernel returns.
479
480
481 -------------------------------------------------------------------------------
482 This is a terse description of the new features added to readline-5.0 since
483 the release of readline-4.3.
484
485 New Features in Readline
486
487 a. History expansion has a new `a' modifier equivalent to the `g' modifier
488 for compatibility with the BSD csh.
489
490 b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
491 modifier, which performs a substitution once per word.
492
493 c. All non-incremental search operations may now undo the operation of
494 replacing the current line with the history line.
495
496 d. The text inserted by an `a' command in vi mode can be reinserted with
497 `.'.
498
499 e. New bindable variable, `show-all-if-unmodified'. If set, the readline
500 completer will list possible completions immediately if there is more
501 than one completion and partial completion cannot be performed.
502
503 f. There is a new application-callable `free_history_entry()' function.
504
505 g. History list entries now contain timestamp information; the history file
506 functions know how to read and write timestamp information associated
507 with each entry.
508
509 h. Four new key binding functions have been added:
510
511 rl_bind_key_if_unbound()
512 rl_bind_key_if_unbound_in_map()
513 rl_bind_keyseq_if_unbound()
514 rl_bind_keyseq_if_unbound_in_map()
515
516 i. New application variable, rl_completion_quote_character, set to any
517 quote character readline finds before it calls the application completion
518 function.
519
520 j. New application variable, rl_completion_suppress_quote, settable by an
521 application completion function. If set to non-zero, readline does not
522 attempt to append a closing quote to a completed word.
523
524 k. New application variable, rl_completion_found_quote, set to a non-zero
525 value if readline determines that the word to be completed is quoted.
526 Set before readline calls any application completion function.
527
528 l. New function hook, rl_completion_word_break_hook, called when readline
529 needs to break a line into words when completion is attempted. Allows
530 the word break characters to vary based on position in the line.
531
532 m. New bindable command: unix-filename-rubout. Does the same thing as
533 unix-word-rubout, but adds `/' to the set of word delimiters.
534
535 n. When listing completions, directories have a `/' appended if the
536 `mark-directories' option has been enabled.