From be86e71c674a6eb3221019cc9e988b3e999b2220 Mon Sep 17 00:00:00 2001 From: aycabta Date: Wed, 22 May 2019 02:13:57 +0900 Subject: [PATCH] Reopen $stderr with specified fd by RELINE_STDERR_TTY --- lib/reline.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/reline.rb b/lib/reline.rb index 258edcd457..ac279b43f0 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -273,6 +273,9 @@ module Reline end def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination) + if ENV['RELINE_STDERR_TTY'] + $stderr.reopen(ENV['RELINE_STDERR_TTY'], 'w') + end @@config.read otio = Reline::IOGate.prep