Docs: Add cleanupCommands to howto

This commit is contained in:
Mark Harrah 2013-08-27 08:11:27 -04:00
parent f725dd6c65
commit c500df66d5
1 changed files with 23 additions and 0 deletions

View File

@ -120,6 +120,29 @@ The `consoleProject` command is configured separately by `initialCommands in con
initialCommands in consoleProject := """println("Hello from consoleProject")"""
.. howto::
:id: cleanup
:title: Define the commands evaluated when exiting the Scala REPL
:type: setting
cleanupCommands in console := """println("Bye!")"""
Set `cleanupCommands in console` to set the statements to evaluate after exiting the Scala REPL started by `console` and `consoleQuick`. To configure `consoleQuick` separately, use `cleanupCommands in consoleQuick`.
For example,
::
cleanupCommands in console := """println("Bye from console")"""
cleanupCommands in consoleQuick := """println("Bye from consoleQuick")"""
The `consoleProject` command is configured separately by `cleanupCommands in consoleProject`. It does not use the value from `cleanupCommands in console` by default. For example,
::
cleanupCommands in consoleProject := """println("Bye from consoleProject")"""
.. howto::
:id: embed
:title: Use the Scala REPL from project code