-Wwrite-strings: execute_command calls with string literals
[deliverable/binutils-gdb.git] / readline / CHANGES
1 This document details the changes between this version, readline-6.2,
2 and the previous version, readline-6.1.
3
4 1. Changes to Readline
5
6 a. Fixed a bug that caused the unconverted filename to be added to the list of
7 completions when the application specified filename conversion functions.
8
9 b. Fixed a bug that caused the wrong filename to be passed to opendir when the
10 application has specified a filename dequoting function.
11
12 c. Fixed a bug when repeating a character search in vi mode in the case where
13 there was no search to repeat.
14
15 d. When show-all-if-ambiguous is set, the completion routines no longer insert
16 a common match prefix that is shorter than the text being completed.
17
18 e. The full set of vi editing commands may now be used in callback mode.
19
20 f. Fixed a bug that caused readline to not update its idea of the terminal
21 dimensions while running in `no-echo' mode.
22
23 h. Fixed a bug that caused readline to dump core if an application called
24 rl_prep_terminal without setting rl_instream.
25
26 i. Fixed a bug that caused meta-prefixed characters bound to incremental
27 search forward or backward to not be recognized if they were typed
28 subsequently.
29
30 j. The incremental search code treats key sequences that map to the same
31 functions as (default) ^G, ^W, and ^Y as equivalent to those characters.
32
33 k. Fixed a bug in menu-complete that caused it to misbehave with large
34 negative argument.
35
36 l. Fixed a bug that caused vi-mode yank-last-arg to ring the bell when invoked
37 at the end of the line.
38
39 m. Fixed a bug that made an explicit argument of 0 to yank-last-arg behave
40 as if it were a negative argument.
41
42 n. Fixed a bug that caused directory names in words to be completed to not
43 be dequoted correctly.
44
45 2. New Features in Readline
46
47 a. The history library does not try to write the history filename in the
48 current directory if $HOME is unset. This closes a potential security
49 problem if the application does not specify a history filename.
50
51 b. New bindable variable `completion-display-width' to set the number of
52 columns used when displaying completions.
53
54 c. New bindable variable `completion-case-map' to cause case-insensitive
55 completion to treat `-' and `_' as identical.
56
57 d. There are new bindable vi-mode command names to avoid readline's case-
58 insensitive matching not allowing them to be bound separately.
59
60 e. New bindable variable `menu-complete-display-prefix' causes the menu
61 completion code to display the common prefix of the possible completions
62 before cycling through the list, instead of after.
63
64 -------------------------------------------------------------------------------
65 This document details the changes between this version, readline-6.1,
66 and the previous version, readline-6.0.
67
68 1. Changes to Readline
69
70 a. The SIGWINCH signal handler now avoids calling the redisplay code if
71 one arrives while in the middle of redisplay.
72
73 b. Changes to the timeout code to make sure that timeout values greater
74 than one second are handled better.
75
76 c. Fixed a bug in the redisplay code that was triggered by a prompt
77 containing invisible characters exactly the width of the screen.
78
79 d. Fixed a bug in the redisplay code encountered when running in horizontal
80 scroll mode.
81
82 e. Fixed a bug that prevented menu completion from properly completing
83 filenames.
84
85 f. Fixed a redisplay bug caused by a multibyte character causing a line to
86 wrap.
87
88 g. Fixed a bug that caused key sequences of two characters to not be
89 recognized when a longer sequence identical in the first two characters
90 was bound.
91
92 h. Fixed a bug that caused history expansion to be attempted on $'...'
93 single-quoted strings.
94
95 i. Fixed a bug that caused incorrect redisplay when the prompt contained
96 multibyte characters in an `invisible' sequence bracketed by \[ and
97 \].
98
99 j. Fixed a bug that caused history expansion to short-circuit after
100 encountering a multibyte character.
101
102 k. Fixed a bug that caused applications using the callback interface to not
103 react to SIGINT (or other signals) until another character arrived.
104
105 2. New Features in Readline
106
107 a. New bindable function: menu-complete-backward.
108
109 b. In the vi insertion keymap, C-n is now bound to menu-complete by default,
110 and C-p to menu-complete-backward.
111
112 c. When in vi command mode, repeatedly hitting ESC now does nothing, even
113 when ESC introduces a bound key sequence. This is closer to how
114 historical vi behaves.
115
116 d. New bindable function: skip-csi-sequence. Can be used as a default to
117 consume key sequences generated by keys like Home and End without having
118 to bind all keys.
119
120 e. New application-settable function: rl_filename_rewrite_hook. Can be used
121 to rewite or modify filenames read from the file system before they are
122 compared to the word to be completed.
123
124 f. New bindable variable: skip-completed-text, active when completing in the
125 middle of a word. If enabled, it means that characters in the completion
126 that match characters in the remainder of the word are "skipped" rather
127 than inserted into the line.
128
129 g. The pre-readline-6.0 version of menu completion is available as
130 "old-menu-complete" for users who do not like the readline-6.0 version.
131
132 h. New bindable variable: echo-control-characters. If enabled, and the
133 tty ECHOCTL bit is set, controls the echoing of characters corresponding
134 to keyboard-generated signals.
135
136 i. New bindable variable: enable-meta-key. Controls whether or not readline
137 sends the smm/rmm sequences if the terminal indicates it has a meta key
138 that enables eight-bit characters.
139
140 -------------------------------------------------------------------------------
141 This document details the changes between this version, readline-6.0,
142 and the previous version, readline-5.2.
143
144 1. Changes to Readline
145
146 a. Fixed a number of redisplay errors in environments supporting multibyte
147 characters.
148
149 b. Fixed bugs in vi command mode that caused motion commands to inappropriately
150 set the mark.
151
152 c. When using the arrow keys in vi insertion mode, readline allows movement
153 beyond the current end of the line (unlike command mode).
154
155 d. Fixed bugs that caused readline to loop when the terminal has been taken
156 away and reads return -1/EIO.
157
158 e. Fixed bugs in redisplay occurring when displaying prompts containing
159 invisible characters.
160
161 f. Fixed a bug that caused the completion append character to not be reset to
162 the default after an application-specified completion function changed it.
163
164 g. Fixed a problem that caused incorrect positioning of the cursor while in
165 emacs editing mode when moving forward at the end of a line while using
166 a locale supporting multibyte characters.
167
168 h. Fixed an off-by-one error that caused readline to drop every 511th
169 character of buffered input.
170
171 i. Fixed a bug that resulted in SIGTERM not being caught or cleaned up.
172
173 j. Fixed redisplay bugs caused by multiline prompts with invisible characters
174 or no characters following the final newline.
175
176 k. Fixed redisplay bug caused by prompts consisting solely of invisible
177 characters.
178
179 l. Fixed a bug in the code that buffers characters received very quickly in
180 succession which caused characters to be dropped.
181
182 m. Fixed a bug that caused readline to reference uninitialized data structures
183 if it received a SIGWINCH before completing initialzation.
184
185 n. Fixed a bug that caused the vi-mode `last command' to be set incorrectly
186 and therefore unrepeatable.
187
188 o. Fixed a bug that caused readline to disable echoing when it was being used
189 with an output file descriptor that was not a terminal.
190
191 p. Readline now blocks SIGINT while manipulating internal data structures
192 during redisplay.
193
194 q. Fixed a bug in redisplay that caused readline to segfault when pasting a
195 very long line (over 130,000 characters).
196
197 r. Fixed bugs in redisplay when using prompts with no visible printing
198 characters.
199
200 s. Fixed a bug that caused redisplay errors when using prompts with invisible
201 characters and numeric arguments to a command in a multibyte locale.
202
203 t. Fixed a bug that caused redisplay errors when using prompts with invisible
204 characters spanning more than two physical screen lines.
205
206 2. New Features in Readline
207
208 a. A new variable, rl_sort_completion_matches; allows applications to inhibit
209 match list sorting (but beware: some things don't work right if
210 applications do this).
211
212 b. A new variable, rl_completion_invoking_key; allows applications to discover
213 the key that invoked rl_complete or rl_menu_complete.
214
215 c. The functions rl_block_sigint and rl_release_sigint are now public and
216 available to calling applications who want to protect critical sections
217 (like redisplay).
218
219 d. The functions rl_save_state and rl_restore_state are now public and
220 available to calling applications; documented rest of readline's state
221 flag values.
222
223 e. A new user-settable variable, `history-size', allows setting the maximum
224 number of entries in the history list.
225
226 f. There is a new implementation of menu completion, with several improvements
227 over the old; the most notable improvement is a better `completions
228 browsing' mode.
229
230 g. The menu completion code now uses the rl_menu_completion_entry_function
231 variable, allowing applications to provide their own menu completion
232 generators.
233
234 h. There is support for replacing a prefix of a pathname with a `...' when
235 displaying possible completions. This is controllable by setting the
236 `completion-prefix-display-length' variable. Matches with a common prefix
237 longer than this value have the common prefix replaced with `...'.
238
239 i. There is a new `revert-all-at-newline' variable. If enabled, readline will
240 undo all outstanding changes to all history lines when `accept-line' is
241 executed.
242
243 -------------------------------------------------------------------------------
244 This document details the changes between this version, readline-5.2,
245 and the previous version, readline-5.1.
246
247 1. Changes to Readline
248
249 a. Fixed a problem that caused segmentation faults when using readline in
250 callback mode and typing consecutive DEL characters on an empty line.
251
252 b. Fixed several redisplay problems with multibyte characters, all having to
253 do with the different code paths and variable meanings between single-byte
254 and multibyte character redisplay.
255
256 c. Fixed a problem with key sequence translation when presented with the
257 sequence \M-\C-x.
258
259 d. Fixed a problem that prevented the `a' command in vi mode from being
260 undone and redone properly.
261
262 e. Fixed a problem that prevented empty inserts in vi mode from being undone
263 properly.
264
265 f. Fixed a problem that caused readline to initialize with an incorrect idea
266 of whether or not the terminal can autowrap.
267
268 g. Fixed output of key bindings (like bash `bind -p') to honor the setting of
269 convert-meta and use \e where appropriate.
270
271 h. Changed the default filename completion function to call the filename
272 dequoting function if the directory completion hook isn't set. This means
273 that any directory completion hooks need to dequote the directory name,
274 since application-specific hooks need to know how the word was quoted,
275 even if no other changes are made.
276
277 i. Fixed a bug with creating the prompt for a non-interactive search string
278 when there are non-printing characters in the primary prompt.
279
280 j. Fixed a bug that caused prompts with invisible characters to be redrawn
281 multiple times in a multibyte locale.
282
283 k. Fixed a bug that could cause the key sequence scanning code to return the
284 wrong function.
285
286 l. Fixed a problem with the callback interface that caused it to fail when
287 using multi-character keyboard macros.
288
289 m. Fixed a bug that could cause a core dump when an edited history entry was
290 re-executed under certain conditions.
291
292 n. Fixed a bug that caused readline to reference freed memory when attmpting
293 to display a portion of the prompt.
294
295 o. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing
296 the prompt and input line multiple times.
297
298 p. Fixed history expansion to not be confused by here-string redirection.
299
300 q. Readline no longer treats read errors by converting them to newlines, as
301 it does with EOF. This caused partial lines to be returned from readline().
302
303 r. Fixed a redisplay bug that occurred in multibyte-capable locales when the
304 prompt was one character longer than the screen width.
305
306 2. New Features in Readline
307
308 a. Calling applications can now set the keyboard timeout to 0, allowing
309 poll-like behavior.
310
311 b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
312 the default last-ditch startup file.
313
314 c. The history file reading functions now allow windows-like \r\n line
315 terminators.
316
317 -------------------------------------------------------------------------------
318 This document details the changes between this version, readline-5.1,
319 and the previous version, readline-5.0.
320
321 1. Changes to Readline
322
323 a. Fixed a bug that caused multiliine prompts to be wrapped and displayed
324 incorrectly.
325
326 b. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current
327 line correctly.
328
329 c. Fixed a problem in computing the number of invisible characters on the first
330 line of a prompt whose length exceeds the screen width.
331
332 d. Fixed vi-mode searching so that failure preserves the current line rather
333 than the last line in the history list.
334
335 e. Fixed the vi-mode `~' command (change-case) to have the correct behavior at
336 end-of-line when manipulating multibyte characters.
337
338 f. Fixed the vi-mode `r' command (change-char) to have the correct behavior at
339 end-of-line when manipulating multibyte characters.
340
341 g. Fixed multiple bugs in the redisplay of multibyte characters: displaying
342 prompts longer than the screen width containing multibyte characters,
343
344 h. Fix the calculation of the number of physical characters in the prompt
345 string when it contains multibyte characters.
346
347 i. A non-zero value for the `rl_complete_suppress_append' variable now causes
348 no `/' to be appended to a directory name.
349
350 j. Fixed forward-word and backward-word to work when words contained
351 multibyte characters.
352
353 k. Fixed a bug in finding the delimiter of a `?' substring when performing
354 history expansion in a locale that supports multibyte characters.
355
356 l. Fixed a memory leak caused by not freeing the timestamp in a history entry.
357
358 m. Fixed a bug that caused "\M-x" style key bindings to not obey the setting
359 of the `convert-meta' variable.
360
361 n. Fixed saving and restoring primary prompt when prompting for incremental
362 and non-incremental searches; search prompts now display multibyte
363 characters correctly.
364
365 o. Fixed a bug that caused keys originally bound to self-insert but shadowed
366 by a multi-character key sequence to not be inserted.
367
368 p. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't
369 dereferenced if NULL (matching the documentation).
370
371 q. Extensive changes to readline to add enough state so that commands
372 requiring additional characters (searches, multi-key sequences, numeric
373 arguments, commands requiring an additional specifier character like
374 vi-mode change-char, etc.) work without synchronously waiting for
375 additional input.
376
377 r. Lots of changes so readline builds and runs on MinGW.
378
379 s. Readline no longer tries to modify the terminal settings when running in
380 callback mode.
381
382 t. The Readline display code no longer sets the location of the last invisible
383 character in the prompt if the \[\] sequence is empty.
384
385 u. The `change-case' command now correctly changes the case of multibyte
386 characters.
387
388 v. Changes to the shared library construction scripts to deal with Windows
389 DLL naming conventions for Cygwin.
390
391 w. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed
392 SIGWINCH.
393
394 x. Fixed the non-incremental search code in vi mode to dispose of any current
395 undo list when copying a line from the history into the current editing
396 buffer.
397
398 y. Fixed a bug that caused reversing the incremental search direction to
399 not work correctly.
400
401 z. Fixed the vi-mode `U' command to only undo up to the first time insert mode
402 was entered, as Posix specifies.
403
404 aa. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong
405 place.
406
407 bb. Fixed a redisplay bug caused by moving the cursor vertically to a line
408 with invisible characters in the prompt in a multibyte locale.
409
410 cc. Fixed a bug that could cause the terminal special chars to be bound in the
411 wrong keymap in vi mode.
412
413 2. New Features in Readline
414
415 a. The key sequence sent by the keypad `delete' key is now automatically
416 bound to delete-char.
417
418 b. A negative argument to menu-complete now cycles backward through the
419 completion list.
420
421 c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
422 readline will bind the terminal special characters to their readline
423 equivalents when it's called (on by default).
424
425 d. New bindable command: vi-rubout. Saves deleted text for possible
426 reinsertion, as with any vi-mode `text modification' command; `X' is bound
427 to this in vi command mode.
428
429 e. If the rl_completion_query_items is set to a value < 0, readline never
430 asks the user whether or not to view the possible completions.
431
432 f. The `C-w' binding in incremental search now understands multibyte
433 characters.
434
435 g. New application-callable auxiliary function, rl_variable_value, returns
436 a string corresponding to a readline variable's value.
437
438 h. When parsing inputrc files and variable binding commands, the parser
439 strips trailing whitespace from values assigned to boolean variables
440 before checking them.
441
442 i. A new external application-controllable variable that allows the LINES
443 and COLUMNS environment variables to set the window size regardless of
444 what the kernel returns.
445
446 -------------------------------------------------------------------------------
447 This document details the changes between this version, readline-5.0,
448 and the previous version, readline-4.3.
449
450 1. Changes to Readline
451
452 a. Fixes to avoid core dumps because of null pointer references in the
453 multibyte character code.
454
455 b. Fix to avoid infinite recursion caused by certain key combinations.
456
457 c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly.
458
459 d. Readline no longer tries to read ahead more than one line of input, even
460 when more is available.
461
462 e. Fixed the code that adjusts the point to not mishandle null wide
463 characters.
464
465 f. Fixed a bug in the history expansion `g' modifier that caused it to skip
466 every other match.
467
468 g. Fixed a bug that caused the prompt to overwrite previous output when the
469 output doesn't contain a newline and the locale supports multibyte
470 characters. This same change fixes the problem of readline redisplay
471 slowing down dramatically as the line gets longer in multibyte locales.
472
473 h. History traversal with arrow keys in vi insertion mode causes the cursor
474 to be placed at the end of the new line, like in emacs mode.
475
476 i. The locale initialization code does a better job of using the right
477 precedence and defaulting when checking the appropriate environment
478 variables.
479
480 j. Fixed the history word tokenizer to handle <( and >( better when used as
481 part of bash.
482
483 k. The overwrite mode code received several bug fixes to improve undo.
484
485 l. Many speedups to the multibyte character redisplay code.
486
487 m. The callback character reading interface should not hang waiting to read
488 keyboard input.
489
490 n. Fixed a bug with redoing vi-mode `s' command.
491
492 o. The code that initializes the terminal tracks changes made to the terminal
493 special characters with stty(1) (or equivalent), so that these changes
494 are reflected in the readline bindings. New application-callable function
495 to make it work: rl_tty_unset_default_bindings().
496
497 p. Fixed a bug that could cause garbage to be inserted in the buffer when
498 changing character case in vi mode when using a multibyte locale.
499
500 q. Fixed a bug in the redisplay code that caused problems on systems
501 supporting multibyte characters when moving between history lines when the
502 new line has more glyphs but fewer bytes.
503
504 r. Undo and redo now work better after exiting vi insertion mode.
505
506 s. Make sure system calls are restarted after a SIGWINCH is received using
507 SA_RESTART.
508
509 t. Improvements to the code that displays possible completions when using
510 multibyte characters.
511
512 u. Fixed a problem when parsing nested if statements in inputrc files.
513
514 v. The completer now takes multibyte characters into account when looking for
515 quoted substrings on which to perform completion.
516
517 w. The history search functions now perform better bounds checking on the
518 history list.
519
520 x. Change to history expansion functions to treat `^' as equivalent to word
521 one, as the documention states.
522
523 y. Some changes to the display code to improve display and redisplay of
524 multibyte characters.
525
526 z. Changes to speed up the multibyte character redisplay code.
527
528 aa. Fixed a bug in the vi-mode `E' command that caused it to skip over the
529 last character of a word if invoked while point was on the word's
530 next-to-last character.
531
532 bb. Fixed a bug that could cause incorrect filename quoting when
533 case-insensitive completion was enabled and the word being completed
534 contained backslashes quoting word break characters.
535
536 cc. Fixed a bug in redisplay triggered when the prompt string contains
537 invisible characters.
538
539 dd. Fixed some display (and other) bugs encountered in multibyte locales
540 when a non-ascii character was the last character on a line.
541
542 ee. Fixed some display bugs caused by multibyte characters in prompt strings.
543
544 ff. Fixed a problem with history expansion caused by non-whitespace characters
545 used as history word delimiters.
546
547 gg. Fixed a problem that could cause readline to refer to freed memory when
548 moving between history lines while doing searches.
549
550 hh. Improvements to the code that expands and displays prompt strings
551 containing multibyte characters.
552
553 ii. Fixed a problem with vi-mode not correctly remembering the numeric argument
554 to the last `c'hange command for later use with `.'.
555
556 jj. Fixed a bug in vi-mode that caused multi-digit count arguments to work
557 incorrectly.
558
559 kk. Fixed a problem in vi-mode that caused the last text modification command
560 to not be remembered across different command lines.
561
562 ll. Fixed problems with changing characters and changing case at the end of
563 the line.
564
565 mm. Fixed a problem with readline saving the contents of the current line
566 before beginning a non-interactive search.
567
568 nn. Fixed a problem with EOF detection when using rl_event_hook.
569
570 oo. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric
571 arguments.
572
573 2. New Features in Readline
574
575 a. History expansion has a new `a' modifier equivalent to the `g' modifier
576 for compatibility with the BSD csh.
577
578 b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
579 modifier, which performs a substitution once per word.
580
581 c. All non-incremental search operations may now undo the operation of
582 replacing the current line with the history line.
583
584 d. The text inserted by an `a' command in vi mode can be reinserted with
585 `.'.
586
587 e. New bindable variable, `show-all-if-unmodified'. If set, the readline
588 completer will list possible completions immediately if there is more
589 than one completion and partial completion cannot be performed.
590
591 f. There is a new application-callable `free_history_entry()' function.
592
593 g. History list entries now contain timestamp information; the history file
594 functions know how to read and write timestamp information associated
595 with each entry.
596
597 h. Four new key binding functions have been added:
598
599 rl_bind_key_if_unbound()
600 rl_bind_key_if_unbound_in_map()
601 rl_bind_keyseq_if_unbound()
602 rl_bind_keyseq_if_unbound_in_map()
603
604 i. New application variable, rl_completion_quote_character, set to any
605 quote character readline finds before it calls the application completion
606 function.
607
608 j. New application variable, rl_completion_suppress_quote, settable by an
609 application completion function. If set to non-zero, readline does not
610 attempt to append a closing quote to a completed word.
611
612 k. New application variable, rl_completion_found_quote, set to a non-zero
613 value if readline determines that the word to be completed is quoted.
614 Set before readline calls any application completion function.
615
616 l. New function hook, rl_completion_word_break_hook, called when readline
617 needs to break a line into words when completion is attempted. Allows
618 the word break characters to vary based on position in the line.
619
620 m. New bindable command: unix-filename-rubout. Does the same thing as
621 unix-word-rubout, but adds `/' to the set of word delimiters.
622
623 n. When listing completions, directories have a `/' appended if the
624 `mark-directories' option has been enabled.
625
626 -------------------------------------------------------------------------------
627 This document details the changes between this version, readline-4.3,
628 and the previous version, readline-4.2a.
629
630 1. Changes to Readline
631
632 a. Fixed output of comment-begin character when listing variable values.
633
634 b. Added some default key bindings for common escape sequences produced by
635 HOME and END keys.
636
637 c. Fixed the mark handling code to be more emacs-compatible.
638
639 d. A bug was fixed in the code that prints possible completions to keep it
640 from printing empty strings in certain circumstances.
641
642 e. Change the key sequence printing code to print ESC as M\- if ESC is a
643 meta-prefix character -- it's easier for users to understand than \e.
644
645 f. Fixed unstifle_history() to return values that match the documentation.
646
647 g. Fixed the event loop (rl_event_hook) to handle the case where the input
648 file descriptor is invalidated.
649
650 h. Fixed the prompt display code to work better when the application has a
651 custom redisplay function.
652
653 i. Changes to make reading and writing the history file a little faster, and
654 to cope with huge history files without calling abort(3) from xmalloc.
655
656 j. The vi-mode `S' and `s' commands are now undone correctly.
657
658 k. Fixed a problem which caused the display to be messed up when the last
659 line of a multi-line prompt (possibly containing invisible characters)
660 was longer than the screen width.
661
662 2. New Features in Readline
663
664 a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both
665 be bound to readline functions. Now the arrow keys may be used in vi
666 insert mode.
667
668 b. When listing completions, and the number of lines displayed is more than
669 the screen length, readline uses an internal pager to display the results.
670 This is controlled by the `page-completions' variable (default on).
671
672 c. New code to handle editing and displaying multibyte characters.
673
674 d. The behavior introduced in bash-2.05a of deciding whether or not to
675 append a slash to a completed name that is a symlink to a directory has
676 been made optional, controlled by the `mark-symlinked-directories'
677 variable (default is the 2.05a behavior).
678
679 e. The `insert-comment' command now acts as a toggle if given a numeric
680 argument: if the first characters on the line don't specify a
681 comment, insert one; if they do, delete the comment text
682
683 f. New application-settable completion variable:
684 rl_completion_mark_symlink_dirs, allows an application's completion
685 function to temporarily override the user's preference for appending
686 slashes to names which are symlinks to directories.
687
688 g. New function available to application completion functions:
689 rl_completion_mode, to tell how the completion function was invoked
690 and decide which argument to supply to rl_complete_internal (to list
691 completions, etc.).
692
693 h. Readline now has an overwrite mode, toggled by the `overwrite-mode'
694 bindable command, which could be bound to `Insert'.
695
696 i. New application-settable completion variable:
697 rl_completion_suppress_append, inhibits appending of
698 rl_completion_append_character to completed words.
699
700 j. New key bindings when reading an incremental search string: ^W yanks
701 the currently-matched word out of the current line into the search
702 string; ^Y yanks the rest of the current line into the search string,
703 DEL or ^H deletes characters from the search string.
704
705 -------------------------------------------------------------------------------
706 This document details the changes between this version, readline-4.2a,
707 and the previous version, readline-4.2.
708
709 1. Changes to Readline
710
711 a. More `const' and type casting fixes.
712
713 b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer
714 overflow problems.
715
716 c. The completion code no longer appends a `/' or ` ' to a match when
717 completing a symbolic link that resolves to a directory name, unless
718 the match does not add anything to the word being completed. This
719 means that a tab will complete the word up to the full name, but not
720 add anything, and a subsequent tab will add a slash.
721
722 d. Fixed a trivial typo that made the vi-mode `dT' command not work.
723
724 e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert.
725
726 f. Fixed the tty code so that ^V works more than once.
727
728 g. Changed the use of __P((...)) for function prototypes to PARAMS((...))
729 because the use of __P in typedefs conflicted g++ and glibc.
730
731 h. The completion code now attempts to do a better job of preserving the
732 case of the word the user typed if ignoring case in completions.
733
734 i. Readline defaults to not echoing the input and lets the terminal
735 initialization code enable echoing if there is a controlling terminal.
736
737 j. The key binding code now processes only two hex digits after a `\x'
738 escape sequence, and the documentation was changed to note that the
739 octal and hex escape sequences result in an eight-bit value rather
740 than strict ASCII.
741
742 k. Fixed a few places where negative array subscripts could have occurred.
743
744 l. Fixed the vi-mode code to use a better method to determine the bounds of
745 the array used to hold the marks, and to avoid out-of-bounds references.
746
747 m. Fixed the defines in chardefs.h to work better when chars are signed.
748
749 n. Fixed configure.in to use the new names for bash autoconf macros.
750
751 o. Readline no longer attempts to define its own versions of some ctype
752 macros if they are implemented as functions in libc but not as macros in
753 <ctype.h>.
754
755 p. Fixed a problem where rl_backward could possibly set point to before
756 the beginning of the line.
757
758 q. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause
759 include file problems.
760
761 2. New Features in Readline
762
763 a. Added extern declaration for rl_get_termcap to readline.h, making it a
764 public function (it was always there, just not in readline.h).
765
766 b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402,
767 RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2.
768
769 c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION.
770
771 d. New bindable boolean readline variable: match-hidden-files. Controls
772 completion of files beginning with a `.' (on Unix). Enabled by default.
773
774 e. The history expansion code now allows any character to terminate a
775 `:first-' modifier, like csh.
776
777 f. The incremental search code remembers the last search string and uses
778 it if ^R^R is typed without a search string.
779
780 h. New bindable variable `history-preserve-point'. If set, the history
781 code attempts to place the user at the same location on each history
782 line retrived with previous-history or next-history.
783
784 -------------------------------------------------------------------------------
785 This document details the changes between this version, readline-4.2,
786 and the previous version, readline-4.1.
787
788 1. Changes to Readline
789
790 a. When setting the terminal attributes on systems using `struct termio',
791 readline waits for output to drain before changing the attributes.
792
793 b. A fix was made to the history word tokenization code to avoid attempts to
794 dereference a null pointer.
795
796 c. Readline now defaults rl_terminal_name to $TERM if the calling application
797 has left it unset, and tries to initialize with the resultant value.
798
799 d. Instead of calling (*rl_getc_function)() directly to get input in certain
800 places, readline now calls rl_read_key() consistently.
801
802 e. Fixed a bug in the completion code that allowed a backslash to quote a
803 single quote inside a single-quoted string.
804
805 f. rl_prompt is no longer assigned directly from the argument to readline(),
806 but uses memory allocated by readline. This allows constant strings to
807 be passed to readline without problems arising when the prompt processing
808 code wants to modify the string.
809
810 g. Fixed a bug that caused non-interactive history searches to return the
811 wrong line when performing multiple searches backward for the same string.
812
813 h. Many variables, function arguments, and function return values are now
814 declared `const' where appropriate, to improve behavior when linking with
815 C++ code.
816
817 i. The control character detection code now works better on systems where
818 `char' is unsigned by default.
819
820 j. The vi-mode numeric argument is now capped at 999999, just like emacs mode.
821
822 k. The Function, CPFunction, CPPFunction, and VFunction typedefs have been
823 replaced with a set of specific prototyped typedefs, though they are
824 still in the readline header files for backwards compatibility.
825
826 m. Nearly all of the (undocumented) internal global variables in the library
827 now have an _rl_ prefix -- there were a number that did not, like
828 screenheight, screenwidth, alphabetic, etc.
829
830 n. The ding() convenience function has been renamed to rl_ding(), though the
831 old function is still defined for backwards compatibility.
832
833 o. The completion convenience functions filename_completion_function,
834 username_completion_function, and completion_matches now have an rl_
835 prefix, though the old names are still defined for backwards compatibility.
836
837 p. The functions shared by readline and bash (linkage is satisfied from bash
838 when compiling with bash, and internally otherwise) now have an sh_ prefix.
839
840 q. Changed the shared library creation procedure on Linux and BSD/OS 4.x so
841 that the `soname' contains only the major version number rather than the
842 major and minor numbers.
843
844 r. Fixed a redisplay bug that occurred when the prompt spanned more than one
845 physical line and contained invisible characters.
846
847 s. Added a missing `includedir' variable to the Makefile.
848
849 t. When installing the shared libraries, make sure symbolic links are relative.
850
851 u. Added configure test so that it can set `${MAKE}' appropriately.
852
853 v. Fixed a bug in rl_forward that could cause the point to be set to before
854 the beginning of the line in vi mode.
855
856 w. Fixed a bug in the callback read-char interface to make it work when a
857 readline function pushes some input onto the input stream with
858 rl_execute_next (like the incremental search functions).
859
860 x. Fixed a file descriptor leak in the history file manipulation code that
861 was tripped when attempting to truncate a non-regular file (like
862 /dev/null).
863
864 y. Changes to make all of the exported readline functions declared in
865 readline.h have an rl_ prefix (rltty_set_default_bindings is now
866 rl_tty_set_default_bindings, crlf is now rl_crlf, etc.)
867
868 z. The formatted documentation included in the base readline distribution
869 is no longer removed on a `make distclean'.
870
871 aa. Some changes were made to avoid gcc warnings with -Wall.
872
873 bb. rl_get_keymap_by_name now finds keymaps case-insensitively, so
874 `set keymap EMACS' works.
875
876 cc. The history file writing and truncation functions now return a useful
877 status on error.
878
879 dd. Fixed a bug that could cause applications to dereference a NULL pointer
880 if a NULL second argument was passed to history_expand().
881
882 ee. If a hook function assigned to rl_event_hook sets rl_done to a non-zero
883 value, rl_read_key() now immediately returns '\n' (which is assumed to
884 be bound to accept-line).
885
886 2. New Features in Readline
887
888 a. The blink timeout for paren matching is now settable by applications,
889 via the rl_set_paren_blink_timeout() function.
890
891 b. _rl_executing_macro has been renamed to rl_executing_macro, which means
892 it's now part of the public interface.
893
894 c. Readline has a new variable, rl_readline_state, which is a bitmap that
895 encapsulates the current state of the library; intended for use by
896 callbacks and hook functions.
897
898 d. rlfe has a new -l option to log input and output (-a appends to logfile),
899 a new -n option to set the readline application name, and -v and -h
900 options for version and help information.
901
902 e. rlfe can now perform filename completion for the inferior process if the
903 OS has a /proc/<PID>/cwd that can be read with readlink(2) to get the
904 inferior's current working directory.
905
906 f. A new file, rltypedefs.h, contains the new typedefs for function pointers
907 and is installed by `make install'.
908
909 g. New application-callable function rl_set_prompt(const char *prompt):
910 expands its prompt string argument and sets rl_prompt to the result.
911
912 h. New application-callable function rl_set_screen_size(int rows, int cols):
913 public method for applications to set readline's idea of the screen
914 dimensions.
915
916 i. The history example program (examples/histexamp.c) is now built as one
917 of the examples.
918
919 j. The documentation has been updated to cover nearly all of the public
920 functions and variables declared in readline.h.
921
922 k. New function, rl_get_screen_size (int *rows, int *columns), returns
923 readline's idea of the screen dimensions.
924
925 l. The timeout in rl_gather_tyi (readline keyboard input polling function)
926 is now settable via a function (rl_set_keyboard_input_timeout()).
927
928 m. Renamed the max_input_history variable to history_max_entries; the old
929 variable is maintained for backwards compatibility.
930
931 n. The list of characters that separate words for the history tokenizer is
932 now settable with a variable: history_word_delimiters. The default
933 value is as before.
934
935 o. There is a new history.3 manual page documenting the history library.
936
937 -------------------------------------------------------------------------------
938 This document details the changes between this version, readline-4.1,
939 and the previous version, readline-4.0.
940
941 1. Changes to Readline
942
943 a. Changed the HTML documents so that the table-of-contents is no longer
944 a separate file.
945
946 b. Changes to the shared object configuration for: Irix 5.x, Irix 6.x,
947 OSF/1.
948
949 c. The shared library major and minor versions are now constructed
950 automatically by configure and substituted into the makefiles.
951
952 d. It's now possible to install the shared libraries separately from the
953 static libraries.
954
955 e. The history library tries to truncate the history file only if it is a
956 regular file.
957
958 f. A bug that caused _rl_dispatch to address negative array indices on
959 systems with signed chars was fixed.
960
961 g. rl-yank-nth-arg now leaves the history position the same as when it was
962 called.
963
964 h. Changes to the completion code to handle MS-DOS drive-letter:pathname
965 filenames.
966
967 i. Completion is now case-insensitive by default on MS-DOS.
968
969 j. Fixes to the history file manipulation code for MS-DOS.
970
971 k. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS.
972
973 l. Some fixes were made to the redisplay code for better operation on MS-DOS.
974
975 m. The quoted-insert code will now insert tty special chars like ^C.
976
977 n. A bug was fixed that caused the display code to reference memory before
978 the start of the prompt string.
979
980 o. More support for __EMX__ (OS/2).
981
982 p. A bug was fixed in readline's signal handling that could cause infinite
983 recursion in signal handlers.
984
985 q. A bug was fixed that caused the point to be less than zero when rl_forward
986 was given a very large numeric argument.
987
988 r. The vi-mode code now gets characters via the application-settable value
989 of rl_getc_function rather than calling rl_getc directly.
990
991 s. The history file code now uses O_BINARY mode when reading and writing
992 the history file on cygwin32.
993
994 t. Fixed a bug in the redisplay code for lines with more than 256 line
995 breaks.
996
997 u. A bug was fixed which caused invisible character markers to not be
998 stripped from the prompt string if the terminal was in no-echo mode.
999
1000 v. Readline no longer tries to get the variables it needs for redisplay
1001 from the termcap entry if the calling application has specified its
1002 own redisplay function. Readline treats the terminal as `dumb' in
1003 this case.
1004
1005 w. Fixes to the SIGWINCH code so that a multiple-line prompt with escape
1006 sequences is redrawn correctly.
1007
1008 x. Changes to the install and install-shared targets so that the libraries
1009 and header files are installed separately.
1010
1011 2. New Features in Readline
1012
1013 a. A new Readline `user manual' is in doc/rluserman.texinfo.
1014
1015 b. Parentheses matching is now always compiled into readline, and enabled
1016 or disabled when the value of the `blink-matching-paren' variable is
1017 changed.
1018
1019 c. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
1020
1021 d. MS-DOS systems now use ~/_history as the default history file.
1022
1023 e. history-search-{forward,backward} now leave the point at the end of the
1024 line when the string to search for is empty, like
1025 {reverse,forward}-search-history.
1026
1027 f. history-search-{forward,backward} now leave the last history line found
1028 in the readline buffer if the second or subsequent search fails.
1029
1030 g. New function for use by applications: rl_on_new_line_with_prompt, used
1031 when an application displays the prompt itself before calling readline().
1032
1033 h. New variable for use by applications: rl_already_prompted. An application
1034 that displays the prompt itself before calling readline() must set this to
1035 a non-zero value.
1036
1037 i. A new variable, rl_gnu_readline_p, always 1. The intent is that an
1038 application can verify whether or not it is linked with the `real'
1039 readline library or some substitute.
1040
1041 j. Per Bothner's `rlfe' (pronounced `Ralphie') readline front-end program
1042 is included in the examples subdirectory, though it is not built
1043 by default.
1044
1045 -------------------------------------------------------------------------------
1046 This document details the changes between this version, readline-4.0,
1047 and the previous version, readline-2.2.
1048
1049 1. Changes to Readline
1050
1051 a. The version number is now 4.0, to match the major and minor version
1052 numbers on the shared readline and history libraries. Future
1053 releases will maintain the identical numbering.
1054
1055 b. Fixed a typo in the `make install' recipe that copied libreadline.a
1056 to libhistory.old right after installing it.
1057
1058 c. The readline and history info files are now installed out of the source
1059 directory if they are not found in the build directory.
1060
1061 d. The library no longer exports a function named `savestring' -- backwards
1062 compatibility be damned.
1063
1064 e. There is no longer any #ifdef SHELL code in the source files.
1065
1066 f. Some changes were made to the key binding code to fix memory leaks and
1067 better support Win32 systems.
1068
1069 g. Fixed a silly typo in the paren matching code -- it's microseconds, not
1070 milliseconds.
1071
1072 h. The readline library should be compilable by C++ compilers.
1073
1074 i. The readline.h public header file now includes function prototypes for
1075 all readline functions, and some changes were made to fix errors in the
1076 source files uncovered by the use of prototypes.
1077
1078 j. The maximum numeric argument is now clamped at 1000000.
1079
1080 k. Fixes to rl_yank_last_arg to make it behave better.
1081
1082 l. Fixed a bug in the display code that caused core dumps if the prompt
1083 string length exceeded 1024 characters.
1084
1085 m. The menu completion code was fixed to properly insert a single completion
1086 if there is only one match.
1087
1088 n. A bug was fixed that caused the display code to improperly display tabs
1089 after newlines.
1090
1091 o. A fix was made to the completion code in which a typo caused the wrong
1092 value to be passed to the function that computed the longest common
1093 prefix of the list of matches.
1094
1095 p. The completion code now checks the value of rl_filename_completion_desired,
1096 which is set by application-supplied completion functions to indicate
1097 that filename completion is being performed, to decide whether or not to
1098 call an application-supplied `ignore completions' function.
1099
1100 q. Code was added to the history library to catch history substitutions
1101 using `&' without a previous history substitution or search having been
1102 performed.
1103
1104
1105 2. New Features in Readline
1106
1107 a. There is a new script, support/shobj-conf, to do system-specific shared
1108 object and library configuration. It generates variables for configure
1109 to substitute into makefiles. The README file provides a detailed
1110 explanation of the shared library creation process.
1111
1112 b. Shared libraries and objects are now built in the `shlib' subdirectory.
1113 There is a shlib/Makefile.in to control the build process. `make shared'
1114 from the top-level directory is still the right way to build shared
1115 versions of the libraries.
1116
1117 c. rlconf.h is now installed, so applications can find out which features
1118 have been compiled into the installed readline and history libraries.
1119
1120 d. rlstdc.h is now an installed header file.
1121
1122 e. Many changes to the signal handling:
1123 o Readline now catches SIGQUIT and cleans up the tty before returning;
1124 o A new variable, rl_catch_signals, is available to application writers
1125 to indicate to readline whether or not it should install its own
1126 signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
1127 SIGTTIN, and SIGTTOU;
1128 o A new variable, rl_catch_sigwinch, is available to application
1129 writers to indicate to readline whether or not it should install its
1130 own signal handler for SIGWINCH, which will chain to the calling
1131 applications's SIGWINCH handler, if one is installed;
1132 o There is a new function, rl_free_line_state, for application signal
1133 handlers to call to free up the state associated with the current
1134 line after receiving a signal;
1135 o There is a new function, rl_cleanup_after_signal, to clean up the
1136 display and terminal state after receiving a signal;
1137 o There is a new function, rl_reset_after_signal, to reinitialize the
1138 terminal and display state after an application signal handler
1139 returns and readline continues
1140
1141 f. There is a new function, rl_resize_terminal, to reset readline's idea of
1142 the screen size after a SIGWINCH.
1143
1144 g. New public functions: rl_save_prompt and rl_restore_prompt. These were
1145 previously private functions with a `_' prefix. These functions are
1146 used when an application wants to write a message to the `message area'
1147 with rl_message and have the prompt restored correctly when the message
1148 is erased.
1149
1150 h. New function hook: rl_pre_input_hook, called just before readline starts
1151 reading input, after initialization.
1152
1153 i. New function hook: rl_display_matches_hook, called when readline would
1154 display the list of completion matches. The new function
1155 rl_display_match_list is what readline uses internally, and is available
1156 for use by application functions called via this hook.
1157
1158 j. New bindable function, delete-char-or-list, like tcsh.
1159
1160 k. A new variable, rl_erase_empty_line, which, if set by an application using
1161 readline, will cause readline to erase, prompt and all, lines on which the
1162 only thing typed was a newline.
1163
1164 l. There is a new script, support/shlib-install, to install and uninstall
1165 the shared readline and history libraries.
1166
1167 m. A new bindable variable, `isearch-terminators', which is a string
1168 containing the set of characters that should terminate an incremental
1169 search without being executed as a command.
1170
1171 n. A new bindable function, forward-backward-delete-char.
1172
1173 -------------------------------------------------------------------------------
1174 This document details the changes between this version, readline-2.2,
1175 and the previous version, readline-2.1.
1176
1177 1. Changes to Readline
1178
1179 a. Added a missing `extern' to a declaration in readline.h that kept
1180 readline from compiling cleanly on some systems.
1181
1182 b. The history file is now opened with mode 0600 when it is written for
1183 better security.
1184
1185 c. Changes were made to the SIGWINCH handling code so that prompt redisplay
1186 is done better.
1187
1188 d. ^G now interrupts incremental searches correctly.
1189
1190 e. A bug that caused a core dump when the set of characters to be quoted
1191 when completing words was empty was fixed.
1192
1193 f. Fixed a problem in the readline test program rltest.c that caused a core
1194 dump.
1195
1196 g. The code that handles parser directives in inputrc files now displays
1197 more error messages.
1198
1199 h. The history expansion code was fixed so that the appearance of the
1200 history comment character at the beginning of a word inhibits history
1201 expansion for that word and the rest of the input line.
1202
1203 i. The code that prints completion listings now behaves better if one or
1204 more of the filenames contains non-printable characters.
1205
1206 j. The time delay when showing matching parentheses is now 0.5 seconds.
1207
1208
1209 2. New Features in Readline
1210
1211 a. There is now an option for `iterative' yank-last-arg handline, so a user
1212 can keep entering `M-.', yanking the last argument of successive history
1213 lines.
1214
1215 b. New variable, `print-completions-horizontally', which causes completion
1216 matches to be displayed across the screen (like `ls -x') rather than up
1217 and down the screen (like `ls').
1218
1219 c. New variable, `completion-ignore-case', which causes filename completion
1220 and matching to be performed case-insensitively.
1221
1222 d. There is a new bindable command, `magic-space', which causes history
1223 expansion to be performed on the current readline buffer and a space to
1224 be inserted into the result.
1225
1226 e. There is a new bindable command, `menu-complete', which enables tcsh-like
1227 menu completion (successive executions of menu-complete insert a single
1228 completion match, cycling through the list of possible completions).
1229
1230 f. There is a new bindable command, `paste-from-clipboard', for use on Win32
1231 systems, to insert the text from the Win32 clipboard into the editing
1232 buffer.
1233
1234 g. The key sequence translation code now understands printf-style backslash
1235 escape sequences, including \NNN octal escapes. These escape sequences
1236 may be used in key sequence definitions or macro values.
1237
1238 h. An `$include' inputrc file parser directive has been added.
This page took 0.056627 seconds and 4 git commands to generate.