jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-852

jirb exits on ESC followed by any arrow key followed by return

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: JRuby 0.9.8
  • Fix Version/s: JRuby 1.2
  • Component/s: Application Error
  • Labels:
    None
  • Environment:
    Linux

Description

jirb exits on ESC followed by any arrow key followed by return - I'm not sure if this is the java readline or just jirb.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Damian Steer added a comment - 20/Apr/07 5:00 AM

Since jruby doesn't see the key presses, just the result, I think it's safe to assume that this is a jline issue. Raise an issue there (where I might look at it).

I'm intrigued that you type this at all. Too much vi, I'll wager

Show
Damian Steer added a comment - 20/Apr/07 5:00 AM Since jruby doesn't see the key presses, just the result, I think it's safe to assume that this is a jline issue. Raise an issue there (where I might look at it). I'm intrigued that you type this at all. Too much vi, I'll wager
Hide
Permalink
skaar added a comment - 20/Apr/07 9:26 AM

It might be how the jruby readline / irb code deal with the result. I compiled jline/example/Example.java against the jline included with jruby, and the ESC + arrow key behaves the same way, that is, up arrow moves above the line of the prompt, but when you hit return it will not exit and rather give you a new prompt line as expected.

:wq

Show
skaar added a comment - 20/Apr/07 9:26 AM It might be how the jruby readline / irb code deal with the result. I compiled jline/example/Example.java against the jline included with jruby, and the ESC + arrow key behaves the same way, that is, up arrow moves above the line of the prompt, but when you hit return it will not exit and rather give you a new prompt line as expected. :wq
Hide
Permalink
skaar added a comment - 23/Apr/07 2:51 PM

jline will pass the escape squence created by ESC+arrow key to the IRB lexer/parser, Filtering these out, say, in IRB's eval_input prevents this from happening, but would also prevent you from legitimate use, in a string for example.

Show
skaar added a comment - 23/Apr/07 2:51 PM jline will pass the escape squence created by ESC+arrow key to the IRB lexer/parser, Filtering these out, say, in IRB's eval_input prevents this from happening, but would also prevent you from legitimate use, in a string for example.
Hide
Permalink
Charles Oliver Nutter added a comment - 23/Oct/07 3:16 PM

Still out there. Obviously not a popular bug. Fix or wontfix for 1.1.

Show
Charles Oliver Nutter added a comment - 23/Oct/07 3:16 PM Still out there. Obviously not a popular bug. Fix or wontfix for 1.1.
Hide
Permalink
Charles Oliver Nutter added a comment - 15/Feb/08 12:55 PM

Removing target release from issues that fit any of the following criteria:

  • No known way to fix them
  • Java integration enhancements out of scope for 1.1 release
  • Other out of scope issues for 1.1
Show
Charles Oliver Nutter added a comment - 15/Feb/08 12:55 PM Removing target release from issues that fit any of the following criteria:
  • No known way to fix them
  • Java integration enhancements out of scope for 1.1 release
  • Other out of scope issues for 1.1
Hide
Permalink
Charles Oliver Nutter added a comment - 04/Feb/09 12:04 AM

Talk about an old bug! This is fixed in r8984. I don't know why it was exiting, but I think it's something in irb itself. When the esc-arrow sequence came in, we read it as a normal string from readline and dutifully passed it out to the caller. From there, I'm not sure what happened, but we would exit. I modified it to set a key handler for esc to just beep the console, like MRI does, and now things look ok. I'm not sure if that's exactly what we should do, but it works well enough for now. If there's some expected behavior that goes along with esc in IRB, we can add it through other bugs/enhancements.

Show
Charles Oliver Nutter added a comment - 04/Feb/09 12:04 AM Talk about an old bug! This is fixed in r8984. I don't know why it was exiting, but I think it's something in irb itself. When the esc-arrow sequence came in, we read it as a normal string from readline and dutifully passed it out to the caller. From there, I'm not sure what happened, but we would exit. I modified it to set a key handler for esc to just beep the console, like MRI does, and now things look ok. I'm not sure if that's exactly what we should do, but it works well enough for now. If there's some expected behavior that goes along with esc in IRB, we can add it through other bugs/enhancements.

People

  • Assignee:
    Charles Oliver Nutter
    Reporter:
    skaar
Vote (0)
Watch (0)

Dates

  • Created:
    20/Apr/07 12:57 AM
    Updated:
    21/Mar/09 1:13 PM
    Resolved:
    04/Feb/09 12:04 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.