diff options
author | Som Snytt <som.snytt@gmail.com> | 2014-10-16 11:15:16 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2014-11-04 09:12:27 -0800 |
commit | 126effe46005673ca826045e9cb037096d68af90 (patch) | |
tree | 1c6768a7d8d7a1e55a358aabd5ea68e61656874b /src/compiler | |
parent | 2b5df373638d08204b71258928289f6b39e25d5f (diff) | |
download | scala-126effe46005673ca826045e9cb037096d68af90.tar.gz scala-126effe46005673ca826045e9cb037096d68af90.tar.bz2 scala-126effe46005673ca826045e9cb037096d68af90.zip |
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.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/Properties.scala | 4 |
1 files changed, 3 insertions, 1 deletions
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") != "" |