ruby-changes:55831
From: Takashi <ko1@a...>
Date: Sat, 25 May 2019 22:31:34 +0900 (JST)
Subject: [ruby-changes:55831] Takashi Kokubun: e691b4da5d (trunk): Respect --nocolorize on REPL source highlight
https://git.ruby-lang.org/ruby.git/commit/?id=e691b4da5d From e691b4da5d1d70216be3e8853d18bcb6a62a617c Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Sat, 25 May 2019 06:31:13 -0700 Subject: Respect --nocolorize on REPL source highlight diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb index bc144dc..9dd8ca2 100644 --- a/lib/irb/input-method.rb +++ b/lib/irb/input-method.rb @@ -222,9 +222,11 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/input-method.rb#L222 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/