Prompt always delayed with --noreadline --nomultiline
dgutov opened this issue · 6 comments
Description
What are your expected behavior and actual behavior of your environment?
Launch irb --nomultiline --noreadline
.
After sending some input, I can only see the prompt if I press RET again. Here's how the session looks:
$ irb --noreadline --nomultiline
irb(main):001:0> 3
=> 3
4
irb(main):002:0> => 4
5
irb(main):003:0> => 5
6
irb(main):004:0> => 6
irb(main):005:0> irb(main):006:0> 7
=> 7
8
irb(main):007:0> => 8
8 + 9
irb(main):008:0> => 17
irb(main):009:0> irb(main):010:0>
See another example in the original report: nonsequitur/inf-ruby#137
Terminal Emulator
What's your terminal emulator?
gnome-terminator
, gnome-terminal
and Emacs' comint all exhibit the problem.
Setting Files
Are you using ~/.irbrc
and ~/.inputrc
?
No.
What is your IRB::VERSION
?
1.2.3
1.2.4 also behaves the same.
The problem persists in 1.2.6 and 1.2.7.
Seems to be a regression given that StdioInputMethod works fine on Ruby 2.6.5 and irb 1.0.0 (bash, macOS Catalina)
UNIT-1622:~ sergey.stoyanovsky$ rvm use 2.6
Using /Users/sergey.stoyanovsky/.rvm/gems/ruby-2.6.5
UNIT-1622:~ sergey.stoyanovsky$ irb -v
irb 1.0.0 (2018-12-18)
UNIT-1622:~ sergey.stoyanovsky$ irb --noreadline
2.6.5 :001 > 1
=> 1
2.6.5 :002 > 2
=> 2
2.6.5 :003 > 3
=> 3
2.6.5 :004 > irb_context.io.inspect
=> "#<IRB::StdioInputMethod:0x00007ff5fe101778 @file_name=\"(line)\", @line_no=4, @line=[nil, \"1\\n\", \"2\\n\", \"3\\n\", \"irb_context.io.inspect\\n\"], @stdin=#<IO:fd 0>, @stdout=#<IO:fd 1>, @prompt=\"2.6.5 :004 > \">"
@dgutov @stoyanovskiy239 I think this is fixed by #152. Would you check the latest irb and reline gem by gem install irb reline
?
Looks fixed indeed, with irb
1.3.0 and reline
0.2.0.
Thanks!