Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown property error for exit in Groovysh

Tags:

groovy

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.

like image 728
αƞjiβ Avatar asked Dec 29 '14 18:12

αƞjiβ


2 Answers

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.

like image 111
Opal Avatar answered Oct 16 '22 13:10

Opal


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.

like image 24
itsraghz Avatar answered Oct 16 '22 13:10

itsraghz