-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.19.0 Regression - Escape sequences are printed when using Git Bash in Windows Terminal #693
Comments
Same here. Output is terribly broken in cygwin as well (CYGWIN_NT-10.0 DESKTOP-B07NHJ5 3.2.0(0.340/5/3) 2021-03-29 08:42 x86_64 Cygwin). |
Seems to be caused by this change: Reverting this commit fixes the issue locally (though requires some conflict resolution) |
Seems to be caused by #669 |
@ryanhinton and @mvmn, please could you check if the pull request #670 fixes your problem. |
@ryanhinton I have built the code on the pull and sent it to you as a jar in our Slack thread for you to test. |
Thank you for looking into this @mvmn and @bdw429s! I replaced the older jar file with the snapshot jar derived from this pull request and tested but still receive the escape characters. I made sure the older jline files were removed as well. Moreover, I also renamed it as jline-3.20.0.jar just to make sure it wasn't possibly an issue with the word 'SNAPSHOT' in the filename or that the code does not look for versions beyond 3.20.0 just yet. When I revert to using jline 3.18.0 jar, it looks good again. |
Hmm, weird. I've checked out and built locally the https://github.com/mattirn/jline3/tree/cygwin-issue , and it worked fine for me provided that I supply jansi or jna as parameter when running jline-repl.sh. Did you try with jansi or jna parameter, @ryanhinton ? When you run jline-repl.sh, what does it show in classpath output? Usually when it starts it outputs the classpath. |
@mvmn Is there a difference between Cygwin and Git Bash (MINGW64)? Git bash is what I'm using. Maybe the two CLIs have the same issue, but have to be resolved differently. I'm not versed in Java or Jline well enough to be able to test in the manner you have mentioned, unfortunately. Maybe I can attempt to follow an example, if that's possible. I do know that I removed previous versions of jline jars and used the snapshot version of the jar, but it did not resolve the problem for Git Bash, unfortunately. |
@mvmn If you wanted to try the same tool Ryan is using, you can grab Generally speaking, the tool doesn't do anything special for one terminal or another. It relies on JLine to detect and do what it needs whether on Mac, Linux, or Windows and whatever array of Terminal apps that can be found on those OS's. |
I suppose there is, I remember seeing some checks like "if(cygwin)" in the code. |
P.S. Tested with GitBash - jline-repl works fine with the fix, just like in CygWin. |
Downloaded commandbox-win-5.4.0, unpacked box.exe and run it in GitBash - seems to be working just fine ¯\_(ツ)_/¯ |
@mvmn, thank you for testing this! Obviously, I was puzzled how this was working for you. I found the fault of this but never knew that outside factors would interfere with Git Bash... until you said it works. So, I am using Windows Terminal which I thought was just executing Git Bash, but it is actually the reason for why it's not working somehow. My setup is that I open Windows Terminal in which I added Git Bash as an option to open within Windows Terminal. Git Bash doesn't appear any different inside Windows Terminal than running Git Bash outright, but there is apparently other things happening when Git Bash is running within Windows Terminal. When I execute Git Bash by itself, it works. When I attempt to run Git Bash from Windows Terminal, the characters get messed up for jline versions 3.19.0 and higher. In case you are interested, this is my setup for Git Bash in Windows Terminal. |
I see that I am sitting on Windows Terminal version 1.9 and see that the latest version of Windows Terminal is 1.10. I'm going to update Windows Terminal to see if it helps at all. |
|
…in Windows Terminal, fixes jline#693
@ryanhinton and @mvmn, please could you check if the pull request #704 fixes your problem. I was able to reproduce the problem and for me everything seems to work correctly now. Anyway I would appreciate if you could double check. |
@mattirn , for me PR 704 works good, just as well as PR 670 did. |
@mattirn, PR 704 is working nicely with Git Bash inside Windows Terminal! Thank you very much! |
Excellent work, guys! I'll include this new version of JLine in the next version of CommandBox as soon as it hits a stable release. |
jline version 3.18.0 works, but 3.19.0 and 3.20.0 prints out raw unprocessed ANSI sequences on Git Bash from Git For Windows version 2.33.0.2-64-bit.
Version 3.19.0 and higher
Version 3.18.0
The text was updated successfully, but these errors were encountered: