CHANGES revision 165671
1245868SjasoneThis document details the changes between this version, readline-5.2, 2245868Sjasoneand the previous version, readline-5.1. 3296221Sjasone 4245868Sjasone1. Changes to Readline 5245868Sjasone 6234370Sjasonea. Fixed a problem that caused segmentation faults when using readline in 7234370Sjasone callback mode and typing consecutive DEL characters on an empty line. 8234370Sjasone 9234370Sjasoneb. Fixed several redisplay problems with multibyte characters, all having to 10234370Sjasone do with the different code paths and variable meanings between single-byte 11234370Sjasone and multibyte character redisplay. 12234370Sjasone 13234370Sjasonec. Fixed a problem with key sequence translation when presented with the 14234370Sjasone sequence \M-\C-x. 15234370Sjasone 16234370Sjasoned. Fixed a problem that prevented the `a' command in vi mode from being 17234370Sjasone undone and redone properly. 18234370Sjasone 19234370Sjasonee. Fixed a problem that prevented empty inserts in vi mode from being undone 20234370Sjasone properly. 21234370Sjasone 22261071Sjasonef. Fixed a problem that caused readline to initialize with an incorrect idea 23261071Sjasone of whether or not the terminal can autowrap. 24261071Sjasone 25261071Sjasoneg. Fixed output of key bindings (like bash `bind -p') to honor the setting of 26261071Sjasone convert-meta and use \e where appropriate. 27245868Sjasone 28245868Sjasoneh. Changed the default filename completion function to call the filename 29234370Sjasone dequoting function if the directory completion hook isn't set. This means 30234370Sjasone that any directory completion hooks need to dequote the directory name, 31234370Sjasone since application-specific hooks need to know how the word was quoted, 32245868Sjasone even if no other changes are made. 33245868Sjasone 34245868Sjasonei. Fixed a bug with creating the prompt for a non-interactive search string 35245868Sjasone when there are non-printing characters in the primary prompt. 36245868Sjasone 37245868Sjasonej. Fixed a bug that caused prompts with invisible characters to be redrawn 38286866Sjasone multiple times in a multibyte locale. 39245868Sjasone 40245868Sjasonek. Fixed a bug that could cause the key sequence scanning code to return the 41234370Sjasone wrong function. 42245868Sjasone 43234370Sjasonel. Fixed a problem with the callback interface that caused it to fail when 44286866Sjasone using multi-character keyboard macros. 45286866Sjasone 46245868Sjasonem. Fixed a bug that could cause a core dump when an edited history entry was 47234370Sjasone re-executed under certain conditions. 48245868Sjasone 49245868Sjasonen. Fixed a bug that caused readline to reference freed memory when attmpting 50245868Sjasone to display a portion of the prompt. 51234370Sjasone 52296221Sjasoneo. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing 53296221Sjasone the prompt and input line multiple times. 54296221Sjasone 55296221Sjasonep. Fixed history expansion to not be confused by here-string redirection. 56299587Sjasone 57296221Sjasoneq. Readline no longer treats read errors by converting them to newlines, as 58296221Sjasone it does with EOF. This caused partial lines to be returned from readline(). 59296221Sjasone 60261071Sjasoner. Fixed a redisplay bug that occurred in multibyte-capable locales when the 61245868Sjasone prompt was one character longer than the screen width. 62234370Sjasone 63245868Sjasone2. New Features in Readline 64245868Sjasone 65245868Sjasonea. Calling applications can now set the keyboard timeout to 0, allowing 66234370Sjasone poll-like behavior. 67296221Sjasone 68296221Sjasoneb. The value of SYS_INPUTRC (configurable at compilation time) is now used as 69296221Sjasone the default last-ditch startup file. 70296221Sjasone 71299587Sjasonec. The history file reading functions now allow windows-like \r\n line 72296221Sjasone terminators. 73296221Sjasone 74296221Sjasone------------------------------------------------------------------------------- 75261071SjasoneThis document details the changes between this version, readline-5.1, 76245868Sjasoneand the previous version, readline-5.0. 77245868Sjasone 78245868Sjasone1. Changes to Readline 79245868Sjasone 80245868Sjasonea. Fixed a bug that caused multiliine prompts to be wrapped and displayed 81245868Sjasone incorrectly. 82245868Sjasone 83245868Sjasoneb. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current 84245868Sjasone line correctly. 85245868Sjasone 86245868Sjasonec. Fixed a problem in computing the number of invisible characters on the first 87245868Sjasone line of a prompt whose length exceeds the screen width. 88261071Sjasone 89245868Sjasoned. Fixed vi-mode searching so that failure preserves the current line rather 90245868Sjasone than the last line in the history list. 91245868Sjasone 92245868Sjasonee. Fixed the vi-mode `~' command (change-case) to have the correct behavior at 93245868Sjasone end-of-line when manipulating multibyte characters. 94245868Sjasone 95245868Sjasonef. Fixed the vi-mode `r' command (change-char) to have the correct behavior at 96286866Sjasone end-of-line when manipulating multibyte characters. 97245868Sjasone 98286866Sjasoneg. Fixed multiple bugs in the redisplay of multibyte characters: displaying 99245868Sjasone prompts longer than the screen width containing multibyte characters, 100245868Sjasone 101261071Sjasoneh. Fix the calculation of the number of physical characters in the prompt 102245868Sjasone string when it contains multibyte characters. 103245868Sjasone 104245868Sjasonei. A non-zero value for the `rl_complete_suppress_append' variable now causes 105245868Sjasone no `/' to be appended to a directory name. 106245868Sjasone 107245868Sjasonej. Fixed forward-word and backward-word to work when words contained 108245868Sjasone multibyte characters. 109245868Sjasone 110245868Sjasonek. Fixed a bug in finding the delimiter of a `?' substring when performing 111245868Sjasone history expansion in a locale that supports multibyte characters. 112245868Sjasone 113245868Sjasonel. Fixed a memory leak caused by not freeing the timestamp in a history entry. 114245868Sjasone 115245868Sjasonem. Fixed a bug that caused "\M-x" style key bindings to not obey the setting 116245868Sjasone of the `convert-meta' variable. 117245868Sjasone 118245868Sjasonen. Fixed saving and restoring primary prompt when prompting for incremental 119245868Sjasone and non-incremental searches; search prompts now display multibyte 120245868Sjasone characters correctly. 121245868Sjasone 122245868Sjasoneo. Fixed a bug that caused keys originally bound to self-insert but shadowed 123245868Sjasone by a multi-character key sequence to not be inserted. 124245868Sjasone 125245868Sjasonep. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't 126245868Sjasone dereferenced if NULL (matching the documentation). 127245868Sjasone 128245868Sjasoneq. Extensive changes to readline to add enough state so that commands 129245868Sjasone requiring additional characters (searches, multi-key sequences, numeric 130245868Sjasone arguments, commands requiring an additional specifier character like 131234370Sjasone vi-mode change-char, etc.) work without synchronously waiting for 132234370Sjasone additional input. 133245868Sjasone 134245868Sjasoner. Lots of changes so readline builds and runs on MinGW. 135245868Sjasone 136245868Sjasones. Readline no longer tries to modify the terminal settings when running in 137245868Sjasone callback mode. 138245868Sjasone 139245868Sjasonet. The Readline display code no longer sets the location of the last invisible 140245868Sjasone character in the prompt if the \[\] sequence is empty. 141245868Sjasone 142245868Sjasoneu. The `change-case' command now correctly changes the case of multibyte 143245868Sjasone characters. 144245868Sjasone 145234370Sjasonev. Changes to the shared library construction scripts to deal with Windows 146234370Sjasone DLL naming conventions for Cygwin. 147245868Sjasone 148245868Sjasonew. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed 149234370Sjasone SIGWINCH. 150245868Sjasone 151245868Sjasonex. Fixed the non-incremental search code in vi mode to dispose of any current 152261071Sjasone undo list when copying a line from the history into the current editing 153234370Sjasone buffer. 154245868Sjasone 155245868Sjasoney. Fixed a bug that caused reversing the incremental search direction to 156245868Sjasone not work correctly. 157261071Sjasone 158245868Sjasonez. Fixed the vi-mode `U' command to only undo up to the first time insert mode 159245868Sjasone was entered, as Posix specifies. 160245868Sjasone 161245868Sjasoneaa. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong 162245868Sjasone place. 163245868Sjasone 164245868Sjasonebb. Fixed a redisplay bug caused by moving the cursor vertically to a line 165245868Sjasone with invisible characters in the prompt in a multibyte locale. 166245868Sjasone 167245868Sjasonecc. Fixed a bug that could cause the terminal special chars to be bound in the 168245868Sjasone wrong keymap in vi mode. 169245868Sjasone 170245868Sjasone2. New Features in Readline 171245868Sjasone 172245868Sjasonea. The key sequence sent by the keypad `delete' key is now automatically 173245868Sjasone bound to delete-char. 174245868Sjasone 175245868Sjasoneb. A negative argument to menu-complete now cycles backward through the 176245868Sjasone completion list. 177245868Sjasone 178245868Sjasonec. A new bindable readline variable: bind-tty-special-chars. If non-zero, 179245868Sjasone readline will bind the terminal special characters to their readline 180245868Sjasone equivalents when it's called (on by default). 181245868Sjasone 182245868Sjasoned. New bindable command: vi-rubout. Saves deleted text for possible 183245868Sjasone reinsertion, as with any vi-mode `text modification' command; `X' is bound 184245868Sjasone to this in vi command mode. 185245868Sjasone 186245868Sjasonee. If the rl_completion_query_items is set to a value < 0, readline never 187245868Sjasone asks the user whether or not to view the possible completions. 188245868Sjasone 189245868Sjasonef. The `C-w' binding in incremental search now understands multibyte 190245868Sjasone characters. 191245868Sjasone 192245868Sjasoneg. New application-callable auxiliary function, rl_variable_value, returns 193245868Sjasone a string corresponding to a readline variable's value. 194245868Sjasone 195245868Sjasoneh. When parsing inputrc files and variable binding commands, the parser 196245868Sjasone strips trailing whitespace from values assigned to boolean variables 197245868Sjasone before checking them. 198245868Sjasone 199245868Sjasonei. A new external application-controllable variable that allows the LINES 200245868Sjasone and COLUMNS environment variables to set the window size regardless of 201245868Sjasone what the kernel returns. 202245868Sjasone 203245868Sjasone------------------------------------------------------------------------------- 204245868SjasoneThis document details the changes between this version, readline-5.0, 205245868Sjasoneand the previous version, readline-4.3. 206245868Sjasone 207245868Sjasone1. Changes to Readline 208245868Sjasone 209245868Sjasonea. Fixes to avoid core dumps because of null pointer references in the 210245868Sjasone multibyte character code. 211245868Sjasone 212245868Sjasoneb. Fix to avoid infinite recursion caused by certain key combinations. 213245868Sjasone 214245868Sjasonec. Fixed a bug that caused the vi-mode `last command' to be set incorrectly. 215245868Sjasone 216245868Sjasoned. Readline no longer tries to read ahead more than one line of input, even 217245868Sjasone when more is available. 218245868Sjasone 219245868Sjasonee. Fixed the code that adjusts the point to not mishandle null wide 220245868Sjasone characters. 221245868Sjasone 222245868Sjasonef. Fixed a bug in the history expansion `g' modifier that caused it to skip 223245868Sjasone every other match. 224245868Sjasone 225245868Sjasoneg. Fixed a bug that caused the prompt to overwrite previous output when the 226245868Sjasone output doesn't contain a newline and the locale supports multibyte 227245868Sjasone characters. This same change fixes the problem of readline redisplay 228245868Sjasone slowing down dramatically as the line gets longer in multibyte locales. 229245868Sjasone 230245868Sjasoneh. History traversal with arrow keys in vi insertion mode causes the cursor 231245868Sjasone to be placed at the end of the new line, like in emacs mode. 232245868Sjasone 233245868Sjasonei. The locale initialization code does a better job of using the right 234245868Sjasone precedence and defaulting when checking the appropriate environment 235245868Sjasone variables. 236245868Sjasone 237245868Sjasonej. Fixed the history word tokenizer to handle <( and >( better when used as 238245868Sjasone part of bash. 239245868Sjasone 240245868Sjasonek. The overwrite mode code received several bug fixes to improve undo. 241245868Sjasone 242245868Sjasonel. Many speedups to the multibyte character redisplay code. 243245868Sjasone 244245868Sjasonem. The callback character reading interface should not hang waiting to read 245245868Sjasone keyboard input. 246245868Sjasone 247245868Sjasonen. Fixed a bug with redoing vi-mode `s' command. 248245868Sjasone 249245868Sjasoneo. The code that initializes the terminal tracks changes made to the terminal 250245868Sjasone special characters with stty(1) (or equivalent), so that these changes 251245868Sjasone are reflected in the readline bindings. New application-callable function 252245868Sjasone to make it work: rl_tty_unset_default_bindings(). 253245868Sjasone 254245868Sjasonep. Fixed a bug that could cause garbage to be inserted in the buffer when 255245868Sjasone changing character case in vi mode when using a multibyte locale. 256245868Sjasone 257245868Sjasoneq. Fixed a bug in the redisplay code that caused problems on systems 258245868Sjasone supporting multibyte characters when moving between history lines when the 259261071Sjasone new line has more glyphs but fewer bytes. 260245868Sjasone 261245868Sjasoner. Undo and redo now work better after exiting vi insertion mode. 262245868Sjasone 263245868Sjasones. Make sure system calls are restarted after a SIGWINCH is received using 264245868Sjasone SA_RESTART. 265245868Sjasone 266245868Sjasonet. Improvements to the code that displays possible completions when using 267286866Sjasone multibyte characters. 268286866Sjasone 269245868Sjasoneu. Fixed a problem when parsing nested if statements in inputrc files. 270245868Sjasone 271245868Sjasonev. The completer now takes multibyte characters into account when looking for 272245868Sjasone quoted substrings on which to perform completion. 273245868Sjasone 274245868Sjasonew. The history search functions now perform better bounds checking on the 275245868Sjasone history list. 276245868Sjasone 277245868Sjasonex. Change to history expansion functions to treat `^' as equivalent to word 278245868Sjasone one, as the documention states. 279245868Sjasone 280245868Sjasoney. Some changes to the display code to improve display and redisplay of 281245868Sjasone multibyte characters. 282245868Sjasone 283245868Sjasonez. Changes to speed up the multibyte character redisplay code. 284245868Sjasone 285245868Sjasoneaa. Fixed a bug in the vi-mode `E' command that caused it to skip over the 286245868Sjasone last character of a word if invoked while point was on the word's 287245868Sjasone next-to-last character. 288245868Sjasone 289245868Sjasonebb. Fixed a bug that could cause incorrect filename quoting when 290245868Sjasone case-insensitive completion was enabled and the word being completed 291245868Sjasone contained backslashes quoting word break characters. 292245868Sjasone 293245868Sjasonecc. Fixed a bug in redisplay triggered when the prompt string contains 294245868Sjasone invisible characters. 295245868Sjasone 296245868Sjasonedd. Fixed some display (and other) bugs encountered in multibyte locales 297245868Sjasone when a non-ascii character was the last character on a line. 298245868Sjasone 299245868Sjasoneee. Fixed some display bugs caused by multibyte characters in prompt strings. 300245868Sjasone 301245868Sjasoneff. Fixed a problem with history expansion caused by non-whitespace characters 302245868Sjasone used as history word delimiters. 303245868Sjasone 304245868Sjasonegg. Fixed a problem that could cause readline to refer to freed memory when 305245868Sjasone moving between history lines while doing searches. 306245868Sjasone 307245868Sjasonehh. Improvements to the code that expands and displays prompt strings 308245868Sjasone containing multibyte characters. 309245868Sjasone 310245868Sjasoneii. Fixed a problem with vi-mode not correctly remembering the numeric argument 311245868Sjasone to the last `c'hange command for later use with `.'. 312245868Sjasone 313245868Sjasonejj. Fixed a bug in vi-mode that caused multi-digit count arguments to work 314245868Sjasone incorrectly. 315245868Sjasone 316245868Sjasonekk. Fixed a problem in vi-mode that caused the last text modification command 317245868Sjasone to not be remembered across different command lines. 318245868Sjasone 319245868Sjasonell. Fixed problems with changing characters and changing case at the end of 320245868Sjasone the line. 321245868Sjasone 322245868Sjasonemm. Fixed a problem with readline saving the contents of the current line 323245868Sjasone before beginning a non-interactive search. 324245868Sjasone 325245868Sjasonenn. Fixed a problem with EOF detection when using rl_event_hook. 326245868Sjasone 327245868Sjasoneoo. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric 328245868Sjasone arguments. 329245868Sjasone 330245868Sjasone2. New Features in Readline 331245868Sjasone 332245868Sjasonea. History expansion has a new `a' modifier equivalent to the `g' modifier 333245868Sjasone for compatibility with the BSD csh. 334245868Sjasone 335245868Sjasoneb. History expansion has a new `G' modifier equivalent to the BSD csh `g' 336245868Sjasone modifier, which performs a substitution once per word. 337245868Sjasone 338245868Sjasonec. All non-incremental search operations may now undo the operation of 339245868Sjasone replacing the current line with the history line. 340296221Sjasone 341296221Sjasoned. The text inserted by an `a' command in vi mode can be reinserted with 342296221Sjasone `.'. 343263974Sjasone 344296221Sjasonee. New bindable variable, `show-all-if-unmodified'. If set, the readline 345245868Sjasone completer will list possible completions immediately if there is more 346296221Sjasone than one completion and partial completion cannot be performed. 347296221Sjasone 348296221Sjasonef. There is a new application-callable `free_history_entry()' function. 349296221Sjasone 350296221Sjasoneg. History list entries now contain timestamp information; the history file 351296221Sjasone functions know how to read and write timestamp information associated 352234370Sjasone with each entry. 353245868Sjasone 354245868Sjasoneh. Four new key binding functions have been added: 355234370Sjasone 356234370Sjasone rl_bind_key_if_unbound() 357234370Sjasone rl_bind_key_if_unbound_in_map() 358 rl_bind_keyseq_if_unbound() 359 rl_bind_keyseq_if_unbound_in_map() 360 361i. New application variable, rl_completion_quote_character, set to any 362 quote character readline finds before it calls the application completion 363 function. 364 365j. New application variable, rl_completion_suppress_quote, settable by an 366 application completion function. If set to non-zero, readline does not 367 attempt to append a closing quote to a completed word. 368 369k. New application variable, rl_completion_found_quote, set to a non-zero 370 value if readline determines that the word to be completed is quoted. 371 Set before readline calls any application completion function. 372 373l. New function hook, rl_completion_word_break_hook, called when readline 374 needs to break a line into words when completion is attempted. Allows 375 the word break characters to vary based on position in the line. 376 377m. New bindable command: unix-filename-rubout. Does the same thing as 378 unix-word-rubout, but adds `/' to the set of word delimiters. 379 380n. When listing completions, directories have a `/' appended if the 381 `mark-directories' option has been enabled. 382 383------------------------------------------------------------------------------- 384This document details the changes between this version, readline-4.3, 385and the previous version, readline-4.2a. 386 3871. Changes to Readline 388 389a. Fixed output of comment-begin character when listing variable values. 390 391b. Added some default key bindings for common escape sequences produced by 392 HOME and END keys. 393 394c. Fixed the mark handling code to be more emacs-compatible. 395 396d. A bug was fixed in the code that prints possible completions to keep it 397 from printing empty strings in certain circumstances. 398 399e. Change the key sequence printing code to print ESC as M\- if ESC is a 400 meta-prefix character -- it's easier for users to understand than \e. 401 402f. Fixed unstifle_history() to return values that match the documentation. 403 404g. Fixed the event loop (rl_event_hook) to handle the case where the input 405 file descriptor is invalidated. 406 407h. Fixed the prompt display code to work better when the application has a 408 custom redisplay function. 409 410i. Changes to make reading and writing the history file a little faster, and 411 to cope with huge history files without calling abort(3) from xmalloc. 412 413j. The vi-mode `S' and `s' commands are now undone correctly. 414 415k. Fixed a problem which caused the display to be messed up when the last 416 line of a multi-line prompt (possibly containing invisible characters) 417 was longer than the screen width. 418 4192. New Features in Readline 420 421a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both 422 be bound to readline functions. Now the arrow keys may be used in vi 423 insert mode. 424 425b. When listing completions, and the number of lines displayed is more than 426 the screen length, readline uses an internal pager to display the results. 427 This is controlled by the `page-completions' variable (default on). 428 429c. New code to handle editing and displaying multibyte characters. 430 431d. The behavior introduced in bash-2.05a of deciding whether or not to 432 append a slash to a completed name that is a symlink to a directory has 433 been made optional, controlled by the `mark-symlinked-directories' 434 variable (default is the 2.05a behavior). 435 436e. The `insert-comment' command now acts as a toggle if given a numeric 437 argument: if the first characters on the line don't specify a 438 comment, insert one; if they do, delete the comment text 439 440f. New application-settable completion variable: 441 rl_completion_mark_symlink_dirs, allows an application's completion 442 function to temporarily override the user's preference for appending 443 slashes to names which are symlinks to directories. 444 445g. New function available to application completion functions: 446 rl_completion_mode, to tell how the completion function was invoked 447 and decide which argument to supply to rl_complete_internal (to list 448 completions, etc.). 449 450h. Readline now has an overwrite mode, toggled by the `overwrite-mode' 451 bindable command, which could be bound to `Insert'. 452 453i. New application-settable completion variable: 454 rl_completion_suppress_append, inhibits appending of 455 rl_completion_append_character to completed words. 456 457j. New key bindings when reading an incremental search string: ^W yanks 458 the currently-matched word out of the current line into the search 459 string; ^Y yanks the rest of the current line into the search string, 460 DEL or ^H deletes characters from the search string. 461 462------------------------------------------------------------------------------- 463This document details the changes between this version, readline-4.2a, 464and the previous version, readline-4.2. 465 4661. Changes to Readline 467 468a. More `const' and type casting fixes. 469 470b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer 471 overflow problems. 472 473c. The completion code no longer appends a `/' or ` ' to a match when 474 completing a symbolic link that resolves to a directory name, unless 475 the match does not add anything to the word being completed. This 476 means that a tab will complete the word up to the full name, but not 477 add anything, and a subsequent tab will add a slash. 478 479d. Fixed a trivial typo that made the vi-mode `dT' command not work. 480 481e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert. 482 483f. Fixed the tty code so that ^V works more than once. 484 485g. Changed the use of __P((...)) for function prototypes to PARAMS((...)) 486 because the use of __P in typedefs conflicted g++ and glibc. 487 488h. The completion code now attempts to do a better job of preserving the 489 case of the word the user typed if ignoring case in completions. 490 491i. Readline defaults to not echoing the input and lets the terminal 492 initialization code enable echoing if there is a controlling terminal. 493 494j. The key binding code now processes only two hex digits after a `\x' 495 escape sequence, and the documentation was changed to note that the 496 octal and hex escape sequences result in an eight-bit value rather 497 than strict ASCII. 498 499k. Fixed a few places where negative array subscripts could have occurred. 500 501l. Fixed the vi-mode code to use a better method to determine the bounds of 502 the array used to hold the marks, and to avoid out-of-bounds references. 503 504m. Fixed the defines in chardefs.h to work better when chars are signed. 505 506n. Fixed configure.in to use the new names for bash autoconf macros. 507 508o. Readline no longer attempts to define its own versions of some ctype 509 macros if they are implemented as functions in libc but not as macros in 510 <ctype.h>. 511 512p. Fixed a problem where rl_backward could possibly set point to before 513 the beginning of the line. 514 515q. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause 516 include file problems. 517 5182. New Features in Readline 519 520a. Added extern declaration for rl_get_termcap to readline.h, making it a 521 public function (it was always there, just not in readline.h). 522 523b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402, 524 RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2. 525 526c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION. 527 528d. New bindable boolean readline variable: match-hidden-files. Controls 529 completion of files beginning with a `.' (on Unix). Enabled by default. 530 531e. The history expansion code now allows any character to terminate a 532 `:first-' modifier, like csh. 533 534f. The incremental search code remembers the last search string and uses 535 it if ^R^R is typed without a search string. 536 537h. New bindable variable `history-preserve-point'. If set, the history 538 code attempts to place the user at the same location on each history 539 line retrived with previous-history or next-history. 540 541------------------------------------------------------------------------------- 542This document details the changes between this version, readline-4.2, 543and the previous version, readline-4.1. 544 5451. Changes to Readline 546 547a. When setting the terminal attributes on systems using `struct termio', 548 readline waits for output to drain before changing the attributes. 549 550b. A fix was made to the history word tokenization code to avoid attempts to 551 dereference a null pointer. 552 553c. Readline now defaults rl_terminal_name to $TERM if the calling application 554 has left it unset, and tries to initialize with the resultant value. 555 556d. Instead of calling (*rl_getc_function)() directly to get input in certain 557 places, readline now calls rl_read_key() consistently. 558 559e. Fixed a bug in the completion code that allowed a backslash to quote a 560 single quote inside a single-quoted string. 561 562f. rl_prompt is no longer assigned directly from the argument to readline(), 563 but uses memory allocated by readline. This allows constant strings to 564 be passed to readline without problems arising when the prompt processing 565 code wants to modify the string. 566 567g. Fixed a bug that caused non-interactive history searches to return the 568 wrong line when performing multiple searches backward for the same string. 569 570h. Many variables, function arguments, and function return values are now 571 declared `const' where appropriate, to improve behavior when linking with 572 C++ code. 573 574i. The control character detection code now works better on systems where 575 `char' is unsigned by default. 576 577j. The vi-mode numeric argument is now capped at 999999, just like emacs mode. 578 579k. The Function, CPFunction, CPPFunction, and VFunction typedefs have been 580 replaced with a set of specific prototyped typedefs, though they are 581 still in the readline header files for backwards compatibility. 582 583m. Nearly all of the (undocumented) internal global variables in the library 584 now have an _rl_ prefix -- there were a number that did not, like 585 screenheight, screenwidth, alphabetic, etc. 586 587n. The ding() convenience function has been renamed to rl_ding(), though the 588 old function is still defined for backwards compatibility. 589 590o. The completion convenience functions filename_completion_function, 591 username_completion_function, and completion_matches now have an rl_ 592 prefix, though the old names are still defined for backwards compatibility. 593 594p. The functions shared by readline and bash (linkage is satisfied from bash 595 when compiling with bash, and internally otherwise) now have an sh_ prefix. 596 597q. Changed the shared library creation procedure on Linux and BSD/OS 4.x so 598 that the `soname' contains only the major version number rather than the 599 major and minor numbers. 600 601r. Fixed a redisplay bug that occurred when the prompt spanned more than one 602 physical line and contained invisible characters. 603 604s. Added a missing `includedir' variable to the Makefile. 605 606t. When installing the shared libraries, make sure symbolic links are relative. 607 608u. Added configure test so that it can set `${MAKE}' appropriately. 609 610v. Fixed a bug in rl_forward that could cause the point to be set to before 611 the beginning of the line in vi mode. 612 613w. Fixed a bug in the callback read-char interface to make it work when a 614 readline function pushes some input onto the input stream with 615 rl_execute_next (like the incremental search functions). 616 617x. Fixed a file descriptor leak in the history file manipulation code that 618 was tripped when attempting to truncate a non-regular file (like 619 /dev/null). 620 621y. Changes to make all of the exported readline functions declared in 622 readline.h have an rl_ prefix (rltty_set_default_bindings is now 623 rl_tty_set_default_bindings, crlf is now rl_crlf, etc.) 624 625z. The formatted documentation included in the base readline distribution 626 is no longer removed on a `make distclean'. 627 628aa. Some changes were made to avoid gcc warnings with -Wall. 629 630bb. rl_get_keymap_by_name now finds keymaps case-insensitively, so 631 `set keymap EMACS' works. 632 633cc. The history file writing and truncation functions now return a useful 634 status on error. 635 636dd. Fixed a bug that could cause applications to dereference a NULL pointer 637 if a NULL second argument was passed to history_expand(). 638 639ee. If a hook function assigned to rl_event_hook sets rl_done to a non-zero 640 value, rl_read_key() now immediately returns '\n' (which is assumed to 641 be bound to accept-line). 642 6432. New Features in Readline 644 645a. The blink timeout for paren matching is now settable by applications, 646 via the rl_set_paren_blink_timeout() function. 647 648b. _rl_executing_macro has been renamed to rl_executing_macro, which means 649 it's now part of the public interface. 650 651c. Readline has a new variable, rl_readline_state, which is a bitmap that 652 encapsulates the current state of the library; intended for use by 653 callbacks and hook functions. 654 655d. rlfe has a new -l option to log input and output (-a appends to logfile), 656 a new -n option to set the readline application name, and -v and -h 657 options for version and help information. 658 659e. rlfe can now perform filename completion for the inferior process if the 660 OS has a /proc/<PID>/cwd that can be read with readlink(2) to get the 661 inferior's current working directory. 662 663f. A new file, rltypedefs.h, contains the new typedefs for function pointers 664 and is installed by `make install'. 665 666g. New application-callable function rl_set_prompt(const char *prompt): 667 expands its prompt string argument and sets rl_prompt to the result. 668 669h. New application-callable function rl_set_screen_size(int rows, int cols): 670 public method for applications to set readline's idea of the screen 671 dimensions. 672 673i. The history example program (examples/histexamp.c) is now built as one 674 of the examples. 675 676j. The documentation has been updated to cover nearly all of the public 677 functions and variables declared in readline.h. 678 679k. New function, rl_get_screen_size (int *rows, int *columns), returns 680 readline's idea of the screen dimensions. 681 682l. The timeout in rl_gather_tyi (readline keyboard input polling function) 683 is now settable via a function (rl_set_keyboard_input_timeout()). 684 685m. Renamed the max_input_history variable to history_max_entries; the old 686 variable is maintained for backwards compatibility. 687 688n. The list of characters that separate words for the history tokenizer is 689 now settable with a variable: history_word_delimiters. The default 690 value is as before. 691 692o. There is a new history.3 manual page documenting the history library. 693 694------------------------------------------------------------------------------- 695This document details the changes between this version, readline-4.1, 696and the previous version, readline-4.0. 697 6981. Changes to Readline 699 700a. Changed the HTML documents so that the table-of-contents is no longer 701 a separate file. 702 703b. Changes to the shared object configuration for: Irix 5.x, Irix 6.x, 704 OSF/1. 705 706c. The shared library major and minor versions are now constructed 707 automatically by configure and substituted into the makefiles. 708 709d. It's now possible to install the shared libraries separately from the 710 static libraries. 711 712e. The history library tries to truncate the history file only if it is a 713 regular file. 714 715f. A bug that caused _rl_dispatch to address negative array indices on 716 systems with signed chars was fixed. 717 718g. rl-yank-nth-arg now leaves the history position the same as when it was 719 called. 720 721h. Changes to the completion code to handle MS-DOS drive-letter:pathname 722 filenames. 723 724i. Completion is now case-insensitive by default on MS-DOS. 725 726j. Fixes to the history file manipulation code for MS-DOS. 727 728k. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS. 729 730l. Some fixes were made to the redisplay code for better operation on MS-DOS. 731 732m. The quoted-insert code will now insert tty special chars like ^C. 733 734n. A bug was fixed that caused the display code to reference memory before 735 the start of the prompt string. 736 737o. More support for __EMX__ (OS/2). 738 739p. A bug was fixed in readline's signal handling that could cause infinite 740 recursion in signal handlers. 741 742q. A bug was fixed that caused the point to be less than zero when rl_forward 743 was given a very large numeric argument. 744 745r. The vi-mode code now gets characters via the application-settable value 746 of rl_getc_function rather than calling rl_getc directly. 747 748s. The history file code now uses O_BINARY mode when reading and writing 749 the history file on cygwin32. 750 751t. Fixed a bug in the redisplay code for lines with more than 256 line 752 breaks. 753 754u. A bug was fixed which caused invisible character markers to not be 755 stripped from the prompt string if the terminal was in no-echo mode. 756 757v. Readline no longer tries to get the variables it needs for redisplay 758 from the termcap entry if the calling application has specified its 759 own redisplay function. Readline treats the terminal as `dumb' in 760 this case. 761 762w. Fixes to the SIGWINCH code so that a multiple-line prompt with escape 763 sequences is redrawn correctly. 764 765x. Changes to the install and install-shared targets so that the libraries 766 and header files are installed separately. 767 7682. New Features in Readline 769 770a. A new Readline `user manual' is in doc/rluserman.texinfo. 771 772b. Parentheses matching is now always compiled into readline, and enabled 773 or disabled when the value of the `blink-matching-paren' variable is 774 changed. 775 776c. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename. 777 778d. MS-DOS systems now use ~/_history as the default history file. 779 780e. history-search-{forward,backward} now leave the point at the end of the 781 line when the string to search for is empty, like 782 {reverse,forward}-search-history. 783 784f. history-search-{forward,backward} now leave the last history line found 785 in the readline buffer if the second or subsequent search fails. 786 787g. New function for use by applications: rl_on_new_line_with_prompt, used 788 when an application displays the prompt itself before calling readline(). 789 790h. New variable for use by applications: rl_already_prompted. An application 791 that displays the prompt itself before calling readline() must set this to 792 a non-zero value. 793 794i. A new variable, rl_gnu_readline_p, always 1. The intent is that an 795 application can verify whether or not it is linked with the `real' 796 readline library or some substitute. 797 798j. Per Bothner's `rlfe' (pronounced `Ralphie') readline front-end program 799 is included in the examples subdirectory, though it is not built 800 by default. 801 802------------------------------------------------------------------------------- 803This document details the changes between this version, readline-4.0, 804and the previous version, readline-2.2. 805 8061. Changes to Readline 807 808a. The version number is now 4.0, to match the major and minor version 809 numbers on the shared readline and history libraries. Future 810 releases will maintain the identical numbering. 811 812b. Fixed a typo in the `make install' recipe that copied libreadline.a 813 to libhistory.old right after installing it. 814 815c. The readline and history info files are now installed out of the source 816 directory if they are not found in the build directory. 817 818d. The library no longer exports a function named `savestring' -- backwards 819 compatibility be damned. 820 821e. There is no longer any #ifdef SHELL code in the source files. 822 823f. Some changes were made to the key binding code to fix memory leaks and 824 better support Win32 systems. 825 826g. Fixed a silly typo in the paren matching code -- it's microseconds, not 827 milliseconds. 828 829h. The readline library should be compilable by C++ compilers. 830 831i. The readline.h public header file now includes function prototypes for 832 all readline functions, and some changes were made to fix errors in the 833 source files uncovered by the use of prototypes. 834 835j. The maximum numeric argument is now clamped at 1000000. 836 837k. Fixes to rl_yank_last_arg to make it behave better. 838 839l. Fixed a bug in the display code that caused core dumps if the prompt 840 string length exceeded 1024 characters. 841 842m. The menu completion code was fixed to properly insert a single completion 843 if there is only one match. 844 845n. A bug was fixed that caused the display code to improperly display tabs 846 after newlines. 847 848o. A fix was made to the completion code in which a typo caused the wrong 849 value to be passed to the function that computed the longest common 850 prefix of the list of matches. 851 852p. The completion code now checks the value of rl_filename_completion_desired, 853 which is set by application-supplied completion functions to indicate 854 that filename completion is being performed, to decide whether or not to 855 call an application-supplied `ignore completions' function. 856 857q. Code was added to the history library to catch history substitutions 858 using `&' without a previous history substitution or search having been 859 performed. 860 861 8622. New Features in Readline 863 864a. There is a new script, support/shobj-conf, to do system-specific shared 865 object and library configuration. It generates variables for configure 866 to substitute into makefiles. The README file provides a detailed 867 explanation of the shared library creation process. 868 869b. Shared libraries and objects are now built in the `shlib' subdirectory. 870 There is a shlib/Makefile.in to control the build process. `make shared' 871 from the top-level directory is still the right way to build shared 872 versions of the libraries. 873 874c. rlconf.h is now installed, so applications can find out which features 875 have been compiled into the installed readline and history libraries. 876 877d. rlstdc.h is now an installed header file. 878 879e. Many changes to the signal handling: 880 o Readline now catches SIGQUIT and cleans up the tty before returning; 881 o A new variable, rl_catch_signals, is available to application writers 882 to indicate to readline whether or not it should install its own 883 signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, 884 SIGTTIN, and SIGTTOU; 885 o A new variable, rl_catch_sigwinch, is available to application 886 writers to indicate to readline whether or not it should install its 887 own signal handler for SIGWINCH, which will chain to the calling 888 applications's SIGWINCH handler, if one is installed; 889 o There is a new function, rl_free_line_state, for application signal 890 handlers to call to free up the state associated with the current 891 line after receiving a signal; 892 o There is a new function, rl_cleanup_after_signal, to clean up the 893 display and terminal state after receiving a signal; 894 o There is a new function, rl_reset_after_signal, to reinitialize the 895 terminal and display state after an application signal handler 896 returns and readline continues 897 898f. There is a new function, rl_resize_terminal, to reset readline's idea of 899 the screen size after a SIGWINCH. 900 901g. New public functions: rl_save_prompt and rl_restore_prompt. These were 902 previously private functions with a `_' prefix. These functions are 903 used when an application wants to write a message to the `message area' 904 with rl_message and have the prompt restored correctly when the message 905 is erased. 906 907h. New function hook: rl_pre_input_hook, called just before readline starts 908 reading input, after initialization. 909 910i. New function hook: rl_display_matches_hook, called when readline would 911 display the list of completion matches. The new function 912 rl_display_match_list is what readline uses internally, and is available 913 for use by application functions called via this hook. 914 915j. New bindable function, delete-char-or-list, like tcsh. 916 917k. A new variable, rl_erase_empty_line, which, if set by an application using 918 readline, will cause readline to erase, prompt and all, lines on which the 919 only thing typed was a newline. 920 921l. There is a new script, support/shlib-install, to install and uninstall 922 the shared readline and history libraries. 923 924m. A new bindable variable, `isearch-terminators', which is a string 925 containing the set of characters that should terminate an incremental 926 search without being executed as a command. 927 928n. A new bindable function, forward-backward-delete-char. 929 930------------------------------------------------------------------------------- 931This document details the changes between this version, readline-2.2, 932and the previous version, readline-2.1. 933 9341. Changes to Readline 935 936a. Added a missing `extern' to a declaration in readline.h that kept 937 readline from compiling cleanly on some systems. 938 939b. The history file is now opened with mode 0600 when it is written for 940 better security. 941 942c. Changes were made to the SIGWINCH handling code so that prompt redisplay 943 is done better. 944 945d. ^G now interrupts incremental searches correctly. 946 947e. A bug that caused a core dump when the set of characters to be quoted 948 when completing words was empty was fixed. 949 950f. Fixed a problem in the readline test program rltest.c that caused a core 951 dump. 952 953g. The code that handles parser directives in inputrc files now displays 954 more error messages. 955 956h. The history expansion code was fixed so that the appearance of the 957 history comment character at the beginning of a word inhibits history 958 expansion for that word and the rest of the input line. 959 960i. The code that prints completion listings now behaves better if one or 961 more of the filenames contains non-printable characters. 962 963j. The time delay when showing matching parentheses is now 0.5 seconds. 964 965 9662. New Features in Readline 967 968a. There is now an option for `iterative' yank-last-arg handline, so a user 969 can keep entering `M-.', yanking the last argument of successive history 970 lines. 971 972b. New variable, `print-completions-horizontally', which causes completion 973 matches to be displayed across the screen (like `ls -x') rather than up 974 and down the screen (like `ls'). 975 976c. New variable, `completion-ignore-case', which causes filename completion 977 and matching to be performed case-insensitively. 978 979d. There is a new bindable command, `magic-space', which causes history 980 expansion to be performed on the current readline buffer and a space to 981 be inserted into the result. 982 983e. There is a new bindable command, `menu-complete', which enables tcsh-like 984 menu completion (successive executions of menu-complete insert a single 985 completion match, cycling through the list of possible completions). 986 987f. There is a new bindable command, `paste-from-clipboard', for use on Win32 988 systems, to insert the text from the Win32 clipboard into the editing 989 buffer. 990 991g. The key sequence translation code now understands printf-style backslash 992 escape sequences, including \NNN octal escapes. These escape sequences 993 may be used in key sequence definitions or macro values. 994 995h. An `$include' inputrc file parser directive has been added. 996