αƞjiβ
αƞjiβ

Reputation: 3256

Unknown property error for exit in Groovysh

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.

Upvotes: 12

Views: 1736

Answers (2)

itsraghz
itsraghz

Reputation: 1017

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.

Upvotes: 2

Opal
Opal

Reputation: 84854

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.

Upvotes: 11

Related Questions