Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: JRuby 1.7.0.pre1
    • Fix Version/s: None
    • Component/s: Miscellaneous
    • Labels:
      None
    • Environment:
      RHEL 5, java 1.6.0_22
    • Number of attachments :
      0

      Description

      This .inputrc -
      "\e[A": history-search-backward
      "\e[B": history-search-forward

      up/down arrow to do history lookup -

      doesn't work in irb and causes up/down arrow do nothing. Would be nice if it defaults back to

      {previous,next}

      -history or even better add support for such binding.

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        Well, you have managed to find a feature/config I didn't even know about...kudos!

        So you are saying that the given config file does have an effect on readline behavior, but doesn't do what it's supposed to, right? I'm not familiar with .inputrc at all...is this something processed by IRB? Will investigate a bit. If you can do some investigation as well it would accelerate fixing this issue.

        Show
        Charles Oliver Nutter added a comment - Well, you have managed to find a feature/config I didn't even know about...kudos! So you are saying that the given config file does have an effect on readline behavior, but doesn't do what it's supposed to, right? I'm not familiar with .inputrc at all...is this something processed by IRB? Will investigate a bit. If you can do some investigation as well it would accelerate fixing this issue.
        Hide
        Charles Oliver Nutter added a comment -

        Ahh, ok, so .inputrc is a bash thing, and you're rebinding up and down to bash commands history-search-forward and history-search-backward. Does this affect MRI's IRB the way you would expect?

        Show
        Charles Oliver Nutter added a comment - Ahh, ok, so .inputrc is a bash thing, and you're rebinding up and down to bash commands history-search-forward and history-search-backward. Does this affect MRI's IRB the way you would expect?
        Hide
        Edho Arief added a comment -

        Yes. MRI IRB with such .inputrc behaves exactly the same as in bash.

        Show
        Edho Arief added a comment - Yes. MRI IRB with such .inputrc behaves exactly the same as in bash.
        Hide
        Charles Oliver Nutter added a comment -

        Hmm. So the equivalent keystroke in readline would be C-r, which does appear to work ok in jirb:

        system ~/projects/jruby $ jirb
        irb(main):001:0> puts 'hello'
        hello
        => nil
        irb(main):002:0> # next line will use C-r
        irb(main):003:0* puts 'hello'
        hello
        => nil
        (reverse-i-search)`put': puts 'hello'
        

        It seems like C-r works on its own, but however up/down get rebound by bash breaks on our readline implementation (jline).

        I'm going to file this as an issue with jline for now.

        Show
        Charles Oliver Nutter added a comment - Hmm. So the equivalent keystroke in readline would be C-r, which does appear to work ok in jirb: system ~/projects/jruby $ jirb irb(main):001:0> puts 'hello' hello => nil irb(main):002:0> # next line will use C-r irb(main):003:0* puts 'hello' hello => nil (reverse-i-search)`put': puts 'hello' It seems like C-r works on its own, but however up/down get rebound by bash breaks on our readline implementation (jline). I'm going to file this as an issue with jline for now.
        Hide
        Charles Oliver Nutter added a comment -

        Filed: https://github.com/jline/jline2/issues/51

        Someone came up with a fix for the backward search but jline does not yet support forward search. We'll need a jline release to pick up the change.

        Show
        Charles Oliver Nutter added a comment - Filed: https://github.com/jline/jline2/issues/51 Someone came up with a fix for the backward search but jline does not yet support forward search. We'll need a jline release to pick up the change.

          People

          • Assignee:
            Unassigned
            Reporter:
            Edho Arief
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: