From 126effe46005673ca826045e9cb037096d68af90 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Thu, 16 Oct 2014 11:15:16 -0700 Subject: SI-8922 REPL load -v Verbose mode causes the familiar prompt and line echo so you can see what you just loaded. The quit message is pushed up a level in the process loop. This has the huge payoff that if you start the repl and immediately hit ctl-D, you don't have to wait for the compiler to init (yawn) before you get a shell prompt back. --- src/compiler/scala/tools/nsc/Properties.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/Properties.scala b/src/compiler/scala/tools/nsc/Properties.scala index bec686ec05..9f160e2485 100644 --- a/src/compiler/scala/tools/nsc/Properties.scala +++ b/src/compiler/scala/tools/nsc/Properties.scala @@ -14,7 +14,9 @@ object Properties extends scala.util.PropertiesTrait { // settings based on jar properties, falling back to System prefixed by "scala." def residentPromptString = scalaPropOrElse("resident.prompt", "\nnsc> ") def shellPromptString = scalaPropOrElse("shell.prompt", "\nscala> ") - def shellInterruptedString = scalaPropOrElse("shell.interrupted", ":quit\n") + // message to display at EOF (which by default ends with + // a newline so as not to break the user's terminal) + def shellInterruptedString = scalaPropOrElse("shell.interrupted", f":quit$lineSeparator") // derived values def isEmacsShell = propOrEmpty("env.emacs") != "" -- cgit v1.2.3