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
Gradle Exec task changes keyboard characters #4982
Comments
This is similar to #1251. In short, there's not a great way to feed input from the user to an executing task (as you're trying to do). I would suggest a few things:
|
@big-guy I agree most cases we should ask information to the user using command line task options or project properties, even env variables can be used, but there are certain cases where it may be useful like @RosesTheN00b mentioned: in my case I created this plugin https://github.com/mrsarm/jshell-plugin that allows to launch a interactive jshell session, with the same classpath the project has which is not easy to setup manually in a bash session, and because the arrow keys and tab key issue, is not possible to use the autocomplete features the jshell has. Even launching the Jshell as a forked process with the 'application' plugin the problem is the same, because Gradle does not exit until the application launched ends. Is at least a non documented workaround / internal class that we can use to overcome the issue? I found this but didn't work, at least with Gradle 6+. |
If a program is executed with gradle, then certain characters of the keyboard will be escaped/changed (?), even if the program can handle it.
Especially arrow keys and tab key have a different behavior.
Expected Behavior
The keyboard input is treated the same, no matter whether the program is started with gradle, or directly in the terminal.
Current Behavior
When a programm is startet with gradle, arrow-keys don't work.
This shows up in the terminal:
Context
I'm trying to implement a plugin for the cobol language with the GnuCobolCompiler. To support screen-sections, gradle should pass through the arrow-keys and tab.
This problem occurs not only with Cobol executables but with all exec tasks of gradle.
To keep the steps to reproduce simple, the example uses
bash
.Steps to Reproduce (for bugs)
This problem with
bash
:Add this task to your build.gradle:
and execute this task:
Press arrow keys.
Your Environment
The text was updated successfully, but these errors were encountered: