Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect NO_COLOR environment variable #606

Open
ima1zumi opened this issue Nov 11, 2023 · 1 comment
Open

Respect NO_COLOR environment variable #606

ima1zumi opened this issue Nov 11, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@ima1zumi
Copy link
Member

ima1zumi commented Nov 11, 2023

I want the completion dialog to have no color if the NO_COLOR environment variable is present.

ref ruby/irb#327

@ima1zumi ima1zumi added the enhancement New feature or request label Nov 21, 2023
@avsej
Copy link

avsej commented Jan 27, 2024

A temporary solution would be this snippet for $HOME/.irbrc:

require "reline/face"

if ENV.key?("NO_COLOR")
  Reline::Face.config(:completion_dialog) do |conf|
    conf.define :default, foreground: :white, background: :black
    conf.define :enhanced, foreground: :black, background: :white
    conf.define :scrollbar, foreground: :white, background: :black
  end
end

RDoc still in color though, but at least what related to reline works as expected.

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants