readline icon indicating copy to clipboard operation
readline copied to clipboard

Windows: mingw64/mys2 environment compatibility

Open kenshaw opened this issue 7 years ago • 4 comments

Really appreciate the work you've done with readline! I'm a hardcore unix user, and I'm trying to get an automated build environment setup on a Windows 10 VM, using mingw64/msys2 for usql. In that way, I will be able to use the same bash script to build for Linux, OSX, and Windows, in order to script/automate builds. This is all fine/dandy, however I'd like to test some minimal functionality of the actual built usql.exe binary on Windows, however the problem is that when invoking the usql.exe under mingw64/msys2, the executable immediately exits with no errors.

I had thought this was because I wasn't using readline properly (I had known this a while back, but didn't have the time to go through all the readline code to figure out what I was missng). However, I fixed that issue for Windows, and was hoping that would fix it so that it would work under mingw64/msys2. Unfortunately, it still has the same behavior.

I'm sure I'm just missing some key bit, but is there some config necessary to get it to play nicely with the msys2 term on Windows?

kenshaw avatar Mar 11 '17 06:03 kenshaw

Actually, sorry, I think I found the problem. It's not readline. Sorry -- instead I think its a problem with how I'm detecting whether or not its a terminal.

kenshaw avatar Mar 11 '17 07:03 kenshaw

So, there was indeed a problem with detecting the cygwin terminal. However, I'm not sure of what the logic should be for working under a cygwin terminal in Windows. Any advice/input on configuring readline to properly work? The issue now for usql under cygwin terminals using readline, is that interrupts aren't being captured (ie, ctrl-c immediately exits), and that every key causes the terminal to redraw.

My apologies for my ignorance on the matter. Again, really appreciate the work you've done!

kenshaw avatar Mar 11 '17 07:03 kenshaw

@kenshaw it was not your ignorance neither the way you checked for whatever, but a big of this library which I fixed in a PR ... waiting to be merged. Expect more Windows related PR soon.

evilsocket avatar Feb 07 '18 22:02 evilsocket

Is this perhaps responsible for:

https://github.com/candid82/joker/issues/103

?

jcburley avatar Oct 12 '18 18:10 jcburley