1 This is a terse description of the new features added to readline-8.0 since
2 the release of readline-7.0.
4 New Features in Readline
6 a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as
7 Posix specifies (uses fnmatch(3) if available).
9 b. There are new `next-screen-line' and `previous-screen-line' bindable
10 commands, which move the cursor to the same column in the next, or previous,
11 physical line, respectively.
13 c. There are default key bindings for control-arrow-key key combinations.
15 d. A negative argument (-N) to `quoted-insert' means to insert the next N
16 characters using quoted-insert.
18 e. New public function: rl_check_signals(), which allows applications to
19 respond to signals that readline catches while waiting for input using
20 a custom read function.
22 f. There is new support for conditionally testing the readline version in an
23 inputrc file, with a full set of arithmetic comparison operators available.
25 g. There is a simple variable comparison facility available for use within an
26 inputrc file. Allowable operators are equality and inequality; string
27 variables may be compared to a value; boolean variables must be compared to
28 either `on' or `off'; variable names are separated from the operator by
31 h. The history expansion library now understands command and process
32 substitution and extended globbing and allows them to appear anywhere in a
35 i. The history library has a new variable that allows applications to set the
36 initial quoting state, so quoting state can be inherited from a previous
39 j. Readline now allows application-defined keymap names; there is a new public
40 function, rl_set_keymap_name(), to do that.
42 k. The "Insert" keypad key, if available, now puts readline into overwrite
45 -------------------------------------------------------------------------------
46 This is a terse description of the new features added to readline-7.0 since
47 the release of readline-6.3.
49 New Features in Readline
51 a. The history truncation code now uses the same error recovery mechansim as
52 the history writing code, and restores the old version of the history file
53 on error. The error recovery mechanism handles symlinked history files.
55 b. There is a new bindable variable, `enable-bracketed-paste', which enables
56 support for a terminal's bracketed paste mode.
58 c. The editing mode indicators can now be strings and are user-settable
59 (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
60 variables). Mode strings can contain invisible character sequences.
61 Setting mode strings to null strings restores the defaults.
63 d. Prompt expansion adds the mode string to the last line of a multi-line
64 prompt (one with embedded newlines).
66 e. There is a new bindable variable, `colored-completion-prefix', which, if
67 set, causes the common prefix of a set of possible completions to be
70 f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
73 g. The redisplay code underwent several efficiency improvements for multibyte
76 h. The insert-char function attempts to batch-insert all pending typeahead
77 that maps to self-insert, as long as it is coming from the terminal.
79 i. rl_callback_sigcleanup: a new application function that can clean up and
80 unset any state set by readline's callback mode. Intended to be used
83 j. If an incremental search string has its last character removed with DEL, the
84 resulting empty search string no longer matches the previous line.
86 k. If readline reads a history file that begins with `#' (or the value of
87 the history comment character) and has enabled history timestamps, the history
88 entries are assumed to be delimited by timestamps. This allows multi-line
91 l. Readline now throws an error if it parses a key binding without a terminating
94 m. The default binding for ^W in vi mode now uses word boundaries specified
95 by Posix (vi-unix-word-rubout is bindable command name).
97 n. rl_clear_visible_line: new application-callable function; clears all
98 screen lines occupied by the current visible readline line.
100 o. rl_tty_set_echoing: application-callable function that controls whether
101 or not readline thinks it is echoing terminal output.
103 p. Handle >| and strings of digits preceding and following redirection
104 specifications as single tokens when tokenizing the line for history
107 q. Fixed a bug with displaying completions when the prefix display length
108 is greater than the length of the completions to be displayed.
110 r. The :p history modifier now applies to the entire line, so any expansion
111 specifying :p causes the line to be printed instead of expanded.
113 s. New application-callable function: rl_pending_signal(): returns the signal
114 number of any signal readline has caught but not yet handled.
116 t. New application-settable variable: rl_persistent_signal_handlers: if set
117 to a non-zero value, readline will enable the readline-6.2 signal handler
118 behavior in callback mode: handlers are installed when
119 rl_callback_handler_install is called and removed removed when a complete
122 -------------------------------------------------------------------------------
123 This is a terse description of the new features added to readline-6.3 since
124 the release of readline-6.2.
126 New Features in Readline
128 a. Readline is now more responsive to SIGHUP and other fatal signals when
129 reading input from the terminal or performing word completion but no
130 longer attempts to run any not-allowable functions from a signal handler
133 b. There are new bindable commands to search the history for the string of
134 characters between the beginning of the line and the point
135 (history-substring-search-forward, history-substring-search-backward)
137 c. Readline allows quoted strings as the values of variables when setting
138 them with `set'. As a side effect, trailing spaces and tabs are ignored
139 when setting a string variable's value.
141 d. The history library creates a backup of the history file when writing it
142 and restores the backup on a write error.
144 e. New application-settable variable: rl_filename_stat_hook: a function called
145 with a filename before using it in a call to stat(2). Bash uses it to
146 expand shell variables so things like $HOME/Downloads have a slash
149 f. New bindable function `print-last-kbd-macro', prints the most-recently-
150 defined keyboard macro in a reusable format.
152 g. New user-settable variable `colored-stats', enables use of colored text
153 to denote file types when displaying possible completions (colored analog
156 h. New user-settable variable `keyseq-timout', acts as an inter-character
157 timeout when reading input or incremental search strings.
159 i. New application-callable function: rl_clear_history. Clears the history list
160 and frees all readline-associated private data.
162 j. New user-settable variable, show-mode-in-prompt, adds a characters to the
163 beginning of the prompt indicating the current editing mode.
165 k. New application-settable variable: rl_input_available_hook; function to be
166 called when readline detects there is data available on its input file
169 l. Readline calls an application-set event hook (rl_event_hook) after it gets
170 a signal while reading input (read returns -1/EINTR but readline does not
171 handle the signal immediately) to allow the application to handle or
174 m. If the user-settable variable `history-size' is set to a value less than
175 0, the history list size is unlimited.
177 n. New application-settable variable: rl_signal_event_hook; function that is
178 called when readline is reading terminal input and read(2) is interrupted
179 by a signal. Currently not called for SIGHUP or SIGTERM.
181 -------------------------------------------------------------------------------
182 This is a terse description of the new features added to readline-6.1 since
183 the release of readline-6.0.
185 New Features in Readline
187 a. New bindable function: menu-complete-backward.
189 b. In the vi insertion keymap, C-n is now bound to menu-complete by default,
190 and C-p to menu-complete-backward.
192 c. When in vi command mode, repeatedly hitting ESC now does nothing, even
193 when ESC introduces a bound key sequence. This is closer to how
194 historical vi behaves.
196 d. New bindable function: skip-csi-sequence. Can be used as a default to
197 consume key sequences generated by keys like Home and End without having
200 e. New application-settable function: rl_filename_rewrite_hook. Can be used
201 to rewite or modify filenames read from the file system before they are
202 compared to the word to be completed.
204 f. New bindable variable: skip-completed-text, active when completing in the
205 middle of a word. If enabled, it means that characters in the completion
206 that match characters in the remainder of the word are "skipped" rather
207 than inserted into the line.
209 g. The pre-readline-6.0 version of menu completion is available as
210 "old-menu-complete" for users who do not like the readline-6.0 version.
212 h. New bindable variable: echo-control-characters. If enabled, and the
213 tty ECHOCTL bit is set, controls the echoing of characters corresponding
214 to keyboard-generated signals.
216 i. New bindable variable: enable-meta-key. Controls whether or not readline
217 sends the smm/rmm sequences if the terminal indicates it has a meta key
218 that enables eight-bit characters.
220 -------------------------------------------------------------------------------
221 This is a terse description of the new features added to readline-6.0 since
222 the release of readline-5.2.
224 New Features in Readline
226 a. A new variable, rl_sort_completion_matches; allows applications to inhibit
227 match list sorting (but beware: some things don't work right if
228 applications do this).
230 b. A new variable, rl_completion_invoking_key; allows applications to discover
231 the key that invoked rl_complete or rl_menu_complete.
233 c. The functions rl_block_sigint and rl_release_sigint are now public and
234 available to calling applications who want to protect critical sections
237 d. The functions rl_save_state and rl_restore_state are now public and
238 available to calling applications; documented rest of readline's state
241 e. A new user-settable variable, `history-size', allows setting the maximum
242 number of entries in the history list.
244 f. There is a new implementation of menu completion, with several improvements
245 over the old; the most notable improvement is a better `completions
248 g. The menu completion code now uses the rl_menu_completion_entry_function
249 variable, allowing applications to provide their own menu completion
252 h. There is support for replacing a prefix of a pathname with a `...' when
253 displaying possible completions. This is controllable by setting the
254 `completion-prefix-display-length' variable. Matches with a common prefix
255 longer than this value have the common prefix replaced with `...'.
257 i. There is a new `revert-all-at-newline' variable. If enabled, readline will
258 undo all outstanding changes to all history lines when `accept-line' is
261 -------------------------------------------------------------------------------
262 This is a terse description of the new features added to readline-5.2 since
263 the release of readline-5.1.
265 New Features in Readline
267 a. Calling applications can now set the keyboard timeout to 0, allowing
270 b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
271 the default last-ditch startup file.
273 c. The history file reading functions now allow windows-like \r\n line
276 -------------------------------------------------------------------------------
277 This is a terse description of the new features added to readline-5.1 since
278 the release of readline-5.0.
280 New Features in Readline
282 a. The key sequence sent by the keypad `delete' key is now automatically
283 bound to delete-char.
285 b. A negative argument to menu-complete now cycles backward through the
288 c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
289 readline will bind the terminal special characters to their readline
290 equivalents when it's called (on by default).
292 d. New bindable command: vi-rubout. Saves deleted text for possible
293 reinsertion, as with any vi-mode `text modification' command; `X' is bound
294 to this in vi command mode.
296 e. If the rl_completion_query_items is set to a value < 0, readline never
297 asks the user whether or not to view the possible completions.
299 f. New application-callable auxiliary function, rl_variable_value, returns
300 a string corresponding to a readline variable's value.
302 g. When parsing inputrc files and variable binding commands, the parser
303 strips trailing whitespace from values assigned to boolean variables
304 before checking them.
306 h. A new external application-controllable variable that allows the LINES
307 and COLUMNS environment variables to set the window size regardless of
308 what the kernel returns.
311 -------------------------------------------------------------------------------
312 This is a terse description of the new features added to readline-5.0 since
313 the release of readline-4.3.
315 New Features in Readline
317 a. History expansion has a new `a' modifier equivalent to the `g' modifier
318 for compatibility with the BSD csh.
320 b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
321 modifier, which performs a substitution once per word.
323 c. All non-incremental search operations may now undo the operation of
324 replacing the current line with the history line.
326 d. The text inserted by an `a' command in vi mode can be reinserted with
329 e. New bindable variable, `show-all-if-unmodified'. If set, the readline
330 completer will list possible completions immediately if there is more
331 than one completion and partial completion cannot be performed.
333 f. There is a new application-callable `free_history_entry()' function.
335 g. History list entries now contain timestamp information; the history file
336 functions know how to read and write timestamp information associated
339 h. Four new key binding functions have been added:
341 rl_bind_key_if_unbound()
342 rl_bind_key_if_unbound_in_map()
343 rl_bind_keyseq_if_unbound()
344 rl_bind_keyseq_if_unbound_in_map()
346 i. New application variable, rl_completion_quote_character, set to any
347 quote character readline finds before it calls the application completion
350 j. New application variable, rl_completion_suppress_quote, settable by an
351 application completion function. If set to non-zero, readline does not
352 attempt to append a closing quote to a completed word.
354 k. New application variable, rl_completion_found_quote, set to a non-zero
355 value if readline determines that the word to be completed is quoted.
356 Set before readline calls any application completion function.
358 l. New function hook, rl_completion_word_break_hook, called when readline
359 needs to break a line into words when completion is attempted. Allows
360 the word break characters to vary based on position in the line.
362 m. New bindable command: unix-filename-rubout. Does the same thing as
363 unix-word-rubout, but adds `/' to the set of word delimiters.
365 n. When listing completions, directories have a `/' appended if the
366 `mark-directories' option has been enabled.