comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/doc/readline/CHANGES @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
comparison
equal deleted inserted replaced
67:0e9998148a16 68:5028fdace37b
1 This document details the changes between this version, readline-8.2, and
2 the previous version, readline-8.1.
3
4 1. Changes to Readline
5
6 a. Fixed a problem with cleaning up active marks when using callback mode.
7
8 b. Fixed a problem with arithmetic comparison operators checking the version.
9
10 c. Fixed a problem that could cause readline not to build on systems without
11 POSIX signal functions.
12
13 d. Fixed a bug that could cause readline to crash if the application removed
14 the callback line handler before readline read all typeahead.
15
16 e. Added additional checks for read errors in the middle of readline commands.
17
18 f. Fixed a redisplay problem that occurred when switching from the digit-
19 argument prompt `(arg: N)' back to the regular prompt and the regular
20 prompt contained invisible characters.
21
22 g. Fixed a problem with restoring the prompt when aborting an incremental
23 search.
24
25 h. Fix a problem with characters > 128 not being displayed correctly in certain
26 single-byte encodings.
27
28 i. Fixed a problem with unix-filename-rubout that caused it to delete too much
29 when applied to a pathname consisting only of one or more slashes.
30
31 j. Fixed a display problem that caused the prompt to be wrapped incorrectly if
32 the screen changed dimensions during a call to readline() and the prompt
33 became longer than the screen width.
34
35 k. Fixed a problem that caused the \r output by turning off bracketed paste
36 to overwrite the line if terminal echo was disabled.
37
38 l. Fixed a bug that could cause colored-completion-prefix to not display if
39 completion-prefix-display-length was set.
40
41 m. Fixed a problem with line wrapping prompts when a group of invisible
42 characters runs to the right edge of the screen and the prompt extends
43 longer then the screen width.
44
45 n. Fixed a couple problems that could cause rl_end to be set incorrectly by
46 transpose-words.
47
48 o. Prevent some display problems when running a command as the result of a
49 trap or one bound using `bind -x' and the command generates output.
50
51 p. Fixed an issue with multi-line prompt strings that have one or more
52 invisible characters at the end of a physical line.
53
54 q. Fixed an issue that caused a history line's undo list to be cleared when
55 it should not have been.
56
57 r. When replacing a history entry, make sure the existing entry has a non-NULL
58 timestamp before copying it; it may have been added by the application, not
59 the history library.
60
61 2. New Features in Readline
62
63 a. There is now an HS_HISTORY_VERSION containing the version number of the
64 history library for applications to use.
65
66 b. History expansion better understands multiple history expansions that may
67 contain strings that would ordinarily inhibit history expansion (e.g.,
68 `abc!$!$').
69
70 c. There is a new framework for readline timeouts, including new public
71 functions to set timeouts and query how much time is remaining before a
72 timeout hits, and a hook function that can trigger when readline times
73 out. There is a new state value to indicate a timeout.
74
75 d. Automatically bind termcap key sequences for page-up and page-down to
76 history-search-backward and history-search-forward, respectively.
77
78 e. There is a new `fetch-history' bindable command that retrieves the history
79 entry corresponding to its numeric argument. Negative arguments count back
80 from the end of the history.
81
82 f. `vi-undo' is now a bindable command.
83
84 g. There is a new option: `enable-active-region'. This separates control of
85 the active region and bracketed-paste. It has the same default value as
86 bracketed-paste, and enabling bracketed paste enables the active region.
87 Users can now turn off the active region while leaving bracketed paste
88 enabled.
89
90 h. rl_completer_word_break_characters is now `const char *' like
91 rl_basic_word_break_characters.
92
93 i. Readline looks in $LS_COLORS for a custom filename extension
94 (*.readline-colored-completion-prefix) and uses that as the default color
95 for the common prefix displayed when `colored-completion-prefix' is set.
96
97 j. Two new bindable string variables: active-region-start-color and
98 active-region-end-color. The first sets the color used to display the
99 active region; the second turns it off. If set, these are used in place
100 of terminal standout mode.
101
102 k. New readline state (RL_STATE_EOF) and application-visible variable
103 (rl_eof_found) to allow applications to detect when readline reads EOF
104 before calling the deprep-terminal hook.
105
106 l. There is a new configuration option: --with-shared-termcap-library, which
107 forces linking the shared readline library with the shared termcap (or
108 curses/ncurses/termlib) library so applications don't have to do it.
109
110 m. Readline now checks for changes to locale settings (LC_ALL/LC_CTYPE/LANG)
111 each time it is called, and modifies the appropriate locale-specific display
112 and key binding variables when the locale changes.
113
114 -------------------------------------------------------------------------------
115 This document details the changes between this version, readline-8.1, and
116 the previous version, readline-8.0.
117
118 1. Changes to Readline
119
120 a. There are a number of fixes that were found as the result of fuzzing with
121 random input.
122
123 b. Changed the revert-all-at-newline behavior to make sure to start at the end
124 of the history list when doing it, instead of the line where the user hit
125 return.
126
127 c. When parsing `set' commands from the inputrc file or an application, readline
128 now allows trailing whitespace.
129
130 d. Fixed a bug that left a file descriptor open to the history file if the
131 file size was 0.
132
133 e. Fixed a problem with binding key sequences containing meta characters.
134
135 f. Fixed a bug that caused the wrong line to be displayed if the user tried to
136 move back beyond the beginning of the history list, or forward past the end
137 of the history list.
138
139 g. If readline catches SIGTSTP, it now sets a hook that allows the calling
140 application to handle it if it desires.
141
142 h. Fixed a redisplay problem with a prompt string containing embedded newlines.
143
144 i. Fixed a problem with completing filenames containing invalid multibyte
145 sequences when case-insensitive comparisons are enabled.
146
147 j. Fixed a redisplay problem with prompt strings containing invisible multibyte
148 characters.
149
150 k. Fixed a problem with multibyte characters mapped to editing commands that
151 modify the search string in incremental search.
152
153 l. Fixed a bug with maintaining the key sequence while resolving a bound
154 command in the presence of ambiguous sequences (sequences with a common
155 prefix), in most cases while attempting to unbind it.
156
157 m. Fixed several buffer overflows found as the result of fuzzing.
158
159 n. Reworked backslash handling when translating key sequences for key binding
160 to be more uniform and consistent, which introduces a slight backwards
161 incompatibility.
162
163 o. Fixed a bug with saving the history that resulted in errors not being
164 propagated to the calling application when the history file is not writable.
165
166 p. Readline only calls chown(2) on a newly-written history file if it really
167 needs to, instead of having it be a no-op.
168
169 q. Readline now behaves better when operate-and-get-next is used when the
170 history list is `full': when there are already $HISTSIZE entries.
171
172 r. Fixed a bug that could cause vi redo (`.') of a replace command not to work
173 correctly in the C or POSIX locale.
174
175 s. Fixed a bug with vi-mode digit arguments that caused the last command to be
176 set incorrectly. This prevents yank-last-arg from working as intended, for
177 example.
178
179 t. Make sure that all undo groups are closed when leaving vi insertion mode.
180
181 u. Make sure that the vi-mode `C' and `c' commands enter insert mode even if
182 the motion command doesn't have any effect.
183
184 v. Fixed several potential memory leaks in the callback mode context handling.
185
186 w. If readline is handling a SIGTTOU, make sure SIGTTOU is blocked while
187 executing the terminal cleanup code, since it's no longer run in a signal
188 handling context.
189
190 x. Fixed a bug that could cause an application with an application-specific
191 redisplay function to crash if the line data structures had not been
192 initialized.
193
194 y. Terminals that are named "dumb" or unknown do not enable bracketed paste
195 by default.
196
197 z. Ensure that disabling bracketed paste turns off highlighting the incremental
198 search string when the search is successful.
199
200 2. New Features in Readline
201
202 a. If a second consecutive completion attempt produces matches where the first
203 did not, treat it as a new completion attempt and insert a match as
204 appropriate.
205
206 b. Bracketed paste mode works in more places: incremental search strings, vi
207 overstrike mode, character search, and reading numeric arguments.
208
209 c. Readline automatically switches to horizontal scrolling if the terminal has
210 only one line.
211
212 d. Unbinding all key sequences bound to a particular readline function now
213 descends into keymaps for multi-key sequences.
214
215 e. rl-clear-display: new bindable command that clears the screen and, if
216 possible, the scrollback buffer (bound to emacs mode M-C-l by default).
217
218 f. New active mark and face feature: when enabled, it will highlight the text
219 inserted by a bracketed paste (the `active region') and the text found by
220 incremental and non-incremental history searches. This is tied to bracketed
221 paste and can be disabled by turning off bracketed paste.
222
223 g. Readline sets the mark in several additional commands.
224
225 h. Bracketed paste mode is enabled by default. There is a configure-time
226 option (--enable-bracketed-paste-default) to set the default to on or off.
227
228 i. Readline tries to take advantage of the more regular structure of UTF-8
229 characters to identify the beginning and end of characters when moving
230 through the line buffer.
231
232 j. The bindable operate-and-get-next command (and its default bindings) are
233 now part of readline instead of a bash-specific addition.
234
235 k. The signal cleanup code now blocks SIGINT while processing after a SIGINT.
236
237 -------------------------------------------------------------------------------
238 This document details the changes between this version, readline-8.0, and the
239 previous version, readline-7.0.
240
241 1. Changes to Readline
242
243 a. Added a guard to prevent nested macros from causing an infinite expansion
244 loop.
245
246 b. Instead of allocating enough history list entries to hold the maximum list
247 size, cap the number allocated initially.
248
249 c. Added a strategy to avoid allocating huge amounts of memory if a block of
250 history entries without timestamps occurs after a block with timestamps.
251
252 d. Added support for keyboard timeouts when an ESC character is the last
253 character in a macro.
254
255 e. There are several performance improvements when in a UTF-8 locale.
256
257 f. Readline does a better job of preserving the original set of blocked
258 signals when using pselect() to wait for input.
259
260 g. Fixed a bug that caused multibyte characters in macros to be mishandled.
261
262 h. Fixed several bugs in the code that calculates line breaks when expanding
263 prompts that span several lines, contain multibyte characters, and contain
264 invisible character seqeuences.
265
266 i. Fixed several bugs in cursor positioning when displaying lines with prompts
267 containing invisible characters and multibyte characters.
268
269 j. When performing case-insensitive completion, Readline no longer sorts the
270 list of matches unless directed to do so.
271
272 k. Fixed a problem with key sequences ending with a backslash.
273
274 l. Fixed out-of-bounds and free memory read errors found via fuzzing.
275
276 m. Fixed several cases where the mark was set to an invalid value.
277
278 n. Fixed a problem with the case-changing operators in the case where the
279 lower and upper case versions of a character do not have the same number
280 of bytes.
281
282 o. Handle incremental and non-incremental search character reads returning EOF.
283
284 p. Handle the case where a failing readline command at the end of a multi-key
285 sequence could be misinterpreted.
286
287 q. The history library now prints a meaningful error message if the history
288 file isn't a regular file.
289
290 r. Fixed a problem with vi-mode redo (`.') on a command when trying to replace
291 a multibyte character.
292
293 s. The key binding code now attempts to remove a keymap if a key unbinding
294 leaves it empty.
295
296 t. Fixed a line-wrapping issue that caused problems for some terminal
297 emulators.
298
299 u. If there is a key bound to the tty's VDISCARD special character, readline
300 disables VDISCARD while it is active.
301
302 v. Fixed a problem with exiting bracketed paste mode on terminals that assume
303 the bracketed paste mode character sequence contains visible characters.
304
305 w. Fixed a bug that could cause a key binding command to refer to an
306 uninitialized variable.
307
308 x. Added more UTF-8-specific versions of multibyte functions, and optimized
309 existing functions if the current locale uses UTF-8 encoding.
310
311 y. Fixed a problem with bracketed-paste inserting more than one character and
312 interacting with other readline functions.
313
314 z. Fixed a bug that caused the history library to attempt to append a history
315 line to a non-existent history entry.
316
317 aa. If using bracketed paste mode, output a newline after the \r that is the
318 last character of the mode disable string to avoid overwriting output.
319
320 bb. Fixes to the vi-mode `b', `B', `w', `W', `e', and `E' commands to better
321 handle multibyte characters.
322
323 cc. Fixed a redisplay problem that caused an extra newline to be generated on
324 accept-line when the line length is exactly the screenwidth.
325
326 dd. Fixed a bug with adding multibyte characters to an incremental search
327 string.
328
329 ee. Fixed a bug with redoing text insertions in vi mode.
330
331 ff. Fixed a bug with pasting text into an incremental search string if bracketed
332 paste mode is enabled. ESC cannot be one of the incremental search
333 terminator characters for this to work.
334
335 gg. Fixed a bug with anchored search patterns when performing searches in vi
336 mode.
337
338 2. New Features in Readline
339
340 a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as
341 Posix specifies (uses fnmatch(3) if available).
342
343 b. There are new `next-screen-line' and `previous-screen-line' bindable
344 commands, which move the cursor to the same column in the next, or previous,
345 physical line, respectively.
346
347 c. There are default key bindings for control-arrow-key key combinations.
348
349 d. A negative argument (-N) to `quoted-insert' means to insert the next N
350 characters using quoted-insert.
351
352 e. New public function: rl_check_signals(), which allows applications to
353 respond to signals that readline catches while waiting for input using
354 a custom read function.
355
356 f. There is new support for conditionally testing the readline version in an
357 inputrc file, with a full set of arithmetic comparison operators available.
358
359 g. There is a simple variable comparison facility available for use within an
360 inputrc file. Allowable operators are equality and inequality; string
361 variables may be compared to a value; boolean variables must be compared to
362 either `on' or `off'; variable names are separated from the operator by
363 whitespace.
364
365 h. The history expansion library now understands command and process
366 substitution and extended globbing and allows them to appear anywhere in a
367 word.
368
369 i. The history library has a new variable that allows applications to set the
370 initial quoting state, so quoting state can be inherited from a previous
371 line.
372
373 j. Readline now allows application-defined keymap names; there is a new public
374 function, rl_set_keymap_name(), to do that.
375
376 k. The "Insert" keypad key, if available, now puts readline into overwrite
377 mode.
378
379 -------------------------------------------------------------------------------
380 This document details the changes between this version, readline-7.0, and the
381 previous version, readline-6.3.
382
383 1. Changes to Readline
384
385 a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y'
386 commands with modifiers was fixed.
387
388 b. Fixed a bug that caused callback mode to dump core when reading a
389 multiple-key sequence (e.g., arrow keys).
390
391 c. Fixed a bug that caused the redisplay code to erase some of the line when
392 using horizontal scrolling with incremental search.
393
394 d. Readline's input handler now performs signal processing if read(2) is
395 interrupted by SIGALRM or SIGVTALRM.
396
397 e. Fixed a problem with revert-all-at-newline freeing freed memory.
398
399 f. Clarified the documentation for the history_quotes_inhibit_expansion
400 variable to note that it inhibits scanning for the history comment
401 character and that it only affects double-quoted strings.
402
403 g. Fixed an off-by-one error in the prompt printed when performing searches.
404
405 h. Use pselect(2), if available, to wait for input before calling read(2), so
406 a SIGWINCH can interrupt it, since it doesn't interrupt read(2).
407
408 i. Some memory leaks caused by signals interrupting filename completion have
409 been fixed.
410
411 j. Reading EOF twice on a non-empty line causes EOF to be returned, rather
412 than the partial line. This can cause partial lines to be executed on
413 SIGHUP, for example.
414
415 k. Fixed a bug concerning deleting multibyte characters from the search
416 string while performing an incremental search.
417
418 l. Fixed a bug with tilde expanding directory names in filename completion.
419
420 m. Fixed a bug that did not allow binding sequences beginning with a `\'.
421
422 n. Fixed a redisplay bug involving incorrect line wrapping when the prompt
423 contains a multibyte character in the last screen column.
424
425 o. Fixed a bug that caused history expansion to disregard characters that are
426 documented to delimit a history event specifier without requiring `:'.
427
428 p. Fixed a bug that could cause reading past the end of a string when reading
429 the value when binding the set of isearch terminators.
430
431 q. Fixed a bug that caused readline commands that depend on knowing which
432 key invoked them to misbehave when dispatching key sequences that are
433 prefixes of other key bindings.
434
435 r. Paren matching now works in vi insert mode.
436
437 s. Colored completion prefixes are now displayed using a different color, less
438 likely to collide with files.
439
440 t. Fixed a bug that caused vi-mode character search to misbehave when
441 running in callback mode.
442
443 u. Fixed a bug that caused output to be delayed when input is coming from a
444 macro in vi-mode.
445
446 v. Fixed a bug that caused the vi-mode `.' command to misbehave when redoing
447 a multi-key key sequence via a macro.
448
449 w. Fixed a bug that caused problems with applications that supply their own
450 input function when performing completion.
451
452 x. When read returns -1/EIO when attempting to read a key, return an error
453 instead of line termination back to the caller.
454
455 y. Updated tty auditing feature based on patch from Red Hat.
456
457 z. Fixed a bug that could cause the history library to crash on overflows
458 introduced by malicious editing of timestamps in the history file.
459
460 aa. The history file writing functions only attempt to create and use a backup
461 history file if the history file exists and is a regular file.
462
463 bb. Fixed an out-of-bounds read in readline's internal tilde expansion interface.
464
465 cc. Fixed several redisplay bugs with prompt strings containing multibyte
466 and non-visible characters whose physical length is longer than the screen
467 width.
468
469 dd. Fixed a redisplay bug with prompt strings containing invisible characters
470 whose physical length exceeds the screen width and using incremental search.
471
472 ee. Readline prints more descriptive error messages when it encounters errors
473 while reading an inputrc file.
474
475 ff. Fixed a bug in the character insertion code that attempts to optimize
476 typeahead when it reads a character that is not bound to self-insert and
477 resets the key sequence state.
478
479 gg. When refreshing the line as the result of a key sequence, Readline attempts
480 to redraw only the last line of a multiline prompt.
481
482 hh. Fixed an issue that caused completion of git commands to display
483 incorrectly when using colored-completion-prefix.
484
485 ii. Fixed several redisplay bugs having to do with multibyte characters and
486 invisible characters in prompt strings.
487
488 jj. Fixed a bug that caused mode strings to be displayed incorrectly if the
489 prompt was shorter than the mode string.
490
491 2. New Features in Readline
492
493 a. The history truncation code now uses the same error recovery mechanism as
494 the history writing code, and restores the old version of the history file
495 on error. The error recovery mechanism handles symlinked history files.
496
497 b. There is a new bindable variable, `enable-bracketed-paste', which enables
498 support for a terminal's bracketed paste mode.
499
500 c. The editing mode indicators can now be strings and are user-settable
501 (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
502 variables). Mode strings can contain invisible character sequences.
503 Setting mode strings to null strings restores the defaults.
504
505 d. Prompt expansion adds the mode string to the last line of a multi-line
506 prompt (one with embedded newlines).
507
508 e. There is a new bindable variable, `colored-completion-prefix', which, if
509 set, causes the common prefix of a set of possible completions to be
510 displayed in color.
511
512 f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
513 mode yank-pop.
514
515 g. The redisplay code underwent several efficiency improvements for multibyte
516 locales.
517
518 h. The insert-char function attempts to batch-insert all pending typeahead
519 that maps to self-insert, as long as it is coming from the terminal.
520
521 i. rl_callback_sigcleanup: a new application function that can clean up and
522 unset any state set by readline's callback mode. Intended to be used
523 after a signal.
524
525 j. If an incremental search string has its last character removed with DEL, the
526 resulting empty search string no longer matches the previous line.
527
528 k. If readline reads a history file that begins with `#' (or the value of
529 the history comment character) and has enabled history timestamps, the history
530 entries are assumed to be delimited by timestamps. This allows multi-line
531 history entries.
532
533 l. Readline now throws an error if it parses a key binding without a terminating
534 `:' or whitespace.
535
536 m. The default binding for ^W in vi mode now uses word boundaries specified
537 by Posix (vi-unix-word-rubout is bindable command name).
538
539 n. rl_clear_visible_line: new application-callable function; clears all
540 screen lines occupied by the current visible readline line.
541
542 o. rl_tty_set_echoing: application-callable function that controls whether
543 or not readline thinks it is echoing terminal output.
544
545 p. Handle >| and strings of digits preceding and following redirection
546 specifications as single tokens when tokenizing the line for history
547 expansion.
548
549 q. Fixed a bug with displaying completions when the prefix display length
550 is greater than the length of the completions to be displayed.
551
552 r. The :p history modifier now applies to the entire line, so any expansion
553 specifying :p causes the line to be printed instead of expanded.
554
555 s. New application-callable function: rl_pending_signal(): returns the signal
556 number of any signal readline has caught but not yet handled.
557
558 t. New application-settable variable: rl_persistent_signal_handlers: if set
559 to a non-zero value, readline will enable the readline-6.2 signal handler
560 behavior in callback mode: handlers are installed when
561 rl_callback_handler_install is called and removed removed when a complete
562 line has been read.
563
564 -------------------------------------------------------------------------------
565 This document details the changes between this version, readline-6.3, and the
566 previous version, readline-6.2.
567
568 1. Changes to Readline
569
570 a. Fixed a bug that did not allow the `dd', `cc', or `yy' vi editing mode
571 commands to work on the entire line.
572
573 b. Fixed a bug that caused redisplay problems with prompts longer than 128
574 characters and history searches.
575
576 c. Fixed a bug that caused readline to try and run code to modify its idea
577 of the screen size in a signal handler context upon receiving a SIGWINCH.
578
579 d. Fixed a bug that caused the `meta' key to be enabled beyond the duration
580 of an individual call top readline().
581
582 e. Added a workaround for a wcwidth bug in Mac OS X that caused readline's
583 redisplay to mishandle zero-width combining characters.
584
585 f. Fixed a bug that caused readline to `forget' part of a key sequence when
586 a multiple-key sequence caused it to break out of an incremental search.
587
588 g. Fixed bugs that caused readline to execute code in a signal handler
589 context if interrupted while reading from the file system during completion.
590
591 h. Fixed a bug that caused readline to `forget' part of a key sequence when
592 reading an unbound multi-character key sequence.
593
594 i. Fixed a bug that caused Readline's signal handlers to be installed beyond
595 the bounds of a single call to readline().
596
597 j. Fixed a bug that caused the `.' command to not redo the most recent `R'
598 command in vi mode.
599
600 k. Fixed a bug that caused ignoring case in completion matches to result in
601 readline using the wrong match.
602
603 l. Paren matching now works in vi insert mode.
604
605 m. Fix menu-completion to make show-all-if-ambiguous and menu-complete-display-prefix
606 work together.
607
608 n. Fixed a bug that didn't allow the `cc', `dd', or `yy' commands to be redone
609 in vi editing mode.
610
611 o. Fixed a bug that caused the filename comparison code to not compare
612 multibyte characters correctly when using case-sensitive or case-mapping
613 comparisons.
614
615 p. Fixed the input reading loop to call the input hook function only when there
616 is no terminal input available.
617
618 q. Fixed a bug that caused binding a macro to a multi-character key sequence
619 where the sequence and macro value share a common prefix to not perform
620 the macro replacement.
621
622 r. Fixed several redisplay errors with multibyte characters and prompts
623 containing invisible characters when using horizontal scrolling.
624
625 s. Fixed a bug that caused redisplay errors when trying to overwrite
626 existing characters using multibyte characters.
627
628 t. Fixed a bug in vi mode that caused the arrow keys to set the saved last
629 vi-mode command to the wrong value.
630
631 u. Fixed a bug that caused double-quoted strings to be scanned incorrectly
632 when being used as the value of a readline variable assignment.
633
634 v. Fixed a bug with vi mode that prevented `.' from repeating a command
635 entered on a previous line (command).
636
637 w. Fixed a bug that could cause completion to core dump if it was interrupted
638 by a signal.
639
640 x. Fixed a bug that could cause readline to crash and seg fault attempting to
641 expand an empty history entry.
642
643 y. Fixed a bug that caused display problems with multi-line prompts containing
644 invisible characters on multiple lines.
645
646 z. Fixed a bug that caused effects made by undoing changes to a history line to
647 be discarded.
648
649 2. New Features in Readline
650
651 a. Readline is now more responsive to SIGHUP and other fatal signals when
652 reading input from the terminal or performing word completion but no
653 longer attempts to run any not-allowable functions from a signal handler
654 context.
655
656 b. There are new bindable commands to search the history for the string of
657 characters between the beginning of the line and the point
658 (history-substring-search-forward, history-substring-search-backward)
659
660 c. Readline allows quoted strings as the values of variables when setting
661 them with `set'. As a side effect, trailing spaces and tabs are ignored
662 when setting a string variable's value.
663
664 d. The history library creates a backup of the history file when writing it
665 and restores the backup on a write error.
666
667 e. New application-settable variable: rl_filename_stat_hook: a function called
668 with a filename before using it in a call to stat(2). Bash uses it to
669 expand shell variables so things like $HOME/Downloads have a slash
670 appended.
671
672 f. New bindable function `print-last-kbd-macro', prints the most-recently-
673 defined keyboard macro in a reusable format.
674
675 g. New user-settable variable `colored-stats', enables use of colored text
676 to denote file types when displaying possible completions (colored analog
677 of visible-stats).
678
679 h. New user-settable variable `keyseq-timout', acts as an inter-character
680 timeout when reading input or incremental search strings.
681
682 i. New application-callable function: rl_clear_history. Clears the history list
683 and frees all readline-associated private data.
684
685 j. New user-settable variable, show-mode-in-prompt, adds a characters to the
686 beginning of the prompt indicating the current editing mode.
687
688 k. New application-settable variable: rl_input_available_hook; function to be
689 called when readline needs to check whether there is data available on its
690 input source. The default hook checks rl_instream.
691
692 l. Readline calls an application-set event hook (rl_signal_event_hook) after
693 it gets a signal while reading input (read returns -1/EINTR but readline
694 does not handle the signal immediately) to allow the application to handle
695 or otherwise note it. Not currently called for SIGHUP or SIGTERM.
696
697 m. If the user-settable variable `history-size' is set to a value less than
698 0, the history list size is unlimited.
699
700 n. When creating shared libraries on Mac OS X, the pathname written into the
701 library (install_name) no longer includes the minor version number.
702
703 -------------------------------------------------------------------------------
704 This document details the changes between this version, readline-6.2,
705 and the previous version, readline-6.1.
706
707 1. Changes to Readline
708
709 a. Fixed a bug that caused the unconverted filename to be added to the list of
710 completions when the application specified filename conversion functions.
711
712 b. Fixed a bug that caused the wrong filename to be passed to opendir when the
713 application has specified a filename dequoting function.
714
715 c. Fixed a bug when repeating a character search in vi mode in the case where
716 there was no search to repeat.
717
718 d. When show-all-if-ambiguous is set, the completion routines no longer insert
719 a common match prefix that is shorter than the text being completed.
720
721 e. The full set of vi editing commands may now be used in callback mode.
722
723 f. Fixed a bug that caused readline to not update its idea of the terminal
724 dimensions while running in `no-echo' mode.
725
726 h. Fixed a bug that caused readline to dump core if an application called
727 rl_prep_terminal without setting rl_instream.
728
729 i. Fixed a bug that caused meta-prefixed characters bound to incremental
730 search forward or backward to not be recognized if they were typed
731 subsequently.
732
733 j. The incremental search code treats key sequences that map to the same
734 functions as (default) ^G, ^W, and ^Y as equivalent to those characters.
735
736 k. Fixed a bug in menu-complete that caused it to misbehave with large
737 negative argument.
738
739 l. Fixed a bug that caused vi-mode yank-last-arg to ring the bell when invoked
740 at the end of the line.
741
742 m. Fixed a bug that made an explicit argument of 0 to yank-last-arg behave
743 as if it were a negative argument.
744
745 n. Fixed a bug that caused directory names in words to be completed to not
746 be dequoted correctly.
747
748 2. New Features in Readline
749
750 a. The history library does not try to write the history filename in the
751 current directory if $HOME is unset. This closes a potential security
752 problem if the application does not specify a history filename.
753
754 b. New bindable variable `completion-display-width' to set the number of
755 columns used when displaying completions.
756
757 c. New bindable variable `completion-case-map' to cause case-insensitive
758 completion to treat `-' and `_' as identical.
759
760 d. There are new bindable vi-mode command names to avoid readline's case-
761 insensitive matching not allowing them to be bound separately.
762
763 e. New bindable variable `menu-complete-display-prefix' causes the menu
764 completion code to display the common prefix of the possible completions
765 before cycling through the list, instead of after.
766
767 -------------------------------------------------------------------------------
768 This document details the changes between this version, readline-6.1,
769 and the previous version, readline-6.0.
770
771 1. Changes to Readline
772
773 a. The SIGWINCH signal handler now avoids calling the redisplay code if
774 one arrives while in the middle of redisplay.
775
776 b. Changes to the timeout code to make sure that timeout values greater
777 than one second are handled better.
778
779 c. Fixed a bug in the redisplay code that was triggered by a prompt
780 containing invisible characters exactly the width of the screen.
781
782 d. Fixed a bug in the redisplay code encountered when running in horizontal
783 scroll mode.
784
785 e. Fixed a bug that prevented menu completion from properly completing
786 filenames.
787
788 f. Fixed a redisplay bug caused by a multibyte character causing a line to
789 wrap.
790
791 g. Fixed a bug that caused key sequences of two characters to not be
792 recognized when a longer sequence identical in the first two characters
793 was bound.
794
795 h. Fixed a bug that caused history expansion to be attempted on $'...'
796 single-quoted strings.
797
798 i. Fixed a bug that caused incorrect redisplay when the prompt contained
799 multibyte characters in an `invisible' sequence bracketed by \[ and
800 \].
801
802 j. Fixed a bug that caused history expansion to short-circuit after
803 encountering a multibyte character.
804
805 k. Fixed a bug that caused applications using the callback interface to not
806 react to SIGINT (or other signals) until another character arrived.
807
808 2. New Features in Readline
809
810 a. New bindable function: menu-complete-backward.
811
812 b. In the vi insertion keymap, C-n is now bound to menu-complete by default,
813 and C-p to menu-complete-backward.
814
815 c. When in vi command mode, repeatedly hitting ESC now does nothing, even
816 when ESC introduces a bound key sequence. This is closer to how
817 historical vi behaves.
818
819 d. New bindable function: skip-csi-sequence. Can be used as a default to
820 consume key sequences generated by keys like Home and End without having
821 to bind all keys.
822
823 e. New application-settable function: rl_filename_rewrite_hook. Can be used
824 to rewrite or modify filenames read from the file system before they are
825 compared to the word to be completed.
826
827 f. New bindable variable: skip-completed-text, active when completing in the
828 middle of a word. If enabled, it means that characters in the completion
829 that match characters in the remainder of the word are "skipped" rather
830 than inserted into the line.
831
832 g. The pre-readline-6.0 version of menu completion is available as
833 "old-menu-complete" for users who do not like the readline-6.0 version.
834
835 h. New bindable variable: echo-control-characters. If enabled, and the
836 tty ECHOCTL bit is set, controls the echoing of characters corresponding
837 to keyboard-generated signals.
838
839 i. New bindable variable: enable-meta-key. Controls whether or not readline
840 sends the smm/rmm sequences if the terminal indicates it has a meta key
841 that enables eight-bit characters.
842
843 -------------------------------------------------------------------------------
844 This document details the changes between this version, readline-6.0,
845 and the previous version, readline-5.2.
846
847 1. Changes to Readline
848
849 a. Fixed a number of redisplay errors in environments supporting multibyte
850 characters.
851
852 b. Fixed bugs in vi command mode that caused motion commands to inappropriately
853 set the mark.
854
855 c. When using the arrow keys in vi insertion mode, readline allows movement
856 beyond the current end of the line (unlike command mode).
857
858 d. Fixed bugs that caused readline to loop when the terminal has been taken
859 away and reads return -1/EIO.
860
861 e. Fixed bugs in redisplay occurring when displaying prompts containing
862 invisible characters.
863
864 f. Fixed a bug that caused the completion append character to not be reset to
865 the default after an application-specified completion function changed it.
866
867 g. Fixed a problem that caused incorrect positioning of the cursor while in
868 emacs editing mode when moving forward at the end of a line while using
869 a locale supporting multibyte characters.
870
871 h. Fixed an off-by-one error that caused readline to drop every 511th
872 character of buffered input.
873
874 i. Fixed a bug that resulted in SIGTERM not being caught or cleaned up.
875
876 j. Fixed redisplay bugs caused by multiline prompts with invisible characters
877 or no characters following the final newline.
878
879 k. Fixed redisplay bug caused by prompts consisting solely of invisible
880 characters.
881
882 l. Fixed a bug in the code that buffers characters received very quickly in
883 succession which caused characters to be dropped.
884
885 m. Fixed a bug that caused readline to reference uninitialized data structures
886 if it received a SIGWINCH before completing initialization.
887
888 n. Fixed a bug that caused the vi-mode `last command' to be set incorrectly
889 and therefore unrepeatable.
890
891 o. Fixed a bug that caused readline to disable echoing when it was being used
892 with an output file descriptor that was not a terminal.
893
894 p. Readline now blocks SIGINT while manipulating internal data structures
895 during redisplay.
896
897 q. Fixed a bug in redisplay that caused readline to segfault when pasting a
898 very long line (over 130,000 characters).
899
900 r. Fixed bugs in redisplay when using prompts with no visible printing
901 characters.
902
903 s. Fixed a bug that caused redisplay errors when using prompts with invisible
904 characters and numeric arguments to a command in a multibyte locale.
905
906 t. Fixed a bug that caused redisplay errors when using prompts with invisible
907 characters spanning more than two physical screen lines.
908
909 2. New Features in Readline
910
911 a. A new variable, rl_sort_completion_matches; allows applications to inhibit
912 match list sorting (but beware: some things don't work right if
913 applications do this).
914
915 b. A new variable, rl_completion_invoking_key; allows applications to discover
916 the key that invoked rl_complete or rl_menu_complete.
917
918 c. The functions rl_block_sigint and rl_release_sigint are now public and
919 available to calling applications who want to protect critical sections
920 (like redisplay).
921
922 d. The functions rl_save_state and rl_restore_state are now public and
923 available to calling applications; documented rest of readline's state
924 flag values.
925
926 e. A new user-settable variable, `history-size', allows setting the maximum
927 number of entries in the history list.
928
929 f. There is a new implementation of menu completion, with several improvements
930 over the old; the most notable improvement is a better `completions
931 browsing' mode.
932
933 g. The menu completion code now uses the rl_menu_completion_entry_function
934 variable, allowing applications to provide their own menu completion
935 generators.
936
937 h. There is support for replacing a prefix of a pathname with a `...' when
938 displaying possible completions. This is controllable by setting the
939 `completion-prefix-display-length' variable. Matches with a common prefix
940 longer than this value have the common prefix replaced with `...'.
941
942 i. There is a new `revert-all-at-newline' variable. If enabled, readline will
943 undo all outstanding changes to all history lines when `accept-line' is
944 executed.
945
946 -------------------------------------------------------------------------------
947 This document details the changes between this version, readline-5.2,
948 and the previous version, readline-5.1.
949
950 1. Changes to Readline
951
952 a. Fixed a problem that caused segmentation faults when using readline in
953 callback mode and typing consecutive DEL characters on an empty line.
954
955 b. Fixed several redisplay problems with multibyte characters, all having to
956 do with the different code paths and variable meanings between single-byte
957 and multibyte character redisplay.
958
959 c. Fixed a problem with key sequence translation when presented with the
960 sequence \M-\C-x.
961
962 d. Fixed a problem that prevented the `a' command in vi mode from being
963 undone and redone properly.
964
965 e. Fixed a problem that prevented empty inserts in vi mode from being undone
966 properly.
967
968 f. Fixed a problem that caused readline to initialize with an incorrect idea
969 of whether or not the terminal can autowrap.
970
971 g. Fixed output of key bindings (like bash `bind -p') to honor the setting of
972 convert-meta and use \e where appropriate.
973
974 h. Changed the default filename completion function to call the filename
975 dequoting function if the directory completion hook isn't set. This means
976 that any directory completion hooks need to dequote the directory name,
977 since application-specific hooks need to know how the word was quoted,
978 even if no other changes are made.
979
980 i. Fixed a bug with creating the prompt for a non-interactive search string
981 when there are non-printing characters in the primary prompt.
982
983 j. Fixed a bug that caused prompts with invisible characters to be redrawn
984 multiple times in a multibyte locale.
985
986 k. Fixed a bug that could cause the key sequence scanning code to return the
987 wrong function.
988
989 l. Fixed a problem with the callback interface that caused it to fail when
990 using multi-character keyboard macros.
991
992 m. Fixed a bug that could cause a core dump when an edited history entry was
993 re-executed under certain conditions.
994
995 n. Fixed a bug that caused readline to reference freed memory when attmpting
996 to display a portion of the prompt.
997
998 o. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing
999 the prompt and input line multiple times.
1000
1001 p. Fixed history expansion to not be confused by here-string redirection.
1002
1003 q. Readline no longer treats read errors by converting them to newlines, as
1004 it does with EOF. This caused partial lines to be returned from readline().
1005
1006 r. Fixed a redisplay bug that occurred in multibyte-capable locales when the
1007 prompt was one character longer than the screen width.
1008
1009 2. New Features in Readline
1010
1011 a. Calling applications can now set the keyboard timeout to 0, allowing
1012 poll-like behavior.
1013
1014 b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
1015 the default last-ditch startup file.
1016
1017 c. The history file reading functions now allow windows-like \r\n line
1018 terminators.
1019
1020 -------------------------------------------------------------------------------
1021 This document details the changes between this version, readline-5.1,
1022 and the previous version, readline-5.0.
1023
1024 1. Changes to Readline
1025
1026 a. Fixed a bug that caused multiliine prompts to be wrapped and displayed
1027 incorrectly.
1028
1029 b. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current
1030 line correctly.
1031
1032 c. Fixed a problem in computing the number of invisible characters on the first
1033 line of a prompt whose length exceeds the screen width.
1034
1035 d. Fixed vi-mode searching so that failure preserves the current line rather
1036 than the last line in the history list.
1037
1038 e. Fixed the vi-mode `~' command (change-case) to have the correct behavior at
1039 end-of-line when manipulating multibyte characters.
1040
1041 f. Fixed the vi-mode `r' command (change-char) to have the correct behavior at
1042 end-of-line when manipulating multibyte characters.
1043
1044 g. Fixed multiple bugs in the redisplay of multibyte characters: displaying
1045 prompts longer than the screen width containing multibyte characters,
1046
1047 h. Fix the calculation of the number of physical characters in the prompt
1048 string when it contains multibyte characters.
1049
1050 i. A non-zero value for the `rl_complete_suppress_append' variable now causes
1051 no `/' to be appended to a directory name.
1052
1053 j. Fixed forward-word and backward-word to work when words contained
1054 multibyte characters.
1055
1056 k. Fixed a bug in finding the delimiter of a `?' substring when performing
1057 history expansion in a locale that supports multibyte characters.
1058
1059 l. Fixed a memory leak caused by not freeing the timestamp in a history entry.
1060
1061 m. Fixed a bug that caused "\M-x" style key bindings to not obey the setting
1062 of the `convert-meta' variable.
1063
1064 n. Fixed saving and restoring primary prompt when prompting for incremental
1065 and non-incremental searches; search prompts now display multibyte
1066 characters correctly.
1067
1068 o. Fixed a bug that caused keys originally bound to self-insert but shadowed
1069 by a multi-character key sequence to not be inserted.
1070
1071 p. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't
1072 dereferenced if NULL (matching the documentation).
1073
1074 q. Extensive changes to readline to add enough state so that commands
1075 requiring additional characters (searches, multi-key sequences, numeric
1076 arguments, commands requiring an additional specifier character like
1077 vi-mode change-char, etc.) work without synchronously waiting for
1078 additional input.
1079
1080 r. Lots of changes so readline builds and runs on MinGW.
1081
1082 s. Readline no longer tries to modify the terminal settings when running in
1083 callback mode.
1084
1085 t. The Readline display code no longer sets the location of the last invisible
1086 character in the prompt if the \[\] sequence is empty.
1087
1088 u. The `change-case' command now correctly changes the case of multibyte
1089 characters.
1090
1091 v. Changes to the shared library construction scripts to deal with Windows
1092 DLL naming conventions for Cygwin.
1093
1094 w. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed
1095 SIGWINCH.
1096
1097 x. Fixed the non-incremental search code in vi mode to dispose of any current
1098 undo list when copying a line from the history into the current editing
1099 buffer.
1100
1101 y. Fixed a bug that caused reversing the incremental search direction to
1102 not work correctly.
1103
1104 z. Fixed the vi-mode `U' command to only undo up to the first time insert mode
1105 was entered, as Posix specifies.
1106
1107 aa. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong
1108 place.
1109
1110 bb. Fixed a redisplay bug caused by moving the cursor vertically to a line
1111 with invisible characters in the prompt in a multibyte locale.
1112
1113 cc. Fixed a bug that could cause the terminal special chars to be bound in the
1114 wrong keymap in vi mode.
1115
1116 2. New Features in Readline
1117
1118 a. The key sequence sent by the keypad `delete' key is now automatically
1119 bound to delete-char.
1120
1121 b. A negative argument to menu-complete now cycles backward through the
1122 completion list.
1123
1124 c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
1125 readline will bind the terminal special characters to their readline
1126 equivalents when it's called (on by default).
1127
1128 d. New bindable command: vi-rubout. Saves deleted text for possible
1129 reinsertion, as with any vi-mode `text modification' command; `X' is bound
1130 to this in vi command mode.
1131
1132 e. If the rl_completion_query_items is set to a value < 0, readline never
1133 asks the user whether or not to view the possible completions.
1134
1135 f. The `C-w' binding in incremental search now understands multibyte
1136 characters.
1137
1138 g. New application-callable auxiliary function, rl_variable_value, returns
1139 a string corresponding to a readline variable's value.
1140
1141 h. When parsing inputrc files and variable binding commands, the parser
1142 strips trailing whitespace from values assigned to boolean variables
1143 before checking them.
1144
1145 i. A new external application-controllable variable that allows the LINES
1146 and COLUMNS environment variables to set the window size regardless of
1147 what the kernel returns.
1148
1149 -------------------------------------------------------------------------------
1150 This document details the changes between this version, readline-5.0,
1151 and the previous version, readline-4.3.
1152
1153 1. Changes to Readline
1154
1155 a. Fixes to avoid core dumps because of null pointer references in the
1156 multibyte character code.
1157
1158 b. Fix to avoid infinite recursion caused by certain key combinations.
1159
1160 c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly.
1161
1162 d. Readline no longer tries to read ahead more than one line of input, even
1163 when more is available.
1164
1165 e. Fixed the code that adjusts the point to not mishandle null wide
1166 characters.
1167
1168 f. Fixed a bug in the history expansion `g' modifier that caused it to skip
1169 every other match.
1170
1171 g. Fixed a bug that caused the prompt to overwrite previous output when the
1172 output doesn't contain a newline and the locale supports multibyte
1173 characters. This same change fixes the problem of readline redisplay
1174 slowing down dramatically as the line gets longer in multibyte locales.
1175
1176 h. History traversal with arrow keys in vi insertion mode causes the cursor
1177 to be placed at the end of the new line, like in emacs mode.
1178
1179 i. The locale initialization code does a better job of using the right
1180 precedence and defaulting when checking the appropriate environment
1181 variables.
1182
1183 j. Fixed the history word tokenizer to handle <( and >( better when used as
1184 part of bash.
1185
1186 k. The overwrite mode code received several bug fixes to improve undo.
1187
1188 l. Many speedups to the multibyte character redisplay code.
1189
1190 m. The callback character reading interface should not hang waiting to read
1191 keyboard input.
1192
1193 n. Fixed a bug with redoing vi-mode `s' command.
1194
1195 o. The code that initializes the terminal tracks changes made to the terminal
1196 special characters with stty(1) (or equivalent), so that these changes
1197 are reflected in the readline bindings. New application-callable function
1198 to make it work: rl_tty_unset_default_bindings().
1199
1200 p. Fixed a bug that could cause garbage to be inserted in the buffer when
1201 changing character case in vi mode when using a multibyte locale.
1202
1203 q. Fixed a bug in the redisplay code that caused problems on systems
1204 supporting multibyte characters when moving between history lines when the
1205 new line has more glyphs but fewer bytes.
1206
1207 r. Undo and redo now work better after exiting vi insertion mode.
1208
1209 s. Make sure system calls are restarted after a SIGWINCH is received using
1210 SA_RESTART.
1211
1212 t. Improvements to the code that displays possible completions when using
1213 multibyte characters.
1214
1215 u. Fixed a problem when parsing nested if statements in inputrc files.
1216
1217 v. The completer now takes multibyte characters into account when looking for
1218 quoted substrings on which to perform completion.
1219
1220 w. The history search functions now perform better bounds checking on the
1221 history list.
1222
1223 x. Change to history expansion functions to treat `^' as equivalent to word
1224 one, as the documentation states.
1225
1226 y. Some changes to the display code to improve display and redisplay of
1227 multibyte characters.
1228
1229 z. Changes to speed up the multibyte character redisplay code.
1230
1231 aa. Fixed a bug in the vi-mode `E' command that caused it to skip over the
1232 last character of a word if invoked while point was on the word's
1233 next-to-last character.
1234
1235 bb. Fixed a bug that could cause incorrect filename quoting when
1236 case-insensitive completion was enabled and the word being completed
1237 contained backslashes quoting word break characters.
1238
1239 cc. Fixed a bug in redisplay triggered when the prompt string contains
1240 invisible characters.
1241
1242 dd. Fixed some display (and other) bugs encountered in multibyte locales
1243 when a non-ascii character was the last character on a line.
1244
1245 ee. Fixed some display bugs caused by multibyte characters in prompt strings.
1246
1247 ff. Fixed a problem with history expansion caused by non-whitespace characters
1248 used as history word delimiters.
1249
1250 gg. Fixed a problem that could cause readline to refer to freed memory when
1251 moving between history lines while doing searches.
1252
1253 hh. Improvements to the code that expands and displays prompt strings
1254 containing multibyte characters.
1255
1256 ii. Fixed a problem with vi-mode not correctly remembering the numeric argument
1257 to the last `c'hange command for later use with `.'.
1258
1259 jj. Fixed a bug in vi-mode that caused multi-digit count arguments to work
1260 incorrectly.
1261
1262 kk. Fixed a problem in vi-mode that caused the last text modification command
1263 to not be remembered across different command lines.
1264
1265 ll. Fixed problems with changing characters and changing case at the end of
1266 the line.
1267
1268 mm. Fixed a problem with readline saving the contents of the current line
1269 before beginning a non-interactive search.
1270
1271 nn. Fixed a problem with EOF detection when using rl_event_hook.
1272
1273 oo. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric
1274 arguments.
1275
1276 2. New Features in Readline
1277
1278 a. History expansion has a new `a' modifier equivalent to the `g' modifier
1279 for compatibility with the BSD csh.
1280
1281 b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
1282 modifier, which performs a substitution once per word.
1283
1284 c. All non-incremental search operations may now undo the operation of
1285 replacing the current line with the history line.
1286
1287 d. The text inserted by an `a' command in vi mode can be reinserted with
1288 `.'.
1289
1290 e. New bindable variable, `show-all-if-unmodified'. If set, the readline
1291 completer will list possible completions immediately if there is more
1292 than one completion and partial completion cannot be performed.
1293
1294 f. There is a new application-callable `free_history_entry()' function.
1295
1296 g. History list entries now contain timestamp information; the history file
1297 functions know how to read and write timestamp information associated
1298 with each entry.
1299
1300 h. Four new key binding functions have been added:
1301
1302 rl_bind_key_if_unbound()
1303 rl_bind_key_if_unbound_in_map()
1304 rl_bind_keyseq_if_unbound()
1305 rl_bind_keyseq_if_unbound_in_map()
1306
1307 i. New application variable, rl_completion_quote_character, set to any
1308 quote character readline finds before it calls the application completion
1309 function.
1310
1311 j. New application variable, rl_completion_suppress_quote, settable by an
1312 application completion function. If set to non-zero, readline does not
1313 attempt to append a closing quote to a completed word.
1314
1315 k. New application variable, rl_completion_found_quote, set to a non-zero
1316 value if readline determines that the word to be completed is quoted.
1317 Set before readline calls any application completion function.
1318
1319 l. New function hook, rl_completion_word_break_hook, called when readline
1320 needs to break a line into words when completion is attempted. Allows
1321 the word break characters to vary based on position in the line.
1322
1323 m. New bindable command: unix-filename-rubout. Does the same thing as
1324 unix-word-rubout, but adds `/' to the set of word delimiters.
1325
1326 n. When listing completions, directories have a `/' appended if the
1327 `mark-directories' option has been enabled.
1328
1329 -------------------------------------------------------------------------------
1330 This document details the changes between this version, readline-4.3,
1331 and the previous version, readline-4.2a.
1332
1333 1. Changes to Readline
1334
1335 a. Fixed output of comment-begin character when listing variable values.
1336
1337 b. Added some default key bindings for common escape sequences produced by
1338 HOME and END keys.
1339
1340 c. Fixed the mark handling code to be more emacs-compatible.
1341
1342 d. A bug was fixed in the code that prints possible completions to keep it
1343 from printing empty strings in certain circumstances.
1344
1345 e. Change the key sequence printing code to print ESC as M\- if ESC is a
1346 meta-prefix character -- it's easier for users to understand than \e.
1347
1348 f. Fixed unstifle_history() to return values that match the documentation.
1349
1350 g. Fixed the event loop (rl_event_hook) to handle the case where the input
1351 file descriptor is invalidated.
1352
1353 h. Fixed the prompt display code to work better when the application has a
1354 custom redisplay function.
1355
1356 i. Changes to make reading and writing the history file a little faster, and
1357 to cope with huge history files without calling abort(3) from xmalloc.
1358
1359 j. The vi-mode `S' and `s' commands are now undone correctly.
1360
1361 k. Fixed a problem which caused the display to be messed up when the last
1362 line of a multi-line prompt (possibly containing invisible characters)
1363 was longer than the screen width.
1364
1365 2. New Features in Readline
1366
1367 a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both
1368 be bound to readline functions. Now the arrow keys may be used in vi
1369 insert mode.
1370
1371 b. When listing completions, and the number of lines displayed is more than
1372 the screen length, readline uses an internal pager to display the results.
1373 This is controlled by the `page-completions' variable (default on).
1374
1375 c. New code to handle editing and displaying multibyte characters.
1376
1377 d. The behavior introduced in bash-2.05a of deciding whether or not to
1378 append a slash to a completed name that is a symlink to a directory has
1379 been made optional, controlled by the `mark-symlinked-directories'
1380 variable (default is the 2.05a behavior).
1381
1382 e. The `insert-comment' command now acts as a toggle if given a numeric
1383 argument: if the first characters on the line don't specify a
1384 comment, insert one; if they do, delete the comment text
1385
1386 f. New application-settable completion variable:
1387 rl_completion_mark_symlink_dirs, allows an application's completion
1388 function to temporarily override the user's preference for appending
1389 slashes to names which are symlinks to directories.
1390
1391 g. New function available to application completion functions:
1392 rl_completion_mode, to tell how the completion function was invoked
1393 and decide which argument to supply to rl_complete_internal (to list
1394 completions, etc.).
1395
1396 h. Readline now has an overwrite mode, toggled by the `overwrite-mode'
1397 bindable command, which could be bound to `Insert'.
1398
1399 i. New application-settable completion variable:
1400 rl_completion_suppress_append, inhibits appending of
1401 rl_completion_append_character to completed words.
1402
1403 j. New key bindings when reading an incremental search string: ^W yanks
1404 the currently-matched word out of the current line into the search
1405 string; ^Y yanks the rest of the current line into the search string,
1406 DEL or ^H deletes characters from the search string.
1407
1408 -------------------------------------------------------------------------------
1409 This document details the changes between this version, readline-4.2a,
1410 and the previous version, readline-4.2.
1411
1412 1. Changes to Readline
1413
1414 a. More `const' and type casting fixes.
1415
1416 b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer
1417 overflow problems.
1418
1419 c. The completion code no longer appends a `/' or ` ' to a match when
1420 completing a symbolic link that resolves to a directory name, unless
1421 the match does not add anything to the word being completed. This
1422 means that a tab will complete the word up to the full name, but not
1423 add anything, and a subsequent tab will add a slash.
1424
1425 d. Fixed a trivial typo that made the vi-mode `dT' command not work.
1426
1427 e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert.
1428
1429 f. Fixed the tty code so that ^V works more than once.
1430
1431 g. Changed the use of __P((...)) for function prototypes to PARAMS((...))
1432 because the use of __P in typedefs conflicted g++ and glibc.
1433
1434 h. The completion code now attempts to do a better job of preserving the
1435 case of the word the user typed if ignoring case in completions.
1436
1437 i. Readline defaults to not echoing the input and lets the terminal
1438 initialization code enable echoing if there is a controlling terminal.
1439
1440 j. The key binding code now processes only two hex digits after a `\x'
1441 escape sequence, and the documentation was changed to note that the
1442 octal and hex escape sequences result in an eight-bit value rather
1443 than strict ASCII.
1444
1445 k. Fixed a few places where negative array subscripts could have occurred.
1446
1447 l. Fixed the vi-mode code to use a better method to determine the bounds of
1448 the array used to hold the marks, and to avoid out-of-bounds references.
1449
1450 m. Fixed the defines in chardefs.h to work better when chars are signed.
1451
1452 n. Fixed configure.in to use the new names for bash autoconf macros.
1453
1454 o. Readline no longer attempts to define its own versions of some ctype
1455 macros if they are implemented as functions in libc but not as macros in
1456 <ctype.h>.
1457
1458 p. Fixed a problem where rl_backward could possibly set point to before
1459 the beginning of the line.
1460
1461 q. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause
1462 include file problems.
1463
1464 2. New Features in Readline
1465
1466 a. Added extern declaration for rl_get_termcap to readline.h, making it a
1467 public function (it was always there, just not in readline.h).
1468
1469 b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402,
1470 RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2.
1471
1472 c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION.
1473
1474 d. New bindable boolean readline variable: match-hidden-files. Controls
1475 completion of files beginning with a `.' (on Unix). Enabled by default.
1476
1477 e. The history expansion code now allows any character to terminate a
1478 `:first-' modifier, like csh.
1479
1480 f. The incremental search code remembers the last search string and uses
1481 it if ^R^R is typed without a search string.
1482
1483 h. New bindable variable `history-preserve-point'. If set, the history
1484 code attempts to place the user at the same location on each history
1485 line retrieved with previous-history or next-history.
1486
1487 -------------------------------------------------------------------------------
1488 This document details the changes between this version, readline-4.2,
1489 and the previous version, readline-4.1.
1490
1491 1. Changes to Readline
1492
1493 a. When setting the terminal attributes on systems using `struct termio',
1494 readline waits for output to drain before changing the attributes.
1495
1496 b. A fix was made to the history word tokenization code to avoid attempts to
1497 dereference a null pointer.
1498
1499 c. Readline now defaults rl_terminal_name to $TERM if the calling application
1500 has left it unset, and tries to initialize with the resultant value.
1501
1502 d. Instead of calling (*rl_getc_function)() directly to get input in certain
1503 places, readline now calls rl_read_key() consistently.
1504
1505 e. Fixed a bug in the completion code that allowed a backslash to quote a
1506 single quote inside a single-quoted string.
1507
1508 f. rl_prompt is no longer assigned directly from the argument to readline(),
1509 but uses memory allocated by readline. This allows constant strings to
1510 be passed to readline without problems arising when the prompt processing
1511 code wants to modify the string.
1512
1513 g. Fixed a bug that caused non-interactive history searches to return the
1514 wrong line when performing multiple searches backward for the same string.
1515
1516 h. Many variables, function arguments, and function return values are now
1517 declared `const' where appropriate, to improve behavior when linking with
1518 C++ code.
1519
1520 i. The control character detection code now works better on systems where
1521 `char' is unsigned by default.
1522
1523 j. The vi-mode numeric argument is now capped at 999999, just like emacs mode.
1524
1525 k. The Function, CPFunction, CPPFunction, and VFunction typedefs have been
1526 replaced with a set of specific prototyped typedefs, though they are
1527 still in the readline header files for backwards compatibility.
1528
1529 m. Nearly all of the (undocumented) internal global variables in the library
1530 now have an _rl_ prefix -- there were a number that did not, like
1531 screenheight, screenwidth, alphabetic, etc.
1532
1533 n. The ding() convenience function has been renamed to rl_ding(), though the
1534 old function is still defined for backwards compatibility.
1535
1536 o. The completion convenience functions filename_completion_function,
1537 username_completion_function, and completion_matches now have an rl_
1538 prefix, though the old names are still defined for backwards compatibility.
1539
1540 p. The functions shared by readline and bash (linkage is satisfied from bash
1541 when compiling with bash, and internally otherwise) now have an sh_ prefix.
1542
1543 q. Changed the shared library creation procedure on Linux and BSD/OS 4.x so
1544 that the `soname' contains only the major version number rather than the
1545 major and minor numbers.
1546
1547 r. Fixed a redisplay bug that occurred when the prompt spanned more than one
1548 physical line and contained invisible characters.
1549
1550 s. Added a missing `includedir' variable to the Makefile.
1551
1552 t. When installing the shared libraries, make sure symbolic links are relative.
1553
1554 u. Added configure test so that it can set `${MAKE}' appropriately.
1555
1556 v. Fixed a bug in rl_forward that could cause the point to be set to before
1557 the beginning of the line in vi mode.
1558
1559 w. Fixed a bug in the callback read-char interface to make it work when a
1560 readline function pushes some input onto the input stream with
1561 rl_execute_next (like the incremental search functions).
1562
1563 x. Fixed a file descriptor leak in the history file manipulation code that
1564 was tripped when attempting to truncate a non-regular file (like
1565 /dev/null).
1566
1567 y. Changes to make all of the exported readline functions declared in
1568 readline.h have an rl_ prefix (rltty_set_default_bindings is now
1569 rl_tty_set_default_bindings, crlf is now rl_crlf, etc.)
1570
1571 z. The formatted documentation included in the base readline distribution
1572 is no longer removed on a `make distclean'.
1573
1574 aa. Some changes were made to avoid gcc warnings with -Wall.
1575
1576 bb. rl_get_keymap_by_name now finds keymaps case-insensitively, so
1577 `set keymap EMACS' works.
1578
1579 cc. The history file writing and truncation functions now return a useful
1580 status on error.
1581
1582 dd. Fixed a bug that could cause applications to dereference a NULL pointer
1583 if a NULL second argument was passed to history_expand().
1584
1585 ee. If a hook function assigned to rl_event_hook sets rl_done to a non-zero
1586 value, rl_read_key() now immediately returns '\n' (which is assumed to
1587 be bound to accept-line).
1588
1589 2. New Features in Readline
1590
1591 a. The blink timeout for paren matching is now settable by applications,
1592 via the rl_set_paren_blink_timeout() function.
1593
1594 b. _rl_executing_macro has been renamed to rl_executing_macro, which means
1595 it's now part of the public interface.
1596
1597 c. Readline has a new variable, rl_readline_state, which is a bitmap that
1598 encapsulates the current state of the library; intended for use by
1599 callbacks and hook functions.
1600
1601 d. rlfe has a new -l option to log input and output (-a appends to logfile),
1602 a new -n option to set the readline application name, and -v and -h
1603 options for version and help information.
1604
1605 e. rlfe can now perform filename completion for the inferior process if the
1606 OS has a /proc/<PID>/cwd that can be read with readlink(2) to get the
1607 inferior's current working directory.
1608
1609 f. A new file, rltypedefs.h, contains the new typedefs for function pointers
1610 and is installed by `make install'.
1611
1612 g. New application-callable function rl_set_prompt(const char *prompt):
1613 expands its prompt string argument and sets rl_prompt to the result.
1614
1615 h. New application-callable function rl_set_screen_size(int rows, int cols):
1616 public method for applications to set readline's idea of the screen
1617 dimensions.
1618
1619 i. The history example program (examples/histexamp.c) is now built as one
1620 of the examples.
1621
1622 j. The documentation has been updated to cover nearly all of the public
1623 functions and variables declared in readline.h.
1624
1625 k. New function, rl_get_screen_size (int *rows, int *columns), returns
1626 readline's idea of the screen dimensions.
1627
1628 l. The timeout in rl_gather_tyi (readline keyboard input polling function)
1629 is now settable via a function (rl_set_keyboard_input_timeout()).
1630
1631 m. Renamed the max_input_history variable to history_max_entries; the old
1632 variable is maintained for backwards compatibility.
1633
1634 n. The list of characters that separate words for the history tokenizer is
1635 now settable with a variable: history_word_delimiters. The default
1636 value is as before.
1637
1638 o. There is a new history.3 manual page documenting the history library.
1639
1640 -------------------------------------------------------------------------------
1641 This document details the changes between this version, readline-4.1,
1642 and the previous version, readline-4.0.
1643
1644 1. Changes to Readline
1645
1646 a. Changed the HTML documents so that the table-of-contents is no longer
1647 a separate file.
1648
1649 b. Changes to the shared object configuration for: Irix 5.x, Irix 6.x,
1650 OSF/1.
1651
1652 c. The shared library major and minor versions are now constructed
1653 automatically by configure and substituted into the makefiles.
1654
1655 d. It's now possible to install the shared libraries separately from the
1656 static libraries.
1657
1658 e. The history library tries to truncate the history file only if it is a
1659 regular file.
1660
1661 f. A bug that caused _rl_dispatch to address negative array indices on
1662 systems with signed chars was fixed.
1663
1664 g. rl-yank-nth-arg now leaves the history position the same as when it was
1665 called.
1666
1667 h. Changes to the completion code to handle MS-DOS drive-letter:pathname
1668 filenames.
1669
1670 i. Completion is now case-insensitive by default on MS-DOS.
1671
1672 j. Fixes to the history file manipulation code for MS-DOS.
1673
1674 k. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS.
1675
1676 l. Some fixes were made to the redisplay code for better operation on MS-DOS.
1677
1678 m. The quoted-insert code will now insert tty special chars like ^C.
1679
1680 n. A bug was fixed that caused the display code to reference memory before
1681 the start of the prompt string.
1682
1683 o. More support for __EMX__ (OS/2).
1684
1685 p. A bug was fixed in readline's signal handling that could cause infinite
1686 recursion in signal handlers.
1687
1688 q. A bug was fixed that caused the point to be less than zero when rl_forward
1689 was given a very large numeric argument.
1690
1691 r. The vi-mode code now gets characters via the application-settable value
1692 of rl_getc_function rather than calling rl_getc directly.
1693
1694 s. The history file code now uses O_BINARY mode when reading and writing
1695 the history file on cygwin32.
1696
1697 t. Fixed a bug in the redisplay code for lines with more than 256 line
1698 breaks.
1699
1700 u. A bug was fixed which caused invisible character markers to not be
1701 stripped from the prompt string if the terminal was in no-echo mode.
1702
1703 v. Readline no longer tries to get the variables it needs for redisplay
1704 from the termcap entry if the calling application has specified its
1705 own redisplay function. Readline treats the terminal as `dumb' in
1706 this case.
1707
1708 w. Fixes to the SIGWINCH code so that a multiple-line prompt with escape
1709 sequences is redrawn correctly.
1710
1711 x. Changes to the install and install-shared targets so that the libraries
1712 and header files are installed separately.
1713
1714 2. New Features in Readline
1715
1716 a. A new Readline `user manual' is in doc/rluserman.texinfo.
1717
1718 b. Parentheses matching is now always compiled into readline, and enabled
1719 or disabled when the value of the `blink-matching-paren' variable is
1720 changed.
1721
1722 c. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
1723
1724 d. MS-DOS systems now use ~/_history as the default history file.
1725
1726 e. history-search-{forward,backward} now leave the point at the end of the
1727 line when the string to search for is empty, like
1728 {reverse,forward}-search-history.
1729
1730 f. history-search-{forward,backward} now leave the last history line found
1731 in the readline buffer if the second or subsequent search fails.
1732
1733 g. New function for use by applications: rl_on_new_line_with_prompt, used
1734 when an application displays the prompt itself before calling readline().
1735
1736 h. New variable for use by applications: rl_already_prompted. An application
1737 that displays the prompt itself before calling readline() must set this to
1738 a non-zero value.
1739
1740 i. A new variable, rl_gnu_readline_p, always 1. The intent is that an
1741 application can verify whether or not it is linked with the `real'
1742 readline library or some substitute.
1743
1744 j. Per Bothner's `rlfe' (pronounced `Ralphie') readline front-end program
1745 is included in the examples subdirectory, though it is not built
1746 by default.
1747
1748 -------------------------------------------------------------------------------
1749 This document details the changes between this version, readline-4.0,
1750 and the previous version, readline-2.2.
1751
1752 1. Changes to Readline
1753
1754 a. The version number is now 4.0, to match the major and minor version
1755 numbers on the shared readline and history libraries. Future
1756 releases will maintain the identical numbering.
1757
1758 b. Fixed a typo in the `make install' recipe that copied libreadline.a
1759 to libhistory.old right after installing it.
1760
1761 c. The readline and history info files are now installed out of the source
1762 directory if they are not found in the build directory.
1763
1764 d. The library no longer exports a function named `savestring' -- backwards
1765 compatibility be damned.
1766
1767 e. There is no longer any #ifdef SHELL code in the source files.
1768
1769 f. Some changes were made to the key binding code to fix memory leaks and
1770 better support Win32 systems.
1771
1772 g. Fixed a silly typo in the paren matching code -- it's microseconds, not
1773 milliseconds.
1774
1775 h. The readline library should be compilable by C++ compilers.
1776
1777 i. The readline.h public header file now includes function prototypes for
1778 all readline functions, and some changes were made to fix errors in the
1779 source files uncovered by the use of prototypes.
1780
1781 j. The maximum numeric argument is now clamped at 1000000.
1782
1783 k. Fixes to rl_yank_last_arg to make it behave better.
1784
1785 l. Fixed a bug in the display code that caused core dumps if the prompt
1786 string length exceeded 1024 characters.
1787
1788 m. The menu completion code was fixed to properly insert a single completion
1789 if there is only one match.
1790
1791 n. A bug was fixed that caused the display code to improperly display tabs
1792 after newlines.
1793
1794 o. A fix was made to the completion code in which a typo caused the wrong
1795 value to be passed to the function that computed the longest common
1796 prefix of the list of matches.
1797
1798 p. The completion code now checks the value of rl_filename_completion_desired,
1799 which is set by application-supplied completion functions to indicate
1800 that filename completion is being performed, to decide whether or not to
1801 call an application-supplied `ignore completions' function.
1802
1803 q. Code was added to the history library to catch history substitutions
1804 using `&' without a previous history substitution or search having been
1805 performed.
1806
1807
1808 2. New Features in Readline
1809
1810 a. There is a new script, support/shobj-conf, to do system-specific shared
1811 object and library configuration. It generates variables for configure
1812 to substitute into makefiles. The README file provides a detailed
1813 explanation of the shared library creation process.
1814
1815 b. Shared libraries and objects are now built in the `shlib' subdirectory.
1816 There is a shlib/Makefile.in to control the build process. `make shared'
1817 from the top-level directory is still the right way to build shared
1818 versions of the libraries.
1819
1820 c. rlconf.h is now installed, so applications can find out which features
1821 have been compiled into the installed readline and history libraries.
1822
1823 d. rlstdc.h is now an installed header file.
1824
1825 e. Many changes to the signal handling:
1826 o Readline now catches SIGQUIT and cleans up the tty before returning;
1827 o A new variable, rl_catch_signals, is available to application writers
1828 to indicate to readline whether or not it should install its own
1829 signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
1830 SIGTTIN, and SIGTTOU;
1831 o A new variable, rl_catch_sigwinch, is available to application
1832 writers to indicate to readline whether or not it should install its
1833 own signal handler for SIGWINCH, which will chain to the calling
1834 applications's SIGWINCH handler, if one is installed;
1835 o There is a new function, rl_free_line_state, for application signal
1836 handlers to call to free up the state associated with the current
1837 line after receiving a signal;
1838 o There is a new function, rl_cleanup_after_signal, to clean up the
1839 display and terminal state after receiving a signal;
1840 o There is a new function, rl_reset_after_signal, to reinitialize the
1841 terminal and display state after an application signal handler
1842 returns and readline continues
1843
1844 f. There is a new function, rl_resize_terminal, to reset readline's idea of
1845 the screen size after a SIGWINCH.
1846
1847 g. New public functions: rl_save_prompt and rl_restore_prompt. These were
1848 previously private functions with a `_' prefix. These functions are
1849 used when an application wants to write a message to the `message area'
1850 with rl_message and have the prompt restored correctly when the message
1851 is erased.
1852
1853 h. New function hook: rl_pre_input_hook, called just before readline starts
1854 reading input, after initialization.
1855
1856 i. New function hook: rl_display_matches_hook, called when readline would
1857 display the list of completion matches. The new function
1858 rl_display_match_list is what readline uses internally, and is available
1859 for use by application functions called via this hook.
1860
1861 j. New bindable function, delete-char-or-list, like tcsh.
1862
1863 k. A new variable, rl_erase_empty_line, which, if set by an application using
1864 readline, will cause readline to erase, prompt and all, lines on which the
1865 only thing typed was a newline.
1866
1867 l. There is a new script, support/shlib-install, to install and uninstall
1868 the shared readline and history libraries.
1869
1870 m. A new bindable variable, `isearch-terminators', which is a string
1871 containing the set of characters that should terminate an incremental
1872 search without being executed as a command.
1873
1874 n. A new bindable function, forward-backward-delete-char.
1875
1876 -------------------------------------------------------------------------------
1877 This document details the changes between this version, readline-2.2,
1878 and the previous version, readline-2.1.
1879
1880 1. Changes to Readline
1881
1882 a. Added a missing `extern' to a declaration in readline.h that kept
1883 readline from compiling cleanly on some systems.
1884
1885 b. The history file is now opened with mode 0600 when it is written for
1886 better security.
1887
1888 c. Changes were made to the SIGWINCH handling code so that prompt redisplay
1889 is done better.
1890
1891 d. ^G now interrupts incremental searches correctly.
1892
1893 e. A bug that caused a core dump when the set of characters to be quoted
1894 when completing words was empty was fixed.
1895
1896 f. Fixed a problem in the readline test program rltest.c that caused a core
1897 dump.
1898
1899 g. The code that handles parser directives in inputrc files now displays
1900 more error messages.
1901
1902 h. The history expansion code was fixed so that the appearance of the
1903 history comment character at the beginning of a word inhibits history
1904 expansion for that word and the rest of the input line.
1905
1906 i. The code that prints completion listings now behaves better if one or
1907 more of the filenames contains non-printable characters.
1908
1909 j. The time delay when showing matching parentheses is now 0.5 seconds.
1910
1911
1912 2. New Features in Readline
1913
1914 a. There is now an option for `iterative' yank-last-arg handline, so a user
1915 can keep entering `M-.', yanking the last argument of successive history
1916 lines.
1917
1918 b. New variable, `print-completions-horizontally', which causes completion
1919 matches to be displayed across the screen (like `ls -x') rather than up
1920 and down the screen (like `ls').
1921
1922 c. New variable, `completion-ignore-case', which causes filename completion
1923 and matching to be performed case-insensitively.
1924
1925 d. There is a new bindable command, `magic-space', which causes history
1926 expansion to be performed on the current readline buffer and a space to
1927 be inserted into the result.
1928
1929 e. There is a new bindable command, `menu-complete', which enables tcsh-like
1930 menu completion (successive executions of menu-complete insert a single
1931 completion match, cycling through the list of possible completions).
1932
1933 f. There is a new bindable command, `paste-from-clipboard', for use on Win32
1934 systems, to insert the text from the Win32 clipboard into the editing
1935 buffer.
1936
1937 g. The key sequence translation code now understands printf-style backslash
1938 escape sequences, including \NNN octal escapes. These escape sequences
1939 may be used in key sequence definitions or macro values.
1940
1941 h. An `$include' inputrc file parser directive has been added.