Reopen Readline.output if it is not a tty

This commit is contained in:
☈king 2013-02-10 23:47:33 -06:00 committed by rkingpa@sharpsaw.org
parent 60fe27f17f
commit 1538bc0990
1 changed files with 3 additions and 0 deletions

View File

@ -618,6 +618,9 @@ class Pry
end
if input == Readline
if !$stdout.tty? && $stdin.tty? && !Pry::Helpers::BaseHelpers.windows?
Readline.output = File.open('/dev/tty', 'w')
end
input.readline(current_prompt, false) # false since we'll add it manually
elsif defined? Coolline and input.is_a? Coolline
input.readline(current_prompt)