When I am giving exit command in Groovysh command prompt I am getting following error. Other commands are working fine.
Groovy Shell (2.3.6, JVM: 1.8.0_25)
...
groovy:000> exit
Unknown property: exit
groovy:000>
I tried with Ctrl + D and it is also working fine.
exit
was replaced with :exit
, but unfortunately I don't remember in which version it was introduced.
EDIT I've found it. See this tweet.
As per this page, http://groovy-lang.org/groovysh.html (See 1.4.1. Recognized Commands), the ONLY way to exit the shell is by pressing :x or :exit.
You can also do so by doing Ctrl + C, however it will give a warning of an abnormal termination of JVM.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With