summaryrefslogtreecommitdiff
path: root/lib/reline/config.rb
AgeCommit message (Collapse)Author
2025-01-24Migrate irb and reline to the bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12624
2024-10-06[ruby/reline] Allow utf-8 safe meta key mapping in inputrctomoya ishida
(https://github.com/ruby/reline/pull/723) Readline's convert-meta setting is utf-8 unsafe. Allow assigning `"\M-char": key` to bind "\echar": key even if convert-meta is not enabled. https://github.com/ruby/reline/commit/9844b99c6e
2024-09-03[ruby/reline] Add test for reset_variables in Reline::ConfigMari Imaizumi
(https://github.com/ruby/reline/pull/741) * Fix reset variables * Add assertion for reload * Add helper method to get instance variable value of Reline::Config https://github.com/ruby/reline/commit/386f619ff5
2024-08-31[ruby/reline] Implement re-read-init-fileMari Imaizumi
(https://github.com/ruby/reline/pull/740) https://github.com/ruby/reline/commit/59e4ade807
2024-08-27[ruby/reline] Remove unused variablesMari Imaizumi
(https://github.com/ruby/reline/pull/739) https://github.com/ruby/reline/commit/14784eddee
2024-06-03[ruby/reline] Improve key binding match/matching checktomoya ishida
(https://github.com/ruby/reline/pull/709) * Improve key binding match/matching check * Rename key_actors to default_key_bindings * Make key_stroke.expand always return a value * Update add_default_key_binding to use a add_default_key_binding_by_keymap internally Co-authored-by: Stan Lo <stan001212@gmail.com> --------- https://github.com/ruby/reline/commit/353ec236e2 Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-05-26[ruby/reline] allow space in config valueGo
(https://github.com/ruby/reline/pull/705) * allow space in config value fix https://github.com/ruby/reline/pull/657 * remove inline comments * Revert "remove inline comments" This reverts commit https://github.com/ruby/reline/commit/2438347c1a10. * refactoring * remove unnecessary comment handling https://github.com/ruby/reline/commit/d60f1e1e39
2024-05-08[ruby/reline] Implement bracketed paste inserttomoya ishida
(https://github.com/ruby/reline/pull/655) https://github.com/ruby/reline/commit/e92dcbf514
2024-05-05[ruby/reline] Remove not implemented variablesMari Imaizumi
(https://github.com/ruby/reline/pull/699) https://github.com/ruby/reline/commit/328699e901
2024-05-02[ruby/reline] Fix default and additional key bindings vanish bugtomoya ishida
(https://github.com/ruby/reline/pull/697) https://github.com/ruby/reline/commit/fc9b4d2274
2024-05-02[ruby/reline] Avoid reading .inputrc repeatedlyMari Imaizumi
(https://github.com/ruby/reline/pull/694) https://github.com/ruby/reline/commit/c8d4802a0f
2024-04-29[ruby/reline] Handle mode condition in inputrcMari Imaizumi
(https://github.com/ruby/reline/pull/687) https://github.com/ruby/reline/commit/bed5fb3d77
2024-04-25[ruby/reline] Fix inputrc nested $if $else $endif bugtomoya ishida
(https://github.com/ruby/reline/pull/689) https://github.com/ruby/reline/commit/0d8aea26ec
2023-09-26[ruby/reline] Fix config.rb to File.expand_path $include path inelfham
inputrc (https://github.com/ruby/reline/pull/592) * Fix config.rb to File.expand_path $include path in inputrc * fix bug of test_include_expand_path on Windows https://github.com/ruby/reline/commit/4d34e52d0b
2023-01-31[ruby/reline] Splat is always an ArrayÉtienne Barrié
https://github.com/ruby/reline/commit/82095bd62b
2022-12-05[ruby/reline] Remove unapproved color setting APIsStan Lo
These APIs/configs are not approved by the Ruby core, so they can't be released to the public. This means having them in the codebase will block other fixes/features from being released as well. So this commit removes those exposed interfaces to unblock the release. Hopefully when https://bugs.ruby-lang.org/issues/18996 is approved we can re-implement better APIs. https://github.com/ruby/reline/commit/f7a961c550
2022-07-22[ruby/reline] Rename dialog_pointer_* to dialog_highlight_*st0012
"Pointer" is not what we usually use to describe a selected item. "Highlight" is a more common word for the scenario so we should use it instead. https://github.com/ruby/reline/commit/b4279d1557
2022-07-16[ruby/reline] Use color name instead of code (integer) in dialog color APIsst0012
As pointed out in the [comment](https://github.com/ruby/reline/pull/413#issuecomment-1168033973), the code is actually a control sequence and not only for colors. To make the dialog color APIs safer to use, we should restrict its usages and extract away the bg/fg concept from the input. So in this commit, I made these changes: 1. The dialog_*_bg/fg_color APIs only takes and returns color names (symbol): - :black - :red - :green - :yellow - :blue - :magenta - :cyan - :white 2. Add additional dialog_*_bg/fg_color_sequence APIs to access the raw code. https://github.com/ruby/reline/commit/b32a977766
2022-06-27[ruby/reline] Enable to change the background color of dialogs. ↵pocari
(https://github.com/ruby/reline/pull/413) https://github.com/ruby/reline/commit/bd49537964
2022-02-22[ruby/reline] Fix support for emacs-ctlx and emacs-meta keymapsTim Pope
The existing implementation, given the below .inputrc, erroneously creates a "C-v" key binding: set keymap emacs-ctlx "\C-v": "[C-x C-v was pressed]" This fixes it to instead create a "C-x C-v" keybinding. https://github.com/ruby/reline/commit/719f52d231
2021-12-10[ruby/reline] @convert_meta is true unless 8-bit charactersima1zumi
If Reline::IOGate.encoding contains 7-bit characters, convert-meta will set it On. Because in readline(3): > The default is On, but readline will set it to Off if the locale contains eight-bit characters. As far as I know, 7-bit encoding used in terminals is only US-ASCII. https://github.com/ruby/reline/commit/b71d1fa496
2021-09-07[ruby/reline] Refactor the merging key bindings to make it more readableaycabta
https://github.com/ruby/reline/commit/59665a22de
2021-09-07[ruby/reline] Change the comment about key bindings to more appropriateaycabta
https://github.com/ruby/reline/commit/4364d9a386
2021-09-06[ruby/reline] Memoize path of `.inputrc` [Ref #319]manga_osyo
When `ENV["HOME"] = "foo"` on irb, an exception is raised when retrieving the path of `.inputrc`. Memoize the path of `.inputrc` and don't get the path after the second time. https://github.com/ruby/reline/commit/7b90b16165
2021-09-06[ruby/reline] Support oneshot key bindings config for key_trap of dialog ↵aycabta
callbacks https://github.com/ruby/reline/commit/5f1141b693
2021-08-30[ruby/reline] Set autocompletion is false by defaultaycabta
For compatibility with ext/readline. https://github.com/ruby/reline/commit/13d9b936bc
2021-08-30[ruby/reline] Add config.autocompletionaycabta
https://github.com/ruby/reline/commit/3d918e4ccb
2021-07-30[ruby/reline] Check empty .inputrcaycabta
https://github.com/ruby/reline/commit/b60b3b76cd
2021-06-21Rescue conversion error of inputrcaycabta
2021-06-21[ruby/reline] The config file must accept any character encodingaycabta
In Japan, so many programmers used EUC-JP to write text files that contain Japanese. Many .inputrc files which contain EUC-JP are still being copied and used. This commit supports the whole encoding of what user set including UTF-8. ref. https://github.com/ruby/reline/pull/280 https://github.com/ruby/reline/commit/0b45022e16
2021-06-21[ruby/reline] ensure reline's encoding is used when reading inputrc ↵Mark Delk
character values This change ensures we use `Reline::IOGate`'s `encoding` when converting characters from their integer values. This fixes an issue that may occur if you have UTF characters in your `.inputrc`, but your default encoding isn't set. For example: ``` > 127864.ord.chr RangeError: 127864 out of char range from (pry):1:in `chr' > Reline::IOGate.encoding => #<Encoding:UTF-8> > 127864.ord.chr(Reline::IOGate.encoding) => "🍸" ``` https://github.com/ruby/reline/commit/cf372fc0fc
2021-04-09[ruby/reline] Add calling Reline::Config#reset_default_key_bindings to ↵aycabta
#reset, which is forgot to call
2021-04-08[ruby/reline] Separate keystrokes each editing modeaycabta
https://github.com/ruby/reline/commit/ee23e6f3f8
2021-01-08[ruby/reline] Correct var names in Reline were different from vi-*-mode-stringaycabta
https://github.com/ruby/reline/commit/8255fc93b9
2020-12-22[ruby/reline] Support isearch-terminatorsaycabta
https://github.com/ruby/reline/commit/a7922da16b
2020-12-05[ruby/reline] Support bracketed paste modeaycabta
https://github.com/ruby/reline/commit/d1a6869322
2020-08-18[ruby/reline] Get rid of loading pathname unnecessarilyNobuyoshi Nakada
https://github.com/ruby/reline/commit/9bd54b7f1c
2020-08-18[ruby/reline] Keep original characters in inputrcaycabta
https://github.com/ruby/reline/commit/96583c6336
2020-08-18[ruby/reline] Support mode iconMark Delk
Co-authored-by: aycabta <aycabta@gmail.com> https://github.com/ruby/reline/commit/067b618123
2020-05-17[ruby/reline] If history-size isn't numeric, it should be 500aycabta
https://tiswww.case.edu/php/chet/readline/readline.html#IDX25 > If an attempt is made to set history-size to a non-numeric value, the maximum > number of history entries will be set to 500. https://github.com/ruby/reline/commit/acf0437280
2020-04-29[ruby/reline] Add URL reference of history-sizeaycabta
https://github.com/ruby/reline/commit/13420197b8
2020-04-29[ruby/reline] Negative history_size means unlimitedaycabta
And unlimited is default. https://github.com/ruby/reline/commit/f5149c3ca6
2020-04-29[ruby/reline] Ignore non-absolute XDG_CONFIG_HOMENobuyoshi Nakada
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html > All paths set in these environment variables must be absolute. > If an implementation encounters a relative path in any of these > variables it should consider the path invalid and ignore it. https://github.com/ruby/reline/commit/45af6eea77
2020-04-24[ruby/reline] Treat home dir correctlyaycabta
https://github.com/ruby/reline/commit/9b1327d2f4
2020-04-24[ruby/reline] Support XDG_CONFIG_HOMEaycabta
In the XDG Specification, if ~/.config/readline/inputrc exists, then ~/.inputrc should not be read, but for compatibility with GNU Readline, if ~/.inputrc exists, then it is given priority. https://github.com/ruby/reline/commit/97f1e7db04
2020-03-26[ruby/reline] Suppress error in case INPUTRC env is emptyaycabta
https://github.com/ruby/reline/commit/bce7e7562b
2020-01-06Support history-size in .inputrc correctlyaycabta
2019-12-22Remove TODO commentaycabta
2019-12-05Fix variable catchaycabta
2019-07-28[reline] Do not compile regexp for each lineNobuyoshi Nakada