Command line editing in irb under MSYS

Has anyone been able to get irb to work nicely under MSYS? And ‘irb -r
irb/completion’?

For me, the cursor keys are broken, and in fact cause irb to exit. There
are similar problems if I run the same irb executable in a CMD.EXE
shell, or in the rxvt that comes with MSYS (which sets TERM=xterm).
However, completion does work when running irb under CMD.EXE, strangely
enough. So I know readline is working ok.

Thanks for any help!

Btw, if anyone else wants to build ruby from source under msys/mingw,
you need to do two things other than the usual:

  1. Get bison (binary available from the mingw sourceforge site).

  2. Do ‘configure --prefix=C:/msys/1.0/local’ or similar. Use windows
    paths, rather than posix (’/usr/local’), or else the installer won’t put
    binaries in the right place, because of the rules about when MSYS
    translates paths. (MSYS translates paths only when executing a binary in
    the MSYS /bin or /usr/bin directories.)

Joel VanderWerf wrote:

  1. Do ‘configure --prefix=C:/msys/1.0/local’ or similar. Use windows
    paths, rather than posix (‘/usr/local’), or else the installer won’t put
    binaries in the right place, because of the rules about when MSYS
    translates paths. (MSYS translates paths only when executing a binary in
    the MSYS /bin or /usr/bin directories.)

I got that last bit backwards: MSYS translates paths except when the
binary is in /bin or /usr/bin.