Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.0.7
-
None
-
None
Description
I am building webtau REPL based on groovysh.
Right now I am looking for ways to handle ctrl+c to stop currently running command instead of closing the whole REPL process.
After some googling I found that Jline has `handleUserInterrupt` property. I am not sure if that will fully solve my problem.
I can't find a way to pass the prop during groovsh instance creation.
groovysh.runner.reader.handleUserInterrupt = true
Is throwing null pointer as the `runner` instance gets created only after `run`. And `run` takes control and you can't set anything after it.
Would it be possible to add an option to pass handleUserInterrupt?
If you are aware of other ways to handle ctrl+c - that would be super helpful
Thank you.