Skip to content

Respect NO_COLOR environment variable #606

Open

Description

@ima1zumi

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

ref ruby/irb#327

Activity

  1. avsej commented on Jan 27, 2024

    @avsej

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions