From aa75ecf7055db669bf77af69d37758b7bff40ab6 Mon Sep 17 00:00:00 2001 From: softprops Date: Sun, 1 Aug 2010 16:27:18 +0800 Subject: [PATCH] show asterisk next to currentProject in output of ShowProjectsAction --- sbt/src/main/scala/sbt/Main.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbt/src/main/scala/sbt/Main.scala b/sbt/src/main/scala/sbt/Main.scala index 6287c019a2..fe01b66deb 100755 --- a/sbt/src/main/scala/sbt/Main.scala +++ b/sbt/src/main/scala/sbt/Main.scala @@ -427,7 +427,7 @@ class xMain extends xsbti.AppMain action match { case HelpAction => displayHelp(isInteractive); true - case ShowProjectsAction => baseProject.projectClosure.foreach(listProject); true + case ShowProjectsAction => baseProject.projectClosure.foreach(listProject(_, currentProject)); true case ProjectConsoleAction => showResult(Run.projectConsole(currentProject), currentProject.log) case _ => @@ -476,7 +476,7 @@ class xMain extends xsbti.AppMain if(!isInteractive) printCmd(InteractiveCommand, "Enters the sbt interactive shell") } - private def listProject(p: Project) = printProject("\t", p) + private def listProject(p: Project, curr: Project) = printProject(if(p.name == curr.name) "\t* " else "\t ", p) private def printProject(prefix: String, p: Project): Unit = Console.println(prefix + p.name + " " + p.version)