Skip to content

Prompt always delayed with --noreadline --nomultiline #127

Closed

Description

@dgutov

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.

Activity

  1. nobu commented on Aug 26, 2020

    @nobu
    Member

    What is your IRB::VERSION?

  2. dgutov commented on Aug 26, 2020

    @dgutov
    ContributorAuthor

    1.2.3

  3. dgutov commented on Aug 26, 2020

    @dgutov
    ContributorAuthor

    1.2.4 also behaves the same.

  4. stoyanovskiy239 commented on Dec 4, 2020

    @stoyanovskiy239

    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 > \">" 
    
  5. aycabta commented on Dec 26, 2020

    @aycabta
    Member

    @dgutov @stoyanovskiy239 I think this is fixed by #152. Would you check the latest irb and reline gem by gem install irb reline?

  6. dgutov commented on Dec 26, 2020

    @dgutov
    ContributorAuthor

    Looks fixed indeed, with irb 1.3.0 and reline 0.2.0.

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions