28

I am learning sbt build tool. I use interpreted sbt. I run lot of commands and get lot of output which clutters up the screen.

The question is any command for clear screen for sbt interpretive console , like cls in DOS shell or clear in bash

My googling skill did not helped

update : i am using console2 with windows power shell

3
  • What OS and what terminal are you using?
    – drexin
    May 24, 2013 at 12:50
  • 6
    Ctrl+L works in linux.
    – George
    May 24, 2013 at 13:05
  • updated with terminal used
    – ajduke
    May 24, 2013 at 15:23

3 Answers 3

47

In bash you should be able to use Ctrl+L, on OSX you can also use Cmd+K.

3
10

This specifically helps when you're doing something in continuous mode, ala `compile:

maxErrors := 5
triggeredMessage := Watched.clearWhenTriggered

This works as of 0.13.7. The second line clears the screen before each command runs. The first line limits the number of errors. With this config, you only ever have one screen full of errors to work through. Obviously could adjust maxErrors depending on your sbt window.

0
4

Sbt will load ~/.sbt/1.0/build.sbt as global settings.

commands += Command.command("cls") { state =>
  print("\033c")
  state
}

Then you can run any commands with cls. For example:

  • ~;cls;compile
  • ~;cls;testOnly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.