$ sbt > compile上箭头按键能够选择前一条命令。
其中test-only有两个参数,TestA和TestB,把他们做为一个总体,须要用双引号包起来。 java
~ compilesbt会先执行一次编译,并进入阻塞状态。修改scala文件并保存,sbt就会自动从新编译这个文件。在控制台输入回车能够回到交互模式。
sbt ~ compile run
E:\study\study-sbt\hello-sbt>sbt ~ compile run [info] Loading project definition from E:\study\study-sbt\hello-sbt\project [info] Set current project to hello-sbt (in build file:/E:/study/study-sbt/hello -sbt/) 1. Waiting for source changes... (press enter to interrupt) 2. Waiting for source changes... (press enter to interrupt) 3. Waiting for source changes... (press enter to interrupt) [info] Updating {file:/E:/study/study-sbt/hello-sbt/}default-dea105... [info] Resolving org.scala-lang#scala-library;2.10.0 ... [info] Done updating. [info] Compiling 1 Scala source to E:\study\study-sbt\hello-sbt\target\scala-2.1 0\classes... [success] Total time: 4 s, completed 2013-1-23 12:01:17 [info] Running Hello Hello sbt!12 [success] Total time: 0 s, completed 2013-1-23 12:01:17
可见只有最后一次的更改生效了。。。 shell
reload 从新加载配置(build.sbt, project/*.scala, project/*.sbt)。修改构建文件后须要重载才能生效。 eclipse
在空命令提示符下直接输入tab能够查看全部命令。 测试
(最后两个感受没什么用) ui
!-n例子> clean [success] Total time: 0 s, completed 2013-1-23 13:55:19 > !:5 40 !: 41 clean 42 !: 43 clean 44 !:5 > !-2 clean [success] Total time: 0 s, completed 2013-1-23 13:55:30!string例子
> !:10 44 !:5 45 clean 46 compile 47 !:10 48 clean 49 !: 50 clean 51 !: 52 !:5 53 !:10 > !c clean [success] Total time: 0 s, completed 2013-1-23 13:58:45 > !co compile ...