CHANGES 50 KB

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