输入无效输入时,GroovyShell似乎不退出多行。示例:
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:
[groovysh_evaluate$_run_closure1@5a9f4771]
groovy:002>无论我尝试什么,我都无法返回到groovy:000>,而且REPL一直在解释无效的命令,因为它知道我仍然使用相同的多行命令。
如何退出这个多行实例?
发布于 2017-05-17 22:45:43
只需输入:clear。
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
[...]https://stackoverflow.com/questions/44032124
复制相似问题