This seems like a really silly question, but when I use groovysh
, if I have a typo, it seems to kill the entire shell.
For example, if I want to iterate through an array, I can do this arr.each { elt ->
. But if I accidentally type arr.each { elt =>
, then every future line I type results in
groovysh_parse: 2: unexpected token: > @ line 2, column 13.
arr.each { elt =>
^
I can't get back to a working shell without killing the shell and restarting it, which means I lose all the work I've done in the shell.
Is there a way to get out of this?