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