jpayne@68: This document details the changes between this version, readline-8.2, and jpayne@68: the previous version, readline-8.1. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. Fixed a problem with cleaning up active marks when using callback mode. jpayne@68: jpayne@68: b. Fixed a problem with arithmetic comparison operators checking the version. jpayne@68: jpayne@68: c. Fixed a problem that could cause readline not to build on systems without jpayne@68: POSIX signal functions. jpayne@68: jpayne@68: d. Fixed a bug that could cause readline to crash if the application removed jpayne@68: the callback line handler before readline read all typeahead. jpayne@68: jpayne@68: e. Added additional checks for read errors in the middle of readline commands. jpayne@68: jpayne@68: f. Fixed a redisplay problem that occurred when switching from the digit- jpayne@68: argument prompt `(arg: N)' back to the regular prompt and the regular jpayne@68: prompt contained invisible characters. jpayne@68: jpayne@68: g. Fixed a problem with restoring the prompt when aborting an incremental jpayne@68: search. jpayne@68: jpayne@68: h. Fix a problem with characters > 128 not being displayed correctly in certain jpayne@68: single-byte encodings. jpayne@68: jpayne@68: i. Fixed a problem with unix-filename-rubout that caused it to delete too much jpayne@68: when applied to a pathname consisting only of one or more slashes. jpayne@68: jpayne@68: j. Fixed a display problem that caused the prompt to be wrapped incorrectly if jpayne@68: the screen changed dimensions during a call to readline() and the prompt jpayne@68: became longer than the screen width. jpayne@68: jpayne@68: k. Fixed a problem that caused the \r output by turning off bracketed paste jpayne@68: to overwrite the line if terminal echo was disabled. jpayne@68: jpayne@68: l. Fixed a bug that could cause colored-completion-prefix to not display if jpayne@68: completion-prefix-display-length was set. jpayne@68: jpayne@68: m. Fixed a problem with line wrapping prompts when a group of invisible jpayne@68: characters runs to the right edge of the screen and the prompt extends jpayne@68: longer then the screen width. jpayne@68: jpayne@68: n. Fixed a couple problems that could cause rl_end to be set incorrectly by jpayne@68: transpose-words. jpayne@68: jpayne@68: o. Prevent some display problems when running a command as the result of a jpayne@68: trap or one bound using `bind -x' and the command generates output. jpayne@68: jpayne@68: p. Fixed an issue with multi-line prompt strings that have one or more jpayne@68: invisible characters at the end of a physical line. jpayne@68: jpayne@68: q. Fixed an issue that caused a history line's undo list to be cleared when jpayne@68: it should not have been. jpayne@68: jpayne@68: r. When replacing a history entry, make sure the existing entry has a non-NULL jpayne@68: timestamp before copying it; it may have been added by the application, not jpayne@68: the history library. jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. There is now an HS_HISTORY_VERSION containing the version number of the jpayne@68: history library for applications to use. jpayne@68: jpayne@68: b. History expansion better understands multiple history expansions that may jpayne@68: contain strings that would ordinarily inhibit history expansion (e.g., jpayne@68: `abc!$!$'). jpayne@68: jpayne@68: c. There is a new framework for readline timeouts, including new public jpayne@68: functions to set timeouts and query how much time is remaining before a jpayne@68: timeout hits, and a hook function that can trigger when readline times jpayne@68: out. There is a new state value to indicate a timeout. jpayne@68: jpayne@68: d. Automatically bind termcap key sequences for page-up and page-down to jpayne@68: history-search-backward and history-search-forward, respectively. jpayne@68: jpayne@68: e. There is a new `fetch-history' bindable command that retrieves the history jpayne@68: entry corresponding to its numeric argument. Negative arguments count back jpayne@68: from the end of the history. jpayne@68: jpayne@68: f. `vi-undo' is now a bindable command. jpayne@68: jpayne@68: g. There is a new option: `enable-active-region'. This separates control of jpayne@68: the active region and bracketed-paste. It has the same default value as jpayne@68: bracketed-paste, and enabling bracketed paste enables the active region. jpayne@68: Users can now turn off the active region while leaving bracketed paste jpayne@68: enabled. jpayne@68: jpayne@68: h. rl_completer_word_break_characters is now `const char *' like jpayne@68: rl_basic_word_break_characters. jpayne@68: jpayne@68: i. Readline looks in $LS_COLORS for a custom filename extension jpayne@68: (*.readline-colored-completion-prefix) and uses that as the default color jpayne@68: for the common prefix displayed when `colored-completion-prefix' is set. jpayne@68: jpayne@68: j. Two new bindable string variables: active-region-start-color and jpayne@68: active-region-end-color. The first sets the color used to display the jpayne@68: active region; the second turns it off. If set, these are used in place jpayne@68: of terminal standout mode. jpayne@68: jpayne@68: k. New readline state (RL_STATE_EOF) and application-visible variable jpayne@68: (rl_eof_found) to allow applications to detect when readline reads EOF jpayne@68: before calling the deprep-terminal hook. jpayne@68: jpayne@68: l. There is a new configuration option: --with-shared-termcap-library, which jpayne@68: forces linking the shared readline library with the shared termcap (or jpayne@68: curses/ncurses/termlib) library so applications don't have to do it. jpayne@68: jpayne@68: m. Readline now checks for changes to locale settings (LC_ALL/LC_CTYPE/LANG) jpayne@68: each time it is called, and modifies the appropriate locale-specific display jpayne@68: and key binding variables when the locale changes. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-8.1, and jpayne@68: the previous version, readline-8.0. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. There are a number of fixes that were found as the result of fuzzing with jpayne@68: random input. jpayne@68: jpayne@68: b. Changed the revert-all-at-newline behavior to make sure to start at the end jpayne@68: of the history list when doing it, instead of the line where the user hit jpayne@68: return. jpayne@68: jpayne@68: c. When parsing `set' commands from the inputrc file or an application, readline jpayne@68: now allows trailing whitespace. jpayne@68: jpayne@68: d. Fixed a bug that left a file descriptor open to the history file if the jpayne@68: file size was 0. jpayne@68: jpayne@68: e. Fixed a problem with binding key sequences containing meta characters. jpayne@68: jpayne@68: f. Fixed a bug that caused the wrong line to be displayed if the user tried to jpayne@68: move back beyond the beginning of the history list, or forward past the end jpayne@68: of the history list. jpayne@68: jpayne@68: g. If readline catches SIGTSTP, it now sets a hook that allows the calling jpayne@68: application to handle it if it desires. jpayne@68: jpayne@68: h. Fixed a redisplay problem with a prompt string containing embedded newlines. jpayne@68: jpayne@68: i. Fixed a problem with completing filenames containing invalid multibyte jpayne@68: sequences when case-insensitive comparisons are enabled. jpayne@68: jpayne@68: j. Fixed a redisplay problem with prompt strings containing invisible multibyte jpayne@68: characters. jpayne@68: jpayne@68: k. Fixed a problem with multibyte characters mapped to editing commands that jpayne@68: modify the search string in incremental search. jpayne@68: jpayne@68: l. Fixed a bug with maintaining the key sequence while resolving a bound jpayne@68: command in the presence of ambiguous sequences (sequences with a common jpayne@68: prefix), in most cases while attempting to unbind it. jpayne@68: jpayne@68: m. Fixed several buffer overflows found as the result of fuzzing. jpayne@68: jpayne@68: n. Reworked backslash handling when translating key sequences for key binding jpayne@68: to be more uniform and consistent, which introduces a slight backwards jpayne@68: incompatibility. jpayne@68: jpayne@68: o. Fixed a bug with saving the history that resulted in errors not being jpayne@68: propagated to the calling application when the history file is not writable. jpayne@68: jpayne@68: p. Readline only calls chown(2) on a newly-written history file if it really jpayne@68: needs to, instead of having it be a no-op. jpayne@68: jpayne@68: q. Readline now behaves better when operate-and-get-next is used when the jpayne@68: history list is `full': when there are already $HISTSIZE entries. jpayne@68: jpayne@68: r. Fixed a bug that could cause vi redo (`.') of a replace command not to work jpayne@68: correctly in the C or POSIX locale. jpayne@68: jpayne@68: s. Fixed a bug with vi-mode digit arguments that caused the last command to be jpayne@68: set incorrectly. This prevents yank-last-arg from working as intended, for jpayne@68: example. jpayne@68: jpayne@68: t. Make sure that all undo groups are closed when leaving vi insertion mode. jpayne@68: jpayne@68: u. Make sure that the vi-mode `C' and `c' commands enter insert mode even if jpayne@68: the motion command doesn't have any effect. jpayne@68: jpayne@68: v. Fixed several potential memory leaks in the callback mode context handling. jpayne@68: jpayne@68: w. If readline is handling a SIGTTOU, make sure SIGTTOU is blocked while jpayne@68: executing the terminal cleanup code, since it's no longer run in a signal jpayne@68: handling context. jpayne@68: jpayne@68: x. Fixed a bug that could cause an application with an application-specific jpayne@68: redisplay function to crash if the line data structures had not been jpayne@68: initialized. jpayne@68: jpayne@68: y. Terminals that are named "dumb" or unknown do not enable bracketed paste jpayne@68: by default. jpayne@68: jpayne@68: z. Ensure that disabling bracketed paste turns off highlighting the incremental jpayne@68: search string when the search is successful. jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. If a second consecutive completion attempt produces matches where the first jpayne@68: did not, treat it as a new completion attempt and insert a match as jpayne@68: appropriate. jpayne@68: jpayne@68: b. Bracketed paste mode works in more places: incremental search strings, vi jpayne@68: overstrike mode, character search, and reading numeric arguments. jpayne@68: jpayne@68: c. Readline automatically switches to horizontal scrolling if the terminal has jpayne@68: only one line. jpayne@68: jpayne@68: d. Unbinding all key sequences bound to a particular readline function now jpayne@68: descends into keymaps for multi-key sequences. jpayne@68: jpayne@68: e. rl-clear-display: new bindable command that clears the screen and, if jpayne@68: possible, the scrollback buffer (bound to emacs mode M-C-l by default). jpayne@68: jpayne@68: f. New active mark and face feature: when enabled, it will highlight the text jpayne@68: inserted by a bracketed paste (the `active region') and the text found by jpayne@68: incremental and non-incremental history searches. This is tied to bracketed jpayne@68: paste and can be disabled by turning off bracketed paste. jpayne@68: jpayne@68: g. Readline sets the mark in several additional commands. jpayne@68: jpayne@68: h. Bracketed paste mode is enabled by default. There is a configure-time jpayne@68: option (--enable-bracketed-paste-default) to set the default to on or off. jpayne@68: jpayne@68: i. Readline tries to take advantage of the more regular structure of UTF-8 jpayne@68: characters to identify the beginning and end of characters when moving jpayne@68: through the line buffer. jpayne@68: jpayne@68: j. The bindable operate-and-get-next command (and its default bindings) are jpayne@68: now part of readline instead of a bash-specific addition. jpayne@68: jpayne@68: k. The signal cleanup code now blocks SIGINT while processing after a SIGINT. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-8.0, and the jpayne@68: previous version, readline-7.0. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. Added a guard to prevent nested macros from causing an infinite expansion jpayne@68: loop. jpayne@68: jpayne@68: b. Instead of allocating enough history list entries to hold the maximum list jpayne@68: size, cap the number allocated initially. jpayne@68: jpayne@68: c. Added a strategy to avoid allocating huge amounts of memory if a block of jpayne@68: history entries without timestamps occurs after a block with timestamps. jpayne@68: jpayne@68: d. Added support for keyboard timeouts when an ESC character is the last jpayne@68: character in a macro. jpayne@68: jpayne@68: e. There are several performance improvements when in a UTF-8 locale. jpayne@68: jpayne@68: f. Readline does a better job of preserving the original set of blocked jpayne@68: signals when using pselect() to wait for input. jpayne@68: jpayne@68: g. Fixed a bug that caused multibyte characters in macros to be mishandled. jpayne@68: jpayne@68: h. Fixed several bugs in the code that calculates line breaks when expanding jpayne@68: prompts that span several lines, contain multibyte characters, and contain jpayne@68: invisible character seqeuences. jpayne@68: jpayne@68: i. Fixed several bugs in cursor positioning when displaying lines with prompts jpayne@68: containing invisible characters and multibyte characters. jpayne@68: jpayne@68: j. When performing case-insensitive completion, Readline no longer sorts the jpayne@68: list of matches unless directed to do so. jpayne@68: jpayne@68: k. Fixed a problem with key sequences ending with a backslash. jpayne@68: jpayne@68: l. Fixed out-of-bounds and free memory read errors found via fuzzing. jpayne@68: jpayne@68: m. Fixed several cases where the mark was set to an invalid value. jpayne@68: jpayne@68: n. Fixed a problem with the case-changing operators in the case where the jpayne@68: lower and upper case versions of a character do not have the same number jpayne@68: of bytes. jpayne@68: jpayne@68: o. Handle incremental and non-incremental search character reads returning EOF. jpayne@68: jpayne@68: p. Handle the case where a failing readline command at the end of a multi-key jpayne@68: sequence could be misinterpreted. jpayne@68: jpayne@68: q. The history library now prints a meaningful error message if the history jpayne@68: file isn't a regular file. jpayne@68: jpayne@68: r. Fixed a problem with vi-mode redo (`.') on a command when trying to replace jpayne@68: a multibyte character. jpayne@68: jpayne@68: s. The key binding code now attempts to remove a keymap if a key unbinding jpayne@68: leaves it empty. jpayne@68: jpayne@68: t. Fixed a line-wrapping issue that caused problems for some terminal jpayne@68: emulators. jpayne@68: jpayne@68: u. If there is a key bound to the tty's VDISCARD special character, readline jpayne@68: disables VDISCARD while it is active. jpayne@68: jpayne@68: v. Fixed a problem with exiting bracketed paste mode on terminals that assume jpayne@68: the bracketed paste mode character sequence contains visible characters. jpayne@68: jpayne@68: w. Fixed a bug that could cause a key binding command to refer to an jpayne@68: uninitialized variable. jpayne@68: jpayne@68: x. Added more UTF-8-specific versions of multibyte functions, and optimized jpayne@68: existing functions if the current locale uses UTF-8 encoding. jpayne@68: jpayne@68: y. Fixed a problem with bracketed-paste inserting more than one character and jpayne@68: interacting with other readline functions. jpayne@68: jpayne@68: z. Fixed a bug that caused the history library to attempt to append a history jpayne@68: line to a non-existent history entry. jpayne@68: jpayne@68: aa. If using bracketed paste mode, output a newline after the \r that is the jpayne@68: last character of the mode disable string to avoid overwriting output. jpayne@68: jpayne@68: bb. Fixes to the vi-mode `b', `B', `w', `W', `e', and `E' commands to better jpayne@68: handle multibyte characters. jpayne@68: jpayne@68: cc. Fixed a redisplay problem that caused an extra newline to be generated on jpayne@68: accept-line when the line length is exactly the screenwidth. jpayne@68: jpayne@68: dd. Fixed a bug with adding multibyte characters to an incremental search jpayne@68: string. jpayne@68: jpayne@68: ee. Fixed a bug with redoing text insertions in vi mode. jpayne@68: jpayne@68: ff. Fixed a bug with pasting text into an incremental search string if bracketed jpayne@68: paste mode is enabled. ESC cannot be one of the incremental search jpayne@68: terminator characters for this to work. jpayne@68: jpayne@68: gg. Fixed a bug with anchored search patterns when performing searches in vi jpayne@68: mode. jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as jpayne@68: Posix specifies (uses fnmatch(3) if available). jpayne@68: jpayne@68: b. There are new `next-screen-line' and `previous-screen-line' bindable jpayne@68: commands, which move the cursor to the same column in the next, or previous, jpayne@68: physical line, respectively. jpayne@68: jpayne@68: c. There are default key bindings for control-arrow-key key combinations. jpayne@68: jpayne@68: d. A negative argument (-N) to `quoted-insert' means to insert the next N jpayne@68: characters using quoted-insert. jpayne@68: jpayne@68: e. New public function: rl_check_signals(), which allows applications to jpayne@68: respond to signals that readline catches while waiting for input using jpayne@68: a custom read function. jpayne@68: jpayne@68: f. There is new support for conditionally testing the readline version in an jpayne@68: inputrc file, with a full set of arithmetic comparison operators available. jpayne@68: jpayne@68: g. There is a simple variable comparison facility available for use within an jpayne@68: inputrc file. Allowable operators are equality and inequality; string jpayne@68: variables may be compared to a value; boolean variables must be compared to jpayne@68: either `on' or `off'; variable names are separated from the operator by jpayne@68: whitespace. jpayne@68: jpayne@68: h. The history expansion library now understands command and process jpayne@68: substitution and extended globbing and allows them to appear anywhere in a jpayne@68: word. jpayne@68: jpayne@68: i. The history library has a new variable that allows applications to set the jpayne@68: initial quoting state, so quoting state can be inherited from a previous jpayne@68: line. jpayne@68: jpayne@68: j. Readline now allows application-defined keymap names; there is a new public jpayne@68: function, rl_set_keymap_name(), to do that. jpayne@68: jpayne@68: k. The "Insert" keypad key, if available, now puts readline into overwrite jpayne@68: mode. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-7.0, and the jpayne@68: previous version, readline-6.3. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y' jpayne@68: commands with modifiers was fixed. jpayne@68: jpayne@68: b. Fixed a bug that caused callback mode to dump core when reading a jpayne@68: multiple-key sequence (e.g., arrow keys). jpayne@68: jpayne@68: c. Fixed a bug that caused the redisplay code to erase some of the line when jpayne@68: using horizontal scrolling with incremental search. jpayne@68: jpayne@68: d. Readline's input handler now performs signal processing if read(2) is jpayne@68: interrupted by SIGALRM or SIGVTALRM. jpayne@68: jpayne@68: e. Fixed a problem with revert-all-at-newline freeing freed memory. jpayne@68: jpayne@68: f. Clarified the documentation for the history_quotes_inhibit_expansion jpayne@68: variable to note that it inhibits scanning for the history comment jpayne@68: character and that it only affects double-quoted strings. jpayne@68: jpayne@68: g. Fixed an off-by-one error in the prompt printed when performing searches. jpayne@68: jpayne@68: h. Use pselect(2), if available, to wait for input before calling read(2), so jpayne@68: a SIGWINCH can interrupt it, since it doesn't interrupt read(2). jpayne@68: jpayne@68: i. Some memory leaks caused by signals interrupting filename completion have jpayne@68: been fixed. jpayne@68: jpayne@68: j. Reading EOF twice on a non-empty line causes EOF to be returned, rather jpayne@68: than the partial line. This can cause partial lines to be executed on jpayne@68: SIGHUP, for example. jpayne@68: jpayne@68: k. Fixed a bug concerning deleting multibyte characters from the search jpayne@68: string while performing an incremental search. jpayne@68: jpayne@68: l. Fixed a bug with tilde expanding directory names in filename completion. jpayne@68: jpayne@68: m. Fixed a bug that did not allow binding sequences beginning with a `\'. jpayne@68: jpayne@68: n. Fixed a redisplay bug involving incorrect line wrapping when the prompt jpayne@68: contains a multibyte character in the last screen column. jpayne@68: jpayne@68: o. Fixed a bug that caused history expansion to disregard characters that are jpayne@68: documented to delimit a history event specifier without requiring `:'. jpayne@68: jpayne@68: p. Fixed a bug that could cause reading past the end of a string when reading jpayne@68: the value when binding the set of isearch terminators. jpayne@68: jpayne@68: q. Fixed a bug that caused readline commands that depend on knowing which jpayne@68: key invoked them to misbehave when dispatching key sequences that are jpayne@68: prefixes of other key bindings. jpayne@68: jpayne@68: r. Paren matching now works in vi insert mode. jpayne@68: jpayne@68: s. Colored completion prefixes are now displayed using a different color, less jpayne@68: likely to collide with files. jpayne@68: jpayne@68: t. Fixed a bug that caused vi-mode character search to misbehave when jpayne@68: running in callback mode. jpayne@68: jpayne@68: u. Fixed a bug that caused output to be delayed when input is coming from a jpayne@68: macro in vi-mode. jpayne@68: jpayne@68: v. Fixed a bug that caused the vi-mode `.' command to misbehave when redoing jpayne@68: a multi-key key sequence via a macro. jpayne@68: jpayne@68: w. Fixed a bug that caused problems with applications that supply their own jpayne@68: input function when performing completion. jpayne@68: jpayne@68: x. When read returns -1/EIO when attempting to read a key, return an error jpayne@68: instead of line termination back to the caller. jpayne@68: jpayne@68: y. Updated tty auditing feature based on patch from Red Hat. jpayne@68: jpayne@68: z. Fixed a bug that could cause the history library to crash on overflows jpayne@68: introduced by malicious editing of timestamps in the history file. jpayne@68: jpayne@68: aa. The history file writing functions only attempt to create and use a backup jpayne@68: history file if the history file exists and is a regular file. jpayne@68: jpayne@68: bb. Fixed an out-of-bounds read in readline's internal tilde expansion interface. jpayne@68: jpayne@68: cc. Fixed several redisplay bugs with prompt strings containing multibyte jpayne@68: and non-visible characters whose physical length is longer than the screen jpayne@68: width. jpayne@68: jpayne@68: dd. Fixed a redisplay bug with prompt strings containing invisible characters jpayne@68: whose physical length exceeds the screen width and using incremental search. jpayne@68: jpayne@68: ee. Readline prints more descriptive error messages when it encounters errors jpayne@68: while reading an inputrc file. jpayne@68: jpayne@68: ff. Fixed a bug in the character insertion code that attempts to optimize jpayne@68: typeahead when it reads a character that is not bound to self-insert and jpayne@68: resets the key sequence state. jpayne@68: jpayne@68: gg. When refreshing the line as the result of a key sequence, Readline attempts jpayne@68: to redraw only the last line of a multiline prompt. jpayne@68: jpayne@68: hh. Fixed an issue that caused completion of git commands to display jpayne@68: incorrectly when using colored-completion-prefix. jpayne@68: jpayne@68: ii. Fixed several redisplay bugs having to do with multibyte characters and jpayne@68: invisible characters in prompt strings. jpayne@68: jpayne@68: jj. Fixed a bug that caused mode strings to be displayed incorrectly if the jpayne@68: prompt was shorter than the mode string. jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. The history truncation code now uses the same error recovery mechanism as jpayne@68: the history writing code, and restores the old version of the history file jpayne@68: on error. The error recovery mechanism handles symlinked history files. jpayne@68: jpayne@68: b. There is a new bindable variable, `enable-bracketed-paste', which enables jpayne@68: support for a terminal's bracketed paste mode. jpayne@68: jpayne@68: c. The editing mode indicators can now be strings and are user-settable jpayne@68: (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string' jpayne@68: variables). Mode strings can contain invisible character sequences. jpayne@68: Setting mode strings to null strings restores the defaults. jpayne@68: jpayne@68: d. Prompt expansion adds the mode string to the last line of a multi-line jpayne@68: prompt (one with embedded newlines). jpayne@68: jpayne@68: e. There is a new bindable variable, `colored-completion-prefix', which, if jpayne@68: set, causes the common prefix of a set of possible completions to be jpayne@68: displayed in color. jpayne@68: jpayne@68: f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs- jpayne@68: mode yank-pop. jpayne@68: jpayne@68: g. The redisplay code underwent several efficiency improvements for multibyte jpayne@68: locales. jpayne@68: jpayne@68: h. The insert-char function attempts to batch-insert all pending typeahead jpayne@68: that maps to self-insert, as long as it is coming from the terminal. jpayne@68: jpayne@68: i. rl_callback_sigcleanup: a new application function that can clean up and jpayne@68: unset any state set by readline's callback mode. Intended to be used jpayne@68: after a signal. jpayne@68: jpayne@68: j. If an incremental search string has its last character removed with DEL, the jpayne@68: resulting empty search string no longer matches the previous line. jpayne@68: jpayne@68: k. If readline reads a history file that begins with `#' (or the value of jpayne@68: the history comment character) and has enabled history timestamps, the history jpayne@68: entries are assumed to be delimited by timestamps. This allows multi-line jpayne@68: history entries. jpayne@68: jpayne@68: l. Readline now throws an error if it parses a key binding without a terminating jpayne@68: `:' or whitespace. jpayne@68: jpayne@68: m. The default binding for ^W in vi mode now uses word boundaries specified jpayne@68: by Posix (vi-unix-word-rubout is bindable command name). jpayne@68: jpayne@68: n. rl_clear_visible_line: new application-callable function; clears all jpayne@68: screen lines occupied by the current visible readline line. jpayne@68: jpayne@68: o. rl_tty_set_echoing: application-callable function that controls whether jpayne@68: or not readline thinks it is echoing terminal output. jpayne@68: jpayne@68: p. Handle >| and strings of digits preceding and following redirection jpayne@68: specifications as single tokens when tokenizing the line for history jpayne@68: expansion. jpayne@68: jpayne@68: q. Fixed a bug with displaying completions when the prefix display length jpayne@68: is greater than the length of the completions to be displayed. jpayne@68: jpayne@68: r. The :p history modifier now applies to the entire line, so any expansion jpayne@68: specifying :p causes the line to be printed instead of expanded. jpayne@68: jpayne@68: s. New application-callable function: rl_pending_signal(): returns the signal jpayne@68: number of any signal readline has caught but not yet handled. jpayne@68: jpayne@68: t. New application-settable variable: rl_persistent_signal_handlers: if set jpayne@68: to a non-zero value, readline will enable the readline-6.2 signal handler jpayne@68: behavior in callback mode: handlers are installed when jpayne@68: rl_callback_handler_install is called and removed removed when a complete jpayne@68: line has been read. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-6.3, and the jpayne@68: previous version, readline-6.2. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. Fixed a bug that did not allow the `dd', `cc', or `yy' vi editing mode jpayne@68: commands to work on the entire line. jpayne@68: jpayne@68: b. Fixed a bug that caused redisplay problems with prompts longer than 128 jpayne@68: characters and history searches. jpayne@68: jpayne@68: c. Fixed a bug that caused readline to try and run code to modify its idea jpayne@68: of the screen size in a signal handler context upon receiving a SIGWINCH. jpayne@68: jpayne@68: d. Fixed a bug that caused the `meta' key to be enabled beyond the duration jpayne@68: of an individual call top readline(). jpayne@68: jpayne@68: e. Added a workaround for a wcwidth bug in Mac OS X that caused readline's jpayne@68: redisplay to mishandle zero-width combining characters. jpayne@68: jpayne@68: f. Fixed a bug that caused readline to `forget' part of a key sequence when jpayne@68: a multiple-key sequence caused it to break out of an incremental search. jpayne@68: jpayne@68: g. Fixed bugs that caused readline to execute code in a signal handler jpayne@68: context if interrupted while reading from the file system during completion. jpayne@68: jpayne@68: h. Fixed a bug that caused readline to `forget' part of a key sequence when jpayne@68: reading an unbound multi-character key sequence. jpayne@68: jpayne@68: i. Fixed a bug that caused Readline's signal handlers to be installed beyond jpayne@68: the bounds of a single call to readline(). jpayne@68: jpayne@68: j. Fixed a bug that caused the `.' command to not redo the most recent `R' jpayne@68: command in vi mode. jpayne@68: jpayne@68: k. Fixed a bug that caused ignoring case in completion matches to result in jpayne@68: readline using the wrong match. jpayne@68: jpayne@68: l. Paren matching now works in vi insert mode. jpayne@68: jpayne@68: m. Fix menu-completion to make show-all-if-ambiguous and menu-complete-display-prefix jpayne@68: work together. jpayne@68: jpayne@68: n. Fixed a bug that didn't allow the `cc', `dd', or `yy' commands to be redone jpayne@68: in vi editing mode. jpayne@68: jpayne@68: o. Fixed a bug that caused the filename comparison code to not compare jpayne@68: multibyte characters correctly when using case-sensitive or case-mapping jpayne@68: comparisons. jpayne@68: jpayne@68: p. Fixed the input reading loop to call the input hook function only when there jpayne@68: is no terminal input available. jpayne@68: jpayne@68: q. Fixed a bug that caused binding a macro to a multi-character key sequence jpayne@68: where the sequence and macro value share a common prefix to not perform jpayne@68: the macro replacement. jpayne@68: jpayne@68: r. Fixed several redisplay errors with multibyte characters and prompts jpayne@68: containing invisible characters when using horizontal scrolling. jpayne@68: jpayne@68: s. Fixed a bug that caused redisplay errors when trying to overwrite jpayne@68: existing characters using multibyte characters. jpayne@68: jpayne@68: t. Fixed a bug in vi mode that caused the arrow keys to set the saved last jpayne@68: vi-mode command to the wrong value. jpayne@68: jpayne@68: u. Fixed a bug that caused double-quoted strings to be scanned incorrectly jpayne@68: when being used as the value of a readline variable assignment. jpayne@68: jpayne@68: v. Fixed a bug with vi mode that prevented `.' from repeating a command jpayne@68: entered on a previous line (command). jpayne@68: jpayne@68: w. Fixed a bug that could cause completion to core dump if it was interrupted jpayne@68: by a signal. jpayne@68: jpayne@68: x. Fixed a bug that could cause readline to crash and seg fault attempting to jpayne@68: expand an empty history entry. jpayne@68: jpayne@68: y. Fixed a bug that caused display problems with multi-line prompts containing jpayne@68: invisible characters on multiple lines. jpayne@68: jpayne@68: z. Fixed a bug that caused effects made by undoing changes to a history line to jpayne@68: be discarded. jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. Readline is now more responsive to SIGHUP and other fatal signals when jpayne@68: reading input from the terminal or performing word completion but no jpayne@68: longer attempts to run any not-allowable functions from a signal handler jpayne@68: context. jpayne@68: jpayne@68: b. There are new bindable commands to search the history for the string of jpayne@68: characters between the beginning of the line and the point jpayne@68: (history-substring-search-forward, history-substring-search-backward) jpayne@68: jpayne@68: c. Readline allows quoted strings as the values of variables when setting jpayne@68: them with `set'. As a side effect, trailing spaces and tabs are ignored jpayne@68: when setting a string variable's value. jpayne@68: jpayne@68: d. The history library creates a backup of the history file when writing it jpayne@68: and restores the backup on a write error. jpayne@68: jpayne@68: e. New application-settable variable: rl_filename_stat_hook: a function called jpayne@68: with a filename before using it in a call to stat(2). Bash uses it to jpayne@68: expand shell variables so things like $HOME/Downloads have a slash jpayne@68: appended. jpayne@68: jpayne@68: f. New bindable function `print-last-kbd-macro', prints the most-recently- jpayne@68: defined keyboard macro in a reusable format. jpayne@68: jpayne@68: g. New user-settable variable `colored-stats', enables use of colored text jpayne@68: to denote file types when displaying possible completions (colored analog jpayne@68: of visible-stats). jpayne@68: jpayne@68: h. New user-settable variable `keyseq-timout', acts as an inter-character jpayne@68: timeout when reading input or incremental search strings. jpayne@68: jpayne@68: i. New application-callable function: rl_clear_history. Clears the history list jpayne@68: and frees all readline-associated private data. jpayne@68: jpayne@68: j. New user-settable variable, show-mode-in-prompt, adds a characters to the jpayne@68: beginning of the prompt indicating the current editing mode. jpayne@68: jpayne@68: k. New application-settable variable: rl_input_available_hook; function to be jpayne@68: called when readline needs to check whether there is data available on its jpayne@68: input source. The default hook checks rl_instream. jpayne@68: jpayne@68: l. Readline calls an application-set event hook (rl_signal_event_hook) after jpayne@68: it gets a signal while reading input (read returns -1/EINTR but readline jpayne@68: does not handle the signal immediately) to allow the application to handle jpayne@68: or otherwise note it. Not currently called for SIGHUP or SIGTERM. jpayne@68: jpayne@68: m. If the user-settable variable `history-size' is set to a value less than jpayne@68: 0, the history list size is unlimited. jpayne@68: jpayne@68: n. When creating shared libraries on Mac OS X, the pathname written into the jpayne@68: library (install_name) no longer includes the minor version number. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-6.2, jpayne@68: and the previous version, readline-6.1. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. Fixed a bug that caused the unconverted filename to be added to the list of jpayne@68: completions when the application specified filename conversion functions. jpayne@68: jpayne@68: b. Fixed a bug that caused the wrong filename to be passed to opendir when the jpayne@68: application has specified a filename dequoting function. jpayne@68: jpayne@68: c. Fixed a bug when repeating a character search in vi mode in the case where jpayne@68: there was no search to repeat. jpayne@68: jpayne@68: d. When show-all-if-ambiguous is set, the completion routines no longer insert jpayne@68: a common match prefix that is shorter than the text being completed. jpayne@68: jpayne@68: e. The full set of vi editing commands may now be used in callback mode. jpayne@68: jpayne@68: f. Fixed a bug that caused readline to not update its idea of the terminal jpayne@68: dimensions while running in `no-echo' mode. jpayne@68: jpayne@68: h. Fixed a bug that caused readline to dump core if an application called jpayne@68: rl_prep_terminal without setting rl_instream. jpayne@68: jpayne@68: i. Fixed a bug that caused meta-prefixed characters bound to incremental jpayne@68: search forward or backward to not be recognized if they were typed jpayne@68: subsequently. jpayne@68: jpayne@68: j. The incremental search code treats key sequences that map to the same jpayne@68: functions as (default) ^G, ^W, and ^Y as equivalent to those characters. jpayne@68: jpayne@68: k. Fixed a bug in menu-complete that caused it to misbehave with large jpayne@68: negative argument. jpayne@68: jpayne@68: l. Fixed a bug that caused vi-mode yank-last-arg to ring the bell when invoked jpayne@68: at the end of the line. jpayne@68: jpayne@68: m. Fixed a bug that made an explicit argument of 0 to yank-last-arg behave jpayne@68: as if it were a negative argument. jpayne@68: jpayne@68: n. Fixed a bug that caused directory names in words to be completed to not jpayne@68: be dequoted correctly. jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. The history library does not try to write the history filename in the jpayne@68: current directory if $HOME is unset. This closes a potential security jpayne@68: problem if the application does not specify a history filename. jpayne@68: jpayne@68: b. New bindable variable `completion-display-width' to set the number of jpayne@68: columns used when displaying completions. jpayne@68: jpayne@68: c. New bindable variable `completion-case-map' to cause case-insensitive jpayne@68: completion to treat `-' and `_' as identical. jpayne@68: jpayne@68: d. There are new bindable vi-mode command names to avoid readline's case- jpayne@68: insensitive matching not allowing them to be bound separately. jpayne@68: jpayne@68: e. New bindable variable `menu-complete-display-prefix' causes the menu jpayne@68: completion code to display the common prefix of the possible completions jpayne@68: before cycling through the list, instead of after. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-6.1, jpayne@68: and the previous version, readline-6.0. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. The SIGWINCH signal handler now avoids calling the redisplay code if jpayne@68: one arrives while in the middle of redisplay. jpayne@68: jpayne@68: b. Changes to the timeout code to make sure that timeout values greater jpayne@68: than one second are handled better. jpayne@68: jpayne@68: c. Fixed a bug in the redisplay code that was triggered by a prompt jpayne@68: containing invisible characters exactly the width of the screen. jpayne@68: jpayne@68: d. Fixed a bug in the redisplay code encountered when running in horizontal jpayne@68: scroll mode. jpayne@68: jpayne@68: e. Fixed a bug that prevented menu completion from properly completing jpayne@68: filenames. jpayne@68: jpayne@68: f. Fixed a redisplay bug caused by a multibyte character causing a line to jpayne@68: wrap. jpayne@68: jpayne@68: g. Fixed a bug that caused key sequences of two characters to not be jpayne@68: recognized when a longer sequence identical in the first two characters jpayne@68: was bound. jpayne@68: jpayne@68: h. Fixed a bug that caused history expansion to be attempted on $'...' jpayne@68: single-quoted strings. jpayne@68: jpayne@68: i. Fixed a bug that caused incorrect redisplay when the prompt contained jpayne@68: multibyte characters in an `invisible' sequence bracketed by \[ and jpayne@68: \]. jpayne@68: jpayne@68: j. Fixed a bug that caused history expansion to short-circuit after jpayne@68: encountering a multibyte character. jpayne@68: jpayne@68: k. Fixed a bug that caused applications using the callback interface to not jpayne@68: react to SIGINT (or other signals) until another character arrived. jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. New bindable function: menu-complete-backward. jpayne@68: jpayne@68: b. In the vi insertion keymap, C-n is now bound to menu-complete by default, jpayne@68: and C-p to menu-complete-backward. jpayne@68: jpayne@68: c. When in vi command mode, repeatedly hitting ESC now does nothing, even jpayne@68: when ESC introduces a bound key sequence. This is closer to how jpayne@68: historical vi behaves. jpayne@68: jpayne@68: d. New bindable function: skip-csi-sequence. Can be used as a default to jpayne@68: consume key sequences generated by keys like Home and End without having jpayne@68: to bind all keys. jpayne@68: jpayne@68: e. New application-settable function: rl_filename_rewrite_hook. Can be used jpayne@68: to rewrite or modify filenames read from the file system before they are jpayne@68: compared to the word to be completed. jpayne@68: jpayne@68: f. New bindable variable: skip-completed-text, active when completing in the jpayne@68: middle of a word. If enabled, it means that characters in the completion jpayne@68: that match characters in the remainder of the word are "skipped" rather jpayne@68: than inserted into the line. jpayne@68: jpayne@68: g. The pre-readline-6.0 version of menu completion is available as jpayne@68: "old-menu-complete" for users who do not like the readline-6.0 version. jpayne@68: jpayne@68: h. New bindable variable: echo-control-characters. If enabled, and the jpayne@68: tty ECHOCTL bit is set, controls the echoing of characters corresponding jpayne@68: to keyboard-generated signals. jpayne@68: jpayne@68: i. New bindable variable: enable-meta-key. Controls whether or not readline jpayne@68: sends the smm/rmm sequences if the terminal indicates it has a meta key jpayne@68: that enables eight-bit characters. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-6.0, jpayne@68: and the previous version, readline-5.2. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. Fixed a number of redisplay errors in environments supporting multibyte jpayne@68: characters. jpayne@68: jpayne@68: b. Fixed bugs in vi command mode that caused motion commands to inappropriately jpayne@68: set the mark. jpayne@68: jpayne@68: c. When using the arrow keys in vi insertion mode, readline allows movement jpayne@68: beyond the current end of the line (unlike command mode). jpayne@68: jpayne@68: d. Fixed bugs that caused readline to loop when the terminal has been taken jpayne@68: away and reads return -1/EIO. jpayne@68: jpayne@68: e. Fixed bugs in redisplay occurring when displaying prompts containing jpayne@68: invisible characters. jpayne@68: jpayne@68: f. Fixed a bug that caused the completion append character to not be reset to jpayne@68: the default after an application-specified completion function changed it. jpayne@68: jpayne@68: g. Fixed a problem that caused incorrect positioning of the cursor while in jpayne@68: emacs editing mode when moving forward at the end of a line while using jpayne@68: a locale supporting multibyte characters. jpayne@68: jpayne@68: h. Fixed an off-by-one error that caused readline to drop every 511th jpayne@68: character of buffered input. jpayne@68: jpayne@68: i. Fixed a bug that resulted in SIGTERM not being caught or cleaned up. jpayne@68: jpayne@68: j. Fixed redisplay bugs caused by multiline prompts with invisible characters jpayne@68: or no characters following the final newline. jpayne@68: jpayne@68: k. Fixed redisplay bug caused by prompts consisting solely of invisible jpayne@68: characters. jpayne@68: jpayne@68: l. Fixed a bug in the code that buffers characters received very quickly in jpayne@68: succession which caused characters to be dropped. jpayne@68: jpayne@68: m. Fixed a bug that caused readline to reference uninitialized data structures jpayne@68: if it received a SIGWINCH before completing initialization. jpayne@68: jpayne@68: n. Fixed a bug that caused the vi-mode `last command' to be set incorrectly jpayne@68: and therefore unrepeatable. jpayne@68: jpayne@68: o. Fixed a bug that caused readline to disable echoing when it was being used jpayne@68: with an output file descriptor that was not a terminal. jpayne@68: jpayne@68: p. Readline now blocks SIGINT while manipulating internal data structures jpayne@68: during redisplay. jpayne@68: jpayne@68: q. Fixed a bug in redisplay that caused readline to segfault when pasting a jpayne@68: very long line (over 130,000 characters). jpayne@68: jpayne@68: r. Fixed bugs in redisplay when using prompts with no visible printing jpayne@68: characters. jpayne@68: jpayne@68: s. Fixed a bug that caused redisplay errors when using prompts with invisible jpayne@68: characters and numeric arguments to a command in a multibyte locale. jpayne@68: jpayne@68: t. Fixed a bug that caused redisplay errors when using prompts with invisible jpayne@68: characters spanning more than two physical screen lines. jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. A new variable, rl_sort_completion_matches; allows applications to inhibit jpayne@68: match list sorting (but beware: some things don't work right if jpayne@68: applications do this). jpayne@68: jpayne@68: b. A new variable, rl_completion_invoking_key; allows applications to discover jpayne@68: the key that invoked rl_complete or rl_menu_complete. jpayne@68: jpayne@68: c. The functions rl_block_sigint and rl_release_sigint are now public and jpayne@68: available to calling applications who want to protect critical sections jpayne@68: (like redisplay). jpayne@68: jpayne@68: d. The functions rl_save_state and rl_restore_state are now public and jpayne@68: available to calling applications; documented rest of readline's state jpayne@68: flag values. jpayne@68: jpayne@68: e. A new user-settable variable, `history-size', allows setting the maximum jpayne@68: number of entries in the history list. jpayne@68: jpayne@68: f. There is a new implementation of menu completion, with several improvements jpayne@68: over the old; the most notable improvement is a better `completions jpayne@68: browsing' mode. jpayne@68: jpayne@68: g. The menu completion code now uses the rl_menu_completion_entry_function jpayne@68: variable, allowing applications to provide their own menu completion jpayne@68: generators. jpayne@68: jpayne@68: h. There is support for replacing a prefix of a pathname with a `...' when jpayne@68: displaying possible completions. This is controllable by setting the jpayne@68: `completion-prefix-display-length' variable. Matches with a common prefix jpayne@68: longer than this value have the common prefix replaced with `...'. jpayne@68: jpayne@68: i. There is a new `revert-all-at-newline' variable. If enabled, readline will jpayne@68: undo all outstanding changes to all history lines when `accept-line' is jpayne@68: executed. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-5.2, jpayne@68: and the previous version, readline-5.1. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. Fixed a problem that caused segmentation faults when using readline in jpayne@68: callback mode and typing consecutive DEL characters on an empty line. jpayne@68: jpayne@68: b. Fixed several redisplay problems with multibyte characters, all having to jpayne@68: do with the different code paths and variable meanings between single-byte jpayne@68: and multibyte character redisplay. jpayne@68: jpayne@68: c. Fixed a problem with key sequence translation when presented with the jpayne@68: sequence \M-\C-x. jpayne@68: jpayne@68: d. Fixed a problem that prevented the `a' command in vi mode from being jpayne@68: undone and redone properly. jpayne@68: jpayne@68: e. Fixed a problem that prevented empty inserts in vi mode from being undone jpayne@68: properly. jpayne@68: jpayne@68: f. Fixed a problem that caused readline to initialize with an incorrect idea jpayne@68: of whether or not the terminal can autowrap. jpayne@68: jpayne@68: g. Fixed output of key bindings (like bash `bind -p') to honor the setting of jpayne@68: convert-meta and use \e where appropriate. jpayne@68: jpayne@68: h. Changed the default filename completion function to call the filename jpayne@68: dequoting function if the directory completion hook isn't set. This means jpayne@68: that any directory completion hooks need to dequote the directory name, jpayne@68: since application-specific hooks need to know how the word was quoted, jpayne@68: even if no other changes are made. jpayne@68: jpayne@68: i. Fixed a bug with creating the prompt for a non-interactive search string jpayne@68: when there are non-printing characters in the primary prompt. jpayne@68: jpayne@68: j. Fixed a bug that caused prompts with invisible characters to be redrawn jpayne@68: multiple times in a multibyte locale. jpayne@68: jpayne@68: k. Fixed a bug that could cause the key sequence scanning code to return the jpayne@68: wrong function. jpayne@68: jpayne@68: l. Fixed a problem with the callback interface that caused it to fail when jpayne@68: using multi-character keyboard macros. jpayne@68: jpayne@68: m. Fixed a bug that could cause a core dump when an edited history entry was jpayne@68: re-executed under certain conditions. jpayne@68: jpayne@68: n. Fixed a bug that caused readline to reference freed memory when attmpting jpayne@68: to display a portion of the prompt. jpayne@68: jpayne@68: o. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing jpayne@68: the prompt and input line multiple times. jpayne@68: jpayne@68: p. Fixed history expansion to not be confused by here-string redirection. jpayne@68: jpayne@68: q. Readline no longer treats read errors by converting them to newlines, as jpayne@68: it does with EOF. This caused partial lines to be returned from readline(). jpayne@68: jpayne@68: r. Fixed a redisplay bug that occurred in multibyte-capable locales when the jpayne@68: prompt was one character longer than the screen width. jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. Calling applications can now set the keyboard timeout to 0, allowing jpayne@68: poll-like behavior. jpayne@68: jpayne@68: b. The value of SYS_INPUTRC (configurable at compilation time) is now used as jpayne@68: the default last-ditch startup file. jpayne@68: jpayne@68: c. The history file reading functions now allow windows-like \r\n line jpayne@68: terminators. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-5.1, jpayne@68: and the previous version, readline-5.0. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. Fixed a bug that caused multiliine prompts to be wrapped and displayed jpayne@68: incorrectly. jpayne@68: jpayne@68: b. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current jpayne@68: line correctly. jpayne@68: jpayne@68: c. Fixed a problem in computing the number of invisible characters on the first jpayne@68: line of a prompt whose length exceeds the screen width. jpayne@68: jpayne@68: d. Fixed vi-mode searching so that failure preserves the current line rather jpayne@68: than the last line in the history list. jpayne@68: jpayne@68: e. Fixed the vi-mode `~' command (change-case) to have the correct behavior at jpayne@68: end-of-line when manipulating multibyte characters. jpayne@68: jpayne@68: f. Fixed the vi-mode `r' command (change-char) to have the correct behavior at jpayne@68: end-of-line when manipulating multibyte characters. jpayne@68: jpayne@68: g. Fixed multiple bugs in the redisplay of multibyte characters: displaying jpayne@68: prompts longer than the screen width containing multibyte characters, jpayne@68: jpayne@68: h. Fix the calculation of the number of physical characters in the prompt jpayne@68: string when it contains multibyte characters. jpayne@68: jpayne@68: i. A non-zero value for the `rl_complete_suppress_append' variable now causes jpayne@68: no `/' to be appended to a directory name. jpayne@68: jpayne@68: j. Fixed forward-word and backward-word to work when words contained jpayne@68: multibyte characters. jpayne@68: jpayne@68: k. Fixed a bug in finding the delimiter of a `?' substring when performing jpayne@68: history expansion in a locale that supports multibyte characters. jpayne@68: jpayne@68: l. Fixed a memory leak caused by not freeing the timestamp in a history entry. jpayne@68: jpayne@68: m. Fixed a bug that caused "\M-x" style key bindings to not obey the setting jpayne@68: of the `convert-meta' variable. jpayne@68: jpayne@68: n. Fixed saving and restoring primary prompt when prompting for incremental jpayne@68: and non-incremental searches; search prompts now display multibyte jpayne@68: characters correctly. jpayne@68: jpayne@68: o. Fixed a bug that caused keys originally bound to self-insert but shadowed jpayne@68: by a multi-character key sequence to not be inserted. jpayne@68: jpayne@68: p. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't jpayne@68: dereferenced if NULL (matching the documentation). jpayne@68: jpayne@68: q. Extensive changes to readline to add enough state so that commands jpayne@68: requiring additional characters (searches, multi-key sequences, numeric jpayne@68: arguments, commands requiring an additional specifier character like jpayne@68: vi-mode change-char, etc.) work without synchronously waiting for jpayne@68: additional input. jpayne@68: jpayne@68: r. Lots of changes so readline builds and runs on MinGW. jpayne@68: jpayne@68: s. Readline no longer tries to modify the terminal settings when running in jpayne@68: callback mode. jpayne@68: jpayne@68: t. The Readline display code no longer sets the location of the last invisible jpayne@68: character in the prompt if the \[\] sequence is empty. jpayne@68: jpayne@68: u. The `change-case' command now correctly changes the case of multibyte jpayne@68: characters. jpayne@68: jpayne@68: v. Changes to the shared library construction scripts to deal with Windows jpayne@68: DLL naming conventions for Cygwin. jpayne@68: jpayne@68: w. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed jpayne@68: SIGWINCH. jpayne@68: jpayne@68: x. Fixed the non-incremental search code in vi mode to dispose of any current jpayne@68: undo list when copying a line from the history into the current editing jpayne@68: buffer. jpayne@68: jpayne@68: y. Fixed a bug that caused reversing the incremental search direction to jpayne@68: not work correctly. jpayne@68: jpayne@68: z. Fixed the vi-mode `U' command to only undo up to the first time insert mode jpayne@68: was entered, as Posix specifies. jpayne@68: jpayne@68: aa. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong jpayne@68: place. jpayne@68: jpayne@68: bb. Fixed a redisplay bug caused by moving the cursor vertically to a line jpayne@68: with invisible characters in the prompt in a multibyte locale. jpayne@68: jpayne@68: cc. Fixed a bug that could cause the terminal special chars to be bound in the jpayne@68: wrong keymap in vi mode. jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. The key sequence sent by the keypad `delete' key is now automatically jpayne@68: bound to delete-char. jpayne@68: jpayne@68: b. A negative argument to menu-complete now cycles backward through the jpayne@68: completion list. jpayne@68: jpayne@68: c. A new bindable readline variable: bind-tty-special-chars. If non-zero, jpayne@68: readline will bind the terminal special characters to their readline jpayne@68: equivalents when it's called (on by default). jpayne@68: jpayne@68: d. New bindable command: vi-rubout. Saves deleted text for possible jpayne@68: reinsertion, as with any vi-mode `text modification' command; `X' is bound jpayne@68: to this in vi command mode. jpayne@68: jpayne@68: e. If the rl_completion_query_items is set to a value < 0, readline never jpayne@68: asks the user whether or not to view the possible completions. jpayne@68: jpayne@68: f. The `C-w' binding in incremental search now understands multibyte jpayne@68: characters. jpayne@68: jpayne@68: g. New application-callable auxiliary function, rl_variable_value, returns jpayne@68: a string corresponding to a readline variable's value. jpayne@68: jpayne@68: h. When parsing inputrc files and variable binding commands, the parser jpayne@68: strips trailing whitespace from values assigned to boolean variables jpayne@68: before checking them. jpayne@68: jpayne@68: i. A new external application-controllable variable that allows the LINES jpayne@68: and COLUMNS environment variables to set the window size regardless of jpayne@68: what the kernel returns. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-5.0, jpayne@68: and the previous version, readline-4.3. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. Fixes to avoid core dumps because of null pointer references in the jpayne@68: multibyte character code. jpayne@68: jpayne@68: b. Fix to avoid infinite recursion caused by certain key combinations. jpayne@68: jpayne@68: c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly. jpayne@68: jpayne@68: d. Readline no longer tries to read ahead more than one line of input, even jpayne@68: when more is available. jpayne@68: jpayne@68: e. Fixed the code that adjusts the point to not mishandle null wide jpayne@68: characters. jpayne@68: jpayne@68: f. Fixed a bug in the history expansion `g' modifier that caused it to skip jpayne@68: every other match. jpayne@68: jpayne@68: g. Fixed a bug that caused the prompt to overwrite previous output when the jpayne@68: output doesn't contain a newline and the locale supports multibyte jpayne@68: characters. This same change fixes the problem of readline redisplay jpayne@68: slowing down dramatically as the line gets longer in multibyte locales. jpayne@68: jpayne@68: h. History traversal with arrow keys in vi insertion mode causes the cursor jpayne@68: to be placed at the end of the new line, like in emacs mode. jpayne@68: jpayne@68: i. The locale initialization code does a better job of using the right jpayne@68: precedence and defaulting when checking the appropriate environment jpayne@68: variables. jpayne@68: jpayne@68: j. Fixed the history word tokenizer to handle <( and >( better when used as jpayne@68: part of bash. jpayne@68: jpayne@68: k. The overwrite mode code received several bug fixes to improve undo. jpayne@68: jpayne@68: l. Many speedups to the multibyte character redisplay code. jpayne@68: jpayne@68: m. The callback character reading interface should not hang waiting to read jpayne@68: keyboard input. jpayne@68: jpayne@68: n. Fixed a bug with redoing vi-mode `s' command. jpayne@68: jpayne@68: o. The code that initializes the terminal tracks changes made to the terminal jpayne@68: special characters with stty(1) (or equivalent), so that these changes jpayne@68: are reflected in the readline bindings. New application-callable function jpayne@68: to make it work: rl_tty_unset_default_bindings(). jpayne@68: jpayne@68: p. Fixed a bug that could cause garbage to be inserted in the buffer when jpayne@68: changing character case in vi mode when using a multibyte locale. jpayne@68: jpayne@68: q. Fixed a bug in the redisplay code that caused problems on systems jpayne@68: supporting multibyte characters when moving between history lines when the jpayne@68: new line has more glyphs but fewer bytes. jpayne@68: jpayne@68: r. Undo and redo now work better after exiting vi insertion mode. jpayne@68: jpayne@68: s. Make sure system calls are restarted after a SIGWINCH is received using jpayne@68: SA_RESTART. jpayne@68: jpayne@68: t. Improvements to the code that displays possible completions when using jpayne@68: multibyte characters. jpayne@68: jpayne@68: u. Fixed a problem when parsing nested if statements in inputrc files. jpayne@68: jpayne@68: v. The completer now takes multibyte characters into account when looking for jpayne@68: quoted substrings on which to perform completion. jpayne@68: jpayne@68: w. The history search functions now perform better bounds checking on the jpayne@68: history list. jpayne@68: jpayne@68: x. Change to history expansion functions to treat `^' as equivalent to word jpayne@68: one, as the documentation states. jpayne@68: jpayne@68: y. Some changes to the display code to improve display and redisplay of jpayne@68: multibyte characters. jpayne@68: jpayne@68: z. Changes to speed up the multibyte character redisplay code. jpayne@68: jpayne@68: aa. Fixed a bug in the vi-mode `E' command that caused it to skip over the jpayne@68: last character of a word if invoked while point was on the word's jpayne@68: next-to-last character. jpayne@68: jpayne@68: bb. Fixed a bug that could cause incorrect filename quoting when jpayne@68: case-insensitive completion was enabled and the word being completed jpayne@68: contained backslashes quoting word break characters. jpayne@68: jpayne@68: cc. Fixed a bug in redisplay triggered when the prompt string contains jpayne@68: invisible characters. jpayne@68: jpayne@68: dd. Fixed some display (and other) bugs encountered in multibyte locales jpayne@68: when a non-ascii character was the last character on a line. jpayne@68: jpayne@68: ee. Fixed some display bugs caused by multibyte characters in prompt strings. jpayne@68: jpayne@68: ff. Fixed a problem with history expansion caused by non-whitespace characters jpayne@68: used as history word delimiters. jpayne@68: jpayne@68: gg. Fixed a problem that could cause readline to refer to freed memory when jpayne@68: moving between history lines while doing searches. jpayne@68: jpayne@68: hh. Improvements to the code that expands and displays prompt strings jpayne@68: containing multibyte characters. jpayne@68: jpayne@68: ii. Fixed a problem with vi-mode not correctly remembering the numeric argument jpayne@68: to the last `c'hange command for later use with `.'. jpayne@68: jpayne@68: jj. Fixed a bug in vi-mode that caused multi-digit count arguments to work jpayne@68: incorrectly. jpayne@68: jpayne@68: kk. Fixed a problem in vi-mode that caused the last text modification command jpayne@68: to not be remembered across different command lines. jpayne@68: jpayne@68: ll. Fixed problems with changing characters and changing case at the end of jpayne@68: the line. jpayne@68: jpayne@68: mm. Fixed a problem with readline saving the contents of the current line jpayne@68: before beginning a non-interactive search. jpayne@68: jpayne@68: nn. Fixed a problem with EOF detection when using rl_event_hook. jpayne@68: jpayne@68: oo. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric jpayne@68: arguments. jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. History expansion has a new `a' modifier equivalent to the `g' modifier jpayne@68: for compatibility with the BSD csh. jpayne@68: jpayne@68: b. History expansion has a new `G' modifier equivalent to the BSD csh `g' jpayne@68: modifier, which performs a substitution once per word. jpayne@68: jpayne@68: c. All non-incremental search operations may now undo the operation of jpayne@68: replacing the current line with the history line. jpayne@68: jpayne@68: d. The text inserted by an `a' command in vi mode can be reinserted with jpayne@68: `.'. jpayne@68: jpayne@68: e. New bindable variable, `show-all-if-unmodified'. If set, the readline jpayne@68: completer will list possible completions immediately if there is more jpayne@68: than one completion and partial completion cannot be performed. jpayne@68: jpayne@68: f. There is a new application-callable `free_history_entry()' function. jpayne@68: jpayne@68: g. History list entries now contain timestamp information; the history file jpayne@68: functions know how to read and write timestamp information associated jpayne@68: with each entry. jpayne@68: jpayne@68: h. Four new key binding functions have been added: jpayne@68: jpayne@68: rl_bind_key_if_unbound() jpayne@68: rl_bind_key_if_unbound_in_map() jpayne@68: rl_bind_keyseq_if_unbound() jpayne@68: rl_bind_keyseq_if_unbound_in_map() jpayne@68: jpayne@68: i. New application variable, rl_completion_quote_character, set to any jpayne@68: quote character readline finds before it calls the application completion jpayne@68: function. jpayne@68: jpayne@68: j. New application variable, rl_completion_suppress_quote, settable by an jpayne@68: application completion function. If set to non-zero, readline does not jpayne@68: attempt to append a closing quote to a completed word. jpayne@68: jpayne@68: k. New application variable, rl_completion_found_quote, set to a non-zero jpayne@68: value if readline determines that the word to be completed is quoted. jpayne@68: Set before readline calls any application completion function. jpayne@68: jpayne@68: l. New function hook, rl_completion_word_break_hook, called when readline jpayne@68: needs to break a line into words when completion is attempted. Allows jpayne@68: the word break characters to vary based on position in the line. jpayne@68: jpayne@68: m. New bindable command: unix-filename-rubout. Does the same thing as jpayne@68: unix-word-rubout, but adds `/' to the set of word delimiters. jpayne@68: jpayne@68: n. When listing completions, directories have a `/' appended if the jpayne@68: `mark-directories' option has been enabled. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-4.3, jpayne@68: and the previous version, readline-4.2a. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. Fixed output of comment-begin character when listing variable values. jpayne@68: jpayne@68: b. Added some default key bindings for common escape sequences produced by jpayne@68: HOME and END keys. jpayne@68: jpayne@68: c. Fixed the mark handling code to be more emacs-compatible. jpayne@68: jpayne@68: d. A bug was fixed in the code that prints possible completions to keep it jpayne@68: from printing empty strings in certain circumstances. jpayne@68: jpayne@68: e. Change the key sequence printing code to print ESC as M\- if ESC is a jpayne@68: meta-prefix character -- it's easier for users to understand than \e. jpayne@68: jpayne@68: f. Fixed unstifle_history() to return values that match the documentation. jpayne@68: jpayne@68: g. Fixed the event loop (rl_event_hook) to handle the case where the input jpayne@68: file descriptor is invalidated. jpayne@68: jpayne@68: h. Fixed the prompt display code to work better when the application has a jpayne@68: custom redisplay function. jpayne@68: jpayne@68: i. Changes to make reading and writing the history file a little faster, and jpayne@68: to cope with huge history files without calling abort(3) from xmalloc. jpayne@68: jpayne@68: j. The vi-mode `S' and `s' commands are now undone correctly. jpayne@68: jpayne@68: k. Fixed a problem which caused the display to be messed up when the last jpayne@68: line of a multi-line prompt (possibly containing invisible characters) jpayne@68: was longer than the screen width. jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both jpayne@68: be bound to readline functions. Now the arrow keys may be used in vi jpayne@68: insert mode. jpayne@68: jpayne@68: b. When listing completions, and the number of lines displayed is more than jpayne@68: the screen length, readline uses an internal pager to display the results. jpayne@68: This is controlled by the `page-completions' variable (default on). jpayne@68: jpayne@68: c. New code to handle editing and displaying multibyte characters. jpayne@68: jpayne@68: d. The behavior introduced in bash-2.05a of deciding whether or not to jpayne@68: append a slash to a completed name that is a symlink to a directory has jpayne@68: been made optional, controlled by the `mark-symlinked-directories' jpayne@68: variable (default is the 2.05a behavior). jpayne@68: jpayne@68: e. The `insert-comment' command now acts as a toggle if given a numeric jpayne@68: argument: if the first characters on the line don't specify a jpayne@68: comment, insert one; if they do, delete the comment text jpayne@68: jpayne@68: f. New application-settable completion variable: jpayne@68: rl_completion_mark_symlink_dirs, allows an application's completion jpayne@68: function to temporarily override the user's preference for appending jpayne@68: slashes to names which are symlinks to directories. jpayne@68: jpayne@68: g. New function available to application completion functions: jpayne@68: rl_completion_mode, to tell how the completion function was invoked jpayne@68: and decide which argument to supply to rl_complete_internal (to list jpayne@68: completions, etc.). jpayne@68: jpayne@68: h. Readline now has an overwrite mode, toggled by the `overwrite-mode' jpayne@68: bindable command, which could be bound to `Insert'. jpayne@68: jpayne@68: i. New application-settable completion variable: jpayne@68: rl_completion_suppress_append, inhibits appending of jpayne@68: rl_completion_append_character to completed words. jpayne@68: jpayne@68: j. New key bindings when reading an incremental search string: ^W yanks jpayne@68: the currently-matched word out of the current line into the search jpayne@68: string; ^Y yanks the rest of the current line into the search string, jpayne@68: DEL or ^H deletes characters from the search string. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-4.2a, jpayne@68: and the previous version, readline-4.2. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. More `const' and type casting fixes. jpayne@68: jpayne@68: b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer jpayne@68: overflow problems. jpayne@68: jpayne@68: c. The completion code no longer appends a `/' or ` ' to a match when jpayne@68: completing a symbolic link that resolves to a directory name, unless jpayne@68: the match does not add anything to the word being completed. This jpayne@68: means that a tab will complete the word up to the full name, but not jpayne@68: add anything, and a subsequent tab will add a slash. jpayne@68: jpayne@68: d. Fixed a trivial typo that made the vi-mode `dT' command not work. jpayne@68: jpayne@68: e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert. jpayne@68: jpayne@68: f. Fixed the tty code so that ^V works more than once. jpayne@68: jpayne@68: g. Changed the use of __P((...)) for function prototypes to PARAMS((...)) jpayne@68: because the use of __P in typedefs conflicted g++ and glibc. jpayne@68: jpayne@68: h. The completion code now attempts to do a better job of preserving the jpayne@68: case of the word the user typed if ignoring case in completions. jpayne@68: jpayne@68: i. Readline defaults to not echoing the input and lets the terminal jpayne@68: initialization code enable echoing if there is a controlling terminal. jpayne@68: jpayne@68: j. The key binding code now processes only two hex digits after a `\x' jpayne@68: escape sequence, and the documentation was changed to note that the jpayne@68: octal and hex escape sequences result in an eight-bit value rather jpayne@68: than strict ASCII. jpayne@68: jpayne@68: k. Fixed a few places where negative array subscripts could have occurred. jpayne@68: jpayne@68: l. Fixed the vi-mode code to use a better method to determine the bounds of jpayne@68: the array used to hold the marks, and to avoid out-of-bounds references. jpayne@68: jpayne@68: m. Fixed the defines in chardefs.h to work better when chars are signed. jpayne@68: jpayne@68: n. Fixed configure.in to use the new names for bash autoconf macros. jpayne@68: jpayne@68: o. Readline no longer attempts to define its own versions of some ctype jpayne@68: macros if they are implemented as functions in libc but not as macros in jpayne@68: . jpayne@68: jpayne@68: p. Fixed a problem where rl_backward could possibly set point to before jpayne@68: the beginning of the line. jpayne@68: jpayne@68: q. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause jpayne@68: include file problems. jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. Added extern declaration for rl_get_termcap to readline.h, making it a jpayne@68: public function (it was always there, just not in readline.h). jpayne@68: jpayne@68: b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402, jpayne@68: RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2. jpayne@68: jpayne@68: c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION. jpayne@68: jpayne@68: d. New bindable boolean readline variable: match-hidden-files. Controls jpayne@68: completion of files beginning with a `.' (on Unix). Enabled by default. jpayne@68: jpayne@68: e. The history expansion code now allows any character to terminate a jpayne@68: `:first-' modifier, like csh. jpayne@68: jpayne@68: f. The incremental search code remembers the last search string and uses jpayne@68: it if ^R^R is typed without a search string. jpayne@68: jpayne@68: h. New bindable variable `history-preserve-point'. If set, the history jpayne@68: code attempts to place the user at the same location on each history jpayne@68: line retrieved with previous-history or next-history. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-4.2, jpayne@68: and the previous version, readline-4.1. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. When setting the terminal attributes on systems using `struct termio', jpayne@68: readline waits for output to drain before changing the attributes. jpayne@68: jpayne@68: b. A fix was made to the history word tokenization code to avoid attempts to jpayne@68: dereference a null pointer. jpayne@68: jpayne@68: c. Readline now defaults rl_terminal_name to $TERM if the calling application jpayne@68: has left it unset, and tries to initialize with the resultant value. jpayne@68: jpayne@68: d. Instead of calling (*rl_getc_function)() directly to get input in certain jpayne@68: places, readline now calls rl_read_key() consistently. jpayne@68: jpayne@68: e. Fixed a bug in the completion code that allowed a backslash to quote a jpayne@68: single quote inside a single-quoted string. jpayne@68: jpayne@68: f. rl_prompt is no longer assigned directly from the argument to readline(), jpayne@68: but uses memory allocated by readline. This allows constant strings to jpayne@68: be passed to readline without problems arising when the prompt processing jpayne@68: code wants to modify the string. jpayne@68: jpayne@68: g. Fixed a bug that caused non-interactive history searches to return the jpayne@68: wrong line when performing multiple searches backward for the same string. jpayne@68: jpayne@68: h. Many variables, function arguments, and function return values are now jpayne@68: declared `const' where appropriate, to improve behavior when linking with jpayne@68: C++ code. jpayne@68: jpayne@68: i. The control character detection code now works better on systems where jpayne@68: `char' is unsigned by default. jpayne@68: jpayne@68: j. The vi-mode numeric argument is now capped at 999999, just like emacs mode. jpayne@68: jpayne@68: k. The Function, CPFunction, CPPFunction, and VFunction typedefs have been jpayne@68: replaced with a set of specific prototyped typedefs, though they are jpayne@68: still in the readline header files for backwards compatibility. jpayne@68: jpayne@68: m. Nearly all of the (undocumented) internal global variables in the library jpayne@68: now have an _rl_ prefix -- there were a number that did not, like jpayne@68: screenheight, screenwidth, alphabetic, etc. jpayne@68: jpayne@68: n. The ding() convenience function has been renamed to rl_ding(), though the jpayne@68: old function is still defined for backwards compatibility. jpayne@68: jpayne@68: o. The completion convenience functions filename_completion_function, jpayne@68: username_completion_function, and completion_matches now have an rl_ jpayne@68: prefix, though the old names are still defined for backwards compatibility. jpayne@68: jpayne@68: p. The functions shared by readline and bash (linkage is satisfied from bash jpayne@68: when compiling with bash, and internally otherwise) now have an sh_ prefix. jpayne@68: jpayne@68: q. Changed the shared library creation procedure on Linux and BSD/OS 4.x so jpayne@68: that the `soname' contains only the major version number rather than the jpayne@68: major and minor numbers. jpayne@68: jpayne@68: r. Fixed a redisplay bug that occurred when the prompt spanned more than one jpayne@68: physical line and contained invisible characters. jpayne@68: jpayne@68: s. Added a missing `includedir' variable to the Makefile. jpayne@68: jpayne@68: t. When installing the shared libraries, make sure symbolic links are relative. jpayne@68: jpayne@68: u. Added configure test so that it can set `${MAKE}' appropriately. jpayne@68: jpayne@68: v. Fixed a bug in rl_forward that could cause the point to be set to before jpayne@68: the beginning of the line in vi mode. jpayne@68: jpayne@68: w. Fixed a bug in the callback read-char interface to make it work when a jpayne@68: readline function pushes some input onto the input stream with jpayne@68: rl_execute_next (like the incremental search functions). jpayne@68: jpayne@68: x. Fixed a file descriptor leak in the history file manipulation code that jpayne@68: was tripped when attempting to truncate a non-regular file (like jpayne@68: /dev/null). jpayne@68: jpayne@68: y. Changes to make all of the exported readline functions declared in jpayne@68: readline.h have an rl_ prefix (rltty_set_default_bindings is now jpayne@68: rl_tty_set_default_bindings, crlf is now rl_crlf, etc.) jpayne@68: jpayne@68: z. The formatted documentation included in the base readline distribution jpayne@68: is no longer removed on a `make distclean'. jpayne@68: jpayne@68: aa. Some changes were made to avoid gcc warnings with -Wall. jpayne@68: jpayne@68: bb. rl_get_keymap_by_name now finds keymaps case-insensitively, so jpayne@68: `set keymap EMACS' works. jpayne@68: jpayne@68: cc. The history file writing and truncation functions now return a useful jpayne@68: status on error. jpayne@68: jpayne@68: dd. Fixed a bug that could cause applications to dereference a NULL pointer jpayne@68: if a NULL second argument was passed to history_expand(). jpayne@68: jpayne@68: ee. If a hook function assigned to rl_event_hook sets rl_done to a non-zero jpayne@68: value, rl_read_key() now immediately returns '\n' (which is assumed to jpayne@68: be bound to accept-line). jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. The blink timeout for paren matching is now settable by applications, jpayne@68: via the rl_set_paren_blink_timeout() function. jpayne@68: jpayne@68: b. _rl_executing_macro has been renamed to rl_executing_macro, which means jpayne@68: it's now part of the public interface. jpayne@68: jpayne@68: c. Readline has a new variable, rl_readline_state, which is a bitmap that jpayne@68: encapsulates the current state of the library; intended for use by jpayne@68: callbacks and hook functions. jpayne@68: jpayne@68: d. rlfe has a new -l option to log input and output (-a appends to logfile), jpayne@68: a new -n option to set the readline application name, and -v and -h jpayne@68: options for version and help information. jpayne@68: jpayne@68: e. rlfe can now perform filename completion for the inferior process if the jpayne@68: OS has a /proc//cwd that can be read with readlink(2) to get the jpayne@68: inferior's current working directory. jpayne@68: jpayne@68: f. A new file, rltypedefs.h, contains the new typedefs for function pointers jpayne@68: and is installed by `make install'. jpayne@68: jpayne@68: g. New application-callable function rl_set_prompt(const char *prompt): jpayne@68: expands its prompt string argument and sets rl_prompt to the result. jpayne@68: jpayne@68: h. New application-callable function rl_set_screen_size(int rows, int cols): jpayne@68: public method for applications to set readline's idea of the screen jpayne@68: dimensions. jpayne@68: jpayne@68: i. The history example program (examples/histexamp.c) is now built as one jpayne@68: of the examples. jpayne@68: jpayne@68: j. The documentation has been updated to cover nearly all of the public jpayne@68: functions and variables declared in readline.h. jpayne@68: jpayne@68: k. New function, rl_get_screen_size (int *rows, int *columns), returns jpayne@68: readline's idea of the screen dimensions. jpayne@68: jpayne@68: l. The timeout in rl_gather_tyi (readline keyboard input polling function) jpayne@68: is now settable via a function (rl_set_keyboard_input_timeout()). jpayne@68: jpayne@68: m. Renamed the max_input_history variable to history_max_entries; the old jpayne@68: variable is maintained for backwards compatibility. jpayne@68: jpayne@68: n. The list of characters that separate words for the history tokenizer is jpayne@68: now settable with a variable: history_word_delimiters. The default jpayne@68: value is as before. jpayne@68: jpayne@68: o. There is a new history.3 manual page documenting the history library. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-4.1, jpayne@68: and the previous version, readline-4.0. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. Changed the HTML documents so that the table-of-contents is no longer jpayne@68: a separate file. jpayne@68: jpayne@68: b. Changes to the shared object configuration for: Irix 5.x, Irix 6.x, jpayne@68: OSF/1. jpayne@68: jpayne@68: c. The shared library major and minor versions are now constructed jpayne@68: automatically by configure and substituted into the makefiles. jpayne@68: jpayne@68: d. It's now possible to install the shared libraries separately from the jpayne@68: static libraries. jpayne@68: jpayne@68: e. The history library tries to truncate the history file only if it is a jpayne@68: regular file. jpayne@68: jpayne@68: f. A bug that caused _rl_dispatch to address negative array indices on jpayne@68: systems with signed chars was fixed. jpayne@68: jpayne@68: g. rl-yank-nth-arg now leaves the history position the same as when it was jpayne@68: called. jpayne@68: jpayne@68: h. Changes to the completion code to handle MS-DOS drive-letter:pathname jpayne@68: filenames. jpayne@68: jpayne@68: i. Completion is now case-insensitive by default on MS-DOS. jpayne@68: jpayne@68: j. Fixes to the history file manipulation code for MS-DOS. jpayne@68: jpayne@68: k. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS. jpayne@68: jpayne@68: l. Some fixes were made to the redisplay code for better operation on MS-DOS. jpayne@68: jpayne@68: m. The quoted-insert code will now insert tty special chars like ^C. jpayne@68: jpayne@68: n. A bug was fixed that caused the display code to reference memory before jpayne@68: the start of the prompt string. jpayne@68: jpayne@68: o. More support for __EMX__ (OS/2). jpayne@68: jpayne@68: p. A bug was fixed in readline's signal handling that could cause infinite jpayne@68: recursion in signal handlers. jpayne@68: jpayne@68: q. A bug was fixed that caused the point to be less than zero when rl_forward jpayne@68: was given a very large numeric argument. jpayne@68: jpayne@68: r. The vi-mode code now gets characters via the application-settable value jpayne@68: of rl_getc_function rather than calling rl_getc directly. jpayne@68: jpayne@68: s. The history file code now uses O_BINARY mode when reading and writing jpayne@68: the history file on cygwin32. jpayne@68: jpayne@68: t. Fixed a bug in the redisplay code for lines with more than 256 line jpayne@68: breaks. jpayne@68: jpayne@68: u. A bug was fixed which caused invisible character markers to not be jpayne@68: stripped from the prompt string if the terminal was in no-echo mode. jpayne@68: jpayne@68: v. Readline no longer tries to get the variables it needs for redisplay jpayne@68: from the termcap entry if the calling application has specified its jpayne@68: own redisplay function. Readline treats the terminal as `dumb' in jpayne@68: this case. jpayne@68: jpayne@68: w. Fixes to the SIGWINCH code so that a multiple-line prompt with escape jpayne@68: sequences is redrawn correctly. jpayne@68: jpayne@68: x. Changes to the install and install-shared targets so that the libraries jpayne@68: and header files are installed separately. jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. A new Readline `user manual' is in doc/rluserman.texinfo. jpayne@68: jpayne@68: b. Parentheses matching is now always compiled into readline, and enabled jpayne@68: or disabled when the value of the `blink-matching-paren' variable is jpayne@68: changed. jpayne@68: jpayne@68: c. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename. jpayne@68: jpayne@68: d. MS-DOS systems now use ~/_history as the default history file. jpayne@68: jpayne@68: e. history-search-{forward,backward} now leave the point at the end of the jpayne@68: line when the string to search for is empty, like jpayne@68: {reverse,forward}-search-history. jpayne@68: jpayne@68: f. history-search-{forward,backward} now leave the last history line found jpayne@68: in the readline buffer if the second or subsequent search fails. jpayne@68: jpayne@68: g. New function for use by applications: rl_on_new_line_with_prompt, used jpayne@68: when an application displays the prompt itself before calling readline(). jpayne@68: jpayne@68: h. New variable for use by applications: rl_already_prompted. An application jpayne@68: that displays the prompt itself before calling readline() must set this to jpayne@68: a non-zero value. jpayne@68: jpayne@68: i. A new variable, rl_gnu_readline_p, always 1. The intent is that an jpayne@68: application can verify whether or not it is linked with the `real' jpayne@68: readline library or some substitute. jpayne@68: jpayne@68: j. Per Bothner's `rlfe' (pronounced `Ralphie') readline front-end program jpayne@68: is included in the examples subdirectory, though it is not built jpayne@68: by default. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-4.0, jpayne@68: and the previous version, readline-2.2. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. The version number is now 4.0, to match the major and minor version jpayne@68: numbers on the shared readline and history libraries. Future jpayne@68: releases will maintain the identical numbering. jpayne@68: jpayne@68: b. Fixed a typo in the `make install' recipe that copied libreadline.a jpayne@68: to libhistory.old right after installing it. jpayne@68: jpayne@68: c. The readline and history info files are now installed out of the source jpayne@68: directory if they are not found in the build directory. jpayne@68: jpayne@68: d. The library no longer exports a function named `savestring' -- backwards jpayne@68: compatibility be damned. jpayne@68: jpayne@68: e. There is no longer any #ifdef SHELL code in the source files. jpayne@68: jpayne@68: f. Some changes were made to the key binding code to fix memory leaks and jpayne@68: better support Win32 systems. jpayne@68: jpayne@68: g. Fixed a silly typo in the paren matching code -- it's microseconds, not jpayne@68: milliseconds. jpayne@68: jpayne@68: h. The readline library should be compilable by C++ compilers. jpayne@68: jpayne@68: i. The readline.h public header file now includes function prototypes for jpayne@68: all readline functions, and some changes were made to fix errors in the jpayne@68: source files uncovered by the use of prototypes. jpayne@68: jpayne@68: j. The maximum numeric argument is now clamped at 1000000. jpayne@68: jpayne@68: k. Fixes to rl_yank_last_arg to make it behave better. jpayne@68: jpayne@68: l. Fixed a bug in the display code that caused core dumps if the prompt jpayne@68: string length exceeded 1024 characters. jpayne@68: jpayne@68: m. The menu completion code was fixed to properly insert a single completion jpayne@68: if there is only one match. jpayne@68: jpayne@68: n. A bug was fixed that caused the display code to improperly display tabs jpayne@68: after newlines. jpayne@68: jpayne@68: o. A fix was made to the completion code in which a typo caused the wrong jpayne@68: value to be passed to the function that computed the longest common jpayne@68: prefix of the list of matches. jpayne@68: jpayne@68: p. The completion code now checks the value of rl_filename_completion_desired, jpayne@68: which is set by application-supplied completion functions to indicate jpayne@68: that filename completion is being performed, to decide whether or not to jpayne@68: call an application-supplied `ignore completions' function. jpayne@68: jpayne@68: q. Code was added to the history library to catch history substitutions jpayne@68: using `&' without a previous history substitution or search having been jpayne@68: performed. jpayne@68: jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. There is a new script, support/shobj-conf, to do system-specific shared jpayne@68: object and library configuration. It generates variables for configure jpayne@68: to substitute into makefiles. The README file provides a detailed jpayne@68: explanation of the shared library creation process. jpayne@68: jpayne@68: b. Shared libraries and objects are now built in the `shlib' subdirectory. jpayne@68: There is a shlib/Makefile.in to control the build process. `make shared' jpayne@68: from the top-level directory is still the right way to build shared jpayne@68: versions of the libraries. jpayne@68: jpayne@68: c. rlconf.h is now installed, so applications can find out which features jpayne@68: have been compiled into the installed readline and history libraries. jpayne@68: jpayne@68: d. rlstdc.h is now an installed header file. jpayne@68: jpayne@68: e. Many changes to the signal handling: jpayne@68: o Readline now catches SIGQUIT and cleans up the tty before returning; jpayne@68: o A new variable, rl_catch_signals, is available to application writers jpayne@68: to indicate to readline whether or not it should install its own jpayne@68: signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, jpayne@68: SIGTTIN, and SIGTTOU; jpayne@68: o A new variable, rl_catch_sigwinch, is available to application jpayne@68: writers to indicate to readline whether or not it should install its jpayne@68: own signal handler for SIGWINCH, which will chain to the calling jpayne@68: applications's SIGWINCH handler, if one is installed; jpayne@68: o There is a new function, rl_free_line_state, for application signal jpayne@68: handlers to call to free up the state associated with the current jpayne@68: line after receiving a signal; jpayne@68: o There is a new function, rl_cleanup_after_signal, to clean up the jpayne@68: display and terminal state after receiving a signal; jpayne@68: o There is a new function, rl_reset_after_signal, to reinitialize the jpayne@68: terminal and display state after an application signal handler jpayne@68: returns and readline continues jpayne@68: jpayne@68: f. There is a new function, rl_resize_terminal, to reset readline's idea of jpayne@68: the screen size after a SIGWINCH. jpayne@68: jpayne@68: g. New public functions: rl_save_prompt and rl_restore_prompt. These were jpayne@68: previously private functions with a `_' prefix. These functions are jpayne@68: used when an application wants to write a message to the `message area' jpayne@68: with rl_message and have the prompt restored correctly when the message jpayne@68: is erased. jpayne@68: jpayne@68: h. New function hook: rl_pre_input_hook, called just before readline starts jpayne@68: reading input, after initialization. jpayne@68: jpayne@68: i. New function hook: rl_display_matches_hook, called when readline would jpayne@68: display the list of completion matches. The new function jpayne@68: rl_display_match_list is what readline uses internally, and is available jpayne@68: for use by application functions called via this hook. jpayne@68: jpayne@68: j. New bindable function, delete-char-or-list, like tcsh. jpayne@68: jpayne@68: k. A new variable, rl_erase_empty_line, which, if set by an application using jpayne@68: readline, will cause readline to erase, prompt and all, lines on which the jpayne@68: only thing typed was a newline. jpayne@68: jpayne@68: l. There is a new script, support/shlib-install, to install and uninstall jpayne@68: the shared readline and history libraries. jpayne@68: jpayne@68: m. A new bindable variable, `isearch-terminators', which is a string jpayne@68: containing the set of characters that should terminate an incremental jpayne@68: search without being executed as a command. jpayne@68: jpayne@68: n. A new bindable function, forward-backward-delete-char. jpayne@68: jpayne@68: ------------------------------------------------------------------------------- jpayne@68: This document details the changes between this version, readline-2.2, jpayne@68: and the previous version, readline-2.1. jpayne@68: jpayne@68: 1. Changes to Readline jpayne@68: jpayne@68: a. Added a missing `extern' to a declaration in readline.h that kept jpayne@68: readline from compiling cleanly on some systems. jpayne@68: jpayne@68: b. The history file is now opened with mode 0600 when it is written for jpayne@68: better security. jpayne@68: jpayne@68: c. Changes were made to the SIGWINCH handling code so that prompt redisplay jpayne@68: is done better. jpayne@68: jpayne@68: d. ^G now interrupts incremental searches correctly. jpayne@68: jpayne@68: e. A bug that caused a core dump when the set of characters to be quoted jpayne@68: when completing words was empty was fixed. jpayne@68: jpayne@68: f. Fixed a problem in the readline test program rltest.c that caused a core jpayne@68: dump. jpayne@68: jpayne@68: g. The code that handles parser directives in inputrc files now displays jpayne@68: more error messages. jpayne@68: jpayne@68: h. The history expansion code was fixed so that the appearance of the jpayne@68: history comment character at the beginning of a word inhibits history jpayne@68: expansion for that word and the rest of the input line. jpayne@68: jpayne@68: i. The code that prints completion listings now behaves better if one or jpayne@68: more of the filenames contains non-printable characters. jpayne@68: jpayne@68: j. The time delay when showing matching parentheses is now 0.5 seconds. jpayne@68: jpayne@68: jpayne@68: 2. New Features in Readline jpayne@68: jpayne@68: a. There is now an option for `iterative' yank-last-arg handline, so a user jpayne@68: can keep entering `M-.', yanking the last argument of successive history jpayne@68: lines. jpayne@68: jpayne@68: b. New variable, `print-completions-horizontally', which causes completion jpayne@68: matches to be displayed across the screen (like `ls -x') rather than up jpayne@68: and down the screen (like `ls'). jpayne@68: jpayne@68: c. New variable, `completion-ignore-case', which causes filename completion jpayne@68: and matching to be performed case-insensitively. jpayne@68: jpayne@68: d. There is a new bindable command, `magic-space', which causes history jpayne@68: expansion to be performed on the current readline buffer and a space to jpayne@68: be inserted into the result. jpayne@68: jpayne@68: e. There is a new bindable command, `menu-complete', which enables tcsh-like jpayne@68: menu completion (successive executions of menu-complete insert a single jpayne@68: completion match, cycling through the list of possible completions). jpayne@68: jpayne@68: f. There is a new bindable command, `paste-from-clipboard', for use on Win32 jpayne@68: systems, to insert the text from the Win32 clipboard into the editing jpayne@68: buffer. jpayne@68: jpayne@68: g. The key sequence translation code now understands printf-style backslash jpayne@68: escape sequences, including \NNN octal escapes. These escape sequences jpayne@68: may be used in key sequence definitions or macro values. jpayne@68: jpayne@68: h. An `$include' inputrc file parser directive has been added.