Uh oh!
There was an error while loading. Please reload this page.
Changed to add parameters in irbrc to pass to Reline. - #337
Conversation
joeyparis
commented
Jan 31, 2022
@pocari I've been using this for a little while now and haven't run into any problems. |
james-caresnap
commented
Feb 10, 2022
Would it be desirable to support at least 4 color settings?
For example, this is a screenshot on my machine with your config. The highlighted row of the autocomplete is completely illegible. |
pocari
commented
Feb 13, 2022
Like you said, I needed to be able to set up a foreground view. You should be able to see something like the following |
sshock
commented
Mar 5, 2022
Would love to see this feature! Is there any reason it hasn't been approved and merged yet? |
Probably a good idea to only set the Reline settings if they are set in IRB.conf and supported in reline. Like this: ifIRB.conf[:DIALOG_DEFAULT_BG_COLOR] && Reline.respond_to?("dialog_default_bg_color=")Reline.dialog_default_bg_color=IRB.conf[:DIALOG_DEFAULT_BG_COLOR]endAnd similar for the other settings. Existing "~/.irbrc" files likely won't have those settings. |
pocari
commented
May 22, 2022
@BrianHawley Thank you. I have fixed it. ( 12e5a7a ) |
By making ~/.irbrc look like the following, this PR may be unnecessary for us. |
| if IRB.conf[:USE_AUTOCOMPLETE] | ||
| Reline.add_dialog_proc(:show_doc, SHOW_DOC_DIALOG, Reline::DEFAULT_DIALOG_CONTEXT) | ||
| end | ||
| if IRB.conf[:DIALOG_DEFAULT_BG_COLOR] && Reline.respond_to?('dialog_default_bg_color=') |
There was a problem hiding this comment.
I think it's more idiomatic to use symbols rather than strings for respond_to?. E.g. Reline.respond_to?(:dialog_default_bg_color=).
First of all, ruby/reline#413 has been merged! We're half way of fixing the issue 🎉 Ideally, changes like that will be released in a minor version bump, which will be ifGem::Version.new(Reline::VERSION) >= Gem::Version.new("0.4.0")Reline.dialog_default_bg_color=IRB.conf[:DIALOG_DEFAULT_BG_COLOR]Reline.dialog_pointer_bg_color=IRB.conf[:DIALOG_POINTER_BG_COLOR]Reline.dialog_default_fg_color=IRB.conf[:DIALOG_DEFAULT_FG_COLOR]Reline.dialog_pointer_fg_color=IRB.conf[:DIALOG_POINTER_FG_COLOR]endAnd then assigning the defaults in Also, can you add some test cases for it? |
st0012
commented
Jul 15, 2022
@pocari I've updated the
Thanks again for initiating these changes. Let me know if you want to do the extra work or you want someone else to take over it. |
tompng
commented
Nov 29, 2023
Thank you for the pull request. |


I wanted to change the color of the completion dialog in Reline, so I made the following modifications to Reline
ruby/reline#413
Initially, I was thinking of setting the color in inputrc.
However, after receiving a report from Readline that warned that it was an unknown setting, I received a suggestion to set it in irbrc.
So, I made a modification to pass the configuration items to Reline using irbrc.
This is an example of using irbrc.

This is an example without irbrc settings.

You can try with the following settings