From 74593613ea399518d6f72cb9ca330efbfcf719cb Mon Sep 17 00:00:00 2001 From: tomoya ishida Date: Sun, 24 Mar 2024 22:04:30 +0900 Subject: [PATCH] [ruby/reline] Disable dialog proc if TERM=dumb (https://github.com/ruby/reline/pull/663) https://github.com/ruby/reline/commit/4928e06a24 --- lib/reline.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/reline.rb b/lib/reline.rb index 713d1a8b60..f3fd28b627 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -331,8 +331,10 @@ module Reline line_editor.auto_indent_proc = auto_indent_proc line_editor.dig_perfect_match_proc = dig_perfect_match_proc pre_input_hook&.call - @dialog_proc_list.each_pair do |name_sym, d| - line_editor.add_dialog_proc(name_sym, d.dialog_proc, d.context) + unless Reline::IOGate == Reline::GeneralIO + @dialog_proc_list.each_pair do |name_sym, d| + line_editor.add_dialog_proc(name_sym, d.dialog_proc, d.context) + end end unless config.test_mode