repl: quit command

This commit is contained in:
Stepan Koltsov
2012-06-09 23:25:40 +04:00
parent b99f7c5505
commit d921304535
@@ -86,7 +86,7 @@ public class ReplFromTerminal {
private void doRun() {
try {
System.out.println("Kotlin interactive shell");
System.out.println("Type :help for help");
System.out.println("Type :help for help, :quit for quit");
while (true) {
boolean next = one();
if (!next) {
@@ -129,8 +129,12 @@ public class ReplFromTerminal {
System.out.println("This is Kotlin REPL help");
System.out.println("Available commands are:");
System.out.println(":help show this help");
System.out.println(":quit exit the interpreter");
return true;
}
else if (command.equals("quit")) {
return false;
}
else {
System.out.println("Unknown command");
System.out.println("Type :help for help");