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:
parent
65ce14e7b5
commit
e691b4da5d
1 changed files with 5 additions and 3 deletions
|
@ -222,10 +222,12 @@ module IRB
|
||||||
end
|
end
|
||||||
Reline.completion_append_character = nil
|
Reline.completion_append_character = nil
|
||||||
Reline.completion_proc = IRB::InputCompletor::CompletionProc
|
Reline.completion_proc = IRB::InputCompletor::CompletionProc
|
||||||
|
if IRB.conf[:USE_COLORIZE]
|
||||||
Reline.output_modifier_proc = proc do |output|
|
Reline.output_modifier_proc = proc do |output|
|
||||||
next unless IRB::Color.colorable?
|
next unless IRB::Color.colorable?
|
||||||
IRB::Color.colorize_code(output)
|
IRB::Color.colorize_code(output)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
Reline.dig_perfect_match_proc = IRB::InputCompletor::PerfectMatchedProc
|
Reline.dig_perfect_match_proc = IRB::InputCompletor::PerfectMatchedProc
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue