MinGW readline Alt / Meta keys
MinGW builds from Ruby Installer have been using the rb-readline gem instead building the readline extension with the MinGW readline package.
Building the extension with the package (7.0.003 updated 2017-02-03) passes most tests in test-all. But...
When using the MinGW package, many of the Meta/Alt keystrokes do not work (b, d, f, t, ) in irb (they add the letter at the cursor), but they work with the gem. The case keystrokes, (c, l, u) do not work in either. Also, arrow key left/right navigation seems smoother with the gem.
Not being a c type, I'm not sure if this is a fix in readline.c or a problem with the MinGW package (third-party).
Lastly, I don't use irb that much, so there may be other issues. If anyone has info/links to other testing I could do, please let me know.
Updated by MSP-Greg (Greg L) about 2 years ago
After discovering that Meta/Alt key combinations can also be done via an [ESC] then [key] press, I've verified that all Meta/Alt combinations work with the readline package when done via [ESC]. So, it may be that readline.c is not recognizing the windows Alt key. Then again, it may be in the MinGW/MSYS2 package. As stated before, I'm not a c type...
Updated by MSP-Greg (Greg L) almost 2 years ago
Re-addressing this with a current build, the same issue exists. As mentioned previously, this issue will only exhibit itself when used with a MinGW build that uses the MSYS2/MinGW
readline has been problematic in the past on windows, but that was with versions 6 and earlier. This is probably the reason the readline-rb gem exists, and why it has been installed on windows builds.
I am not familiar with how
readline works in a OSX/*nix env, so I don't even know if I'd use it if it worked perfectly under windows. Given that IRB is currently problematic, I test anything requiring more than a line or two with an rb file and make use of the history in the windows command window.
So, if anyone familiar with
readline, that can also run a windows build, and is comfortable using my build at BinTray (which generates the last section of output in appveyor-ruby), feel free to check how IRB behaves.
Otherwise, this can be closed.