Ruby Irb reacts strangely to control keys

Posted by eegg on Stack Overflow See other posts from Stack Overflow or by eegg
Published on 2009-12-11T17:25:08Z Indexed on 2010/03/14 0:15 UTC
Read the original article Hit count: 606

Filed under:
|

Hi. I'm (extremely) new to Ruby, having started today.

I just moved from my system's Ruby 1.8 installation to Ruby 1.9, compiled from source. In doing so, irb has taken a turn for the worse. It reacts in a most unfriendly way to the non-alphanumeric control keys:

UP key prints: ^[[A

DOWN key prints: ^[[B

DELETE key prints: ^[[3~

...and so on. The main result of this for me is that I have no access to previously issued commands. Nor does tab-completion work; though none of this seems to be an issue with Wirble - the same happens when I remove my ~/.irbrc.

I'm using:

  • Ubuntu 9.10
  • GNOME Terminal 2.28.1
  • ruby 1.9.1p376 (2009-12-07 revision 26041) [i686-linux]
  • Irb version 0.9.5 (05/04/13)

Any ideas? :(

© Stack Overflow or respective owner

Related posts about ruby

Related posts about irb