diff --git a/frontend/src/main/scala/bloop/engine/Interpreter.scala b/frontend/src/main/scala/bloop/engine/Interpreter.scala index c4a32e8e18..e1d68d2015 100644 --- a/frontend/src/main/scala/bloop/engine/Interpreter.scala +++ b/frontend/src/main/scala/bloop/engine/Interpreter.scala @@ -139,7 +139,7 @@ object Interpreter { } if (!bloop.util.CrossPlatform.isWindows) - state.logger.info(bloop.util.Console.clearCommand) + state.logger.info("\u001b[H\u001b[2J") // Force the first execution before relying on the file watching task fg(state).flatMap(newState => watcher.watch(newState, fg)) diff --git a/frontend/src/main/scala/bloop/io/SourceWatcher.scala b/frontend/src/main/scala/bloop/io/SourceWatcher.scala index eeb46094d8..3838376d42 100644 --- a/frontend/src/main/scala/bloop/io/SourceWatcher.scala +++ b/frontend/src/main/scala/bloop/io/SourceWatcher.scala @@ -42,7 +42,7 @@ final class SourceWatcher private ( def runAction(state: State, events: Seq[DirectoryChangeEvent]): Task[State] = { // Windows is not supported for now if (!bloop.util.CrossPlatform.isWindows) - logger.info(bloop.util.Console.clearCommand) + logger.info("\u001b[H\u001b[2J") // Clean terminal before acting on the event action events.foreach(e => logger.debug(s"A ${e.eventType()} in ${e.path()} has triggered an event")) action(state) } diff --git a/frontend/src/main/scala/bloop/util/Console.scala b/frontend/src/main/scala/bloop/util/Console.scala deleted file mode 100644 index 55438fd1ea..0000000000 --- a/frontend/src/main/scala/bloop/util/Console.scala +++ /dev/null @@ -1,10 +0,0 @@ -package bloop.util - -object Console { - private val escape = "\u001b[" - private val cursorHome = "H" - private val eraseScreen = "2J" - private val eraseScrollbar = "3J" - - val clearCommand: String = escape + cursorHome + escape + eraseScreen + escape + eraseScrollbar -}