2017-05-17 2 views
1

GroovyShell scheint Multiline nicht zu beenden, wenn eine ungültige Eingabe eingegeben wird. Beispiel:GroovyShell exit multiline

groovy:000> InvalidClosure { 
groovy:001> meaninglessCommands 
groovy:002> } 
ERROR groovy.lang.MissingMethodException: 
No signature of method: groovysh_evaluate.InvalidClosure() is applicable 
for argument types: (groovysh_evaluate$_run_closure1) values: 
[[email protected]] 
groovy:002> 

Ich kann nicht zurück zu groovy:000> egal, was ich versuche, und die REPL hält die ungültigen Befehle zu interpretieren, da es ich bin immer noch auf dem gleichen mehrzeiligen Befehl versteht.

Wie beende ich diese multiline-Instanz?

Antwort

0

Geben Sie einfach :clear ein.

groovy:000> ? 
[...] 
Available commands: 
    :help  (:h) Display this help message 
    ?   (:?) Alias to: :help 
[...] 
    :display (:d) Display the current buffer 
    :clear  (:c) Clear the buffer and reset the prompt counter 
[...]