1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Respect --nocolorize on REPL source highlight

This commit is contained in:
Takashi Kokubun 2019-05-25 06:31:13 -07:00
parent 65ce14e7b5
commit e691b4da5d
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -222,9 +222,11 @@ module IRB
end
Reline.completion_append_character = nil
Reline.completion_proc = IRB::InputCompletor::CompletionProc
Reline.output_modifier_proc = proc do |output|
next unless IRB::Color.colorable?
IRB::Color.colorize_code(output)
if IRB.conf[:USE_COLORIZE]
Reline.output_modifier_proc = proc do |output|
next unless IRB::Color.colorable?
IRB::Color.colorize_code(output)
end
end
Reline.dig_perfect_match_proc = IRB::InputCompletor::PerfectMatchedProc
end