From de22b577cd127d46308f3c826aba19585eaa1eb9 Mon Sep 17 00:00:00 2001 From: Tobias Roeser Date: Fri, 13 Sep 2019 09:15:37 +0200 Subject: print count of dirs and files when in watch mode --- main/src/main/MainRunner.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/src/main/MainRunner.scala b/main/src/main/MainRunner.scala index 7c9d944b..6b091ac7 100644 --- a/main/src/main/MainRunner.scala +++ b/main/src/main/MainRunner.scala @@ -35,7 +35,8 @@ class MainRunner(val config: ammonite.main.Cli.Config, var stateCache = stateCache0 override def watchAndWait(watched: Seq[(os.Path, Long)]) = { - printInfo(s"Watching for changes to ${watched.length} files... (Ctrl-C to exit)") + val dirCount = watched.count(f => os.isDir(f._1)) + printInfo(s"Watching for changes to ${dirCount} dirs and ${watched.length - dirCount} files... (Ctrl-C to exit)") def statAll() = watched.forall{ case (file, lastMTime) => Interpreter.pathSignature(file) == lastMTime } -- cgit v1.2.3