diff options
author | aycabta <aycabta@gmail.com> | 2019-05-22 02:13:57 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-05-22 02:13:57 +0900 |
commit | be86e71c674a6eb3221019cc9e988b3e999b2220 (patch) | |
tree | 47988303b9336be257791d0ec3c82238f945213c /lib/reline.rb | |
parent | b508b623ee1cc526cfd674218f6e6e7fa6b10f26 (diff) | |
download | ruby-be86e71c674a6eb3221019cc9e988b3e999b2220.tar.gz |
Reopen $stderr with specified fd by RELINE_STDERR_TTY
Diffstat (limited to 'lib/reline.rb')
-rw-r--r-- | lib/reline.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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 |