Skip to content
This repository
Browse code

show asterisk next to currentProject in output of ShowProjectsAction

  • Loading branch information...
commit aa75ecf7055db669bf77af69d37758b7bff40ab6 1 parent 5e41a47
doug tangren authored August 01, 2010 harrah committed August 05, 2010

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  sbt/src/main/scala/sbt/Main.scala
4  sbt/src/main/scala/sbt/Main.scala
@@ -427,7 +427,7 @@ class xMain extends xsbti.AppMain
427 427
 		action match
428 428
 		{
429 429
 			case HelpAction => displayHelp(isInteractive); true
430  
-			case ShowProjectsAction => baseProject.projectClosure.foreach(listProject); true
  430
+			case ShowProjectsAction => baseProject.projectClosure.foreach(listProject(_, currentProject)); true
431 431
 			case ProjectConsoleAction =>
432 432
 				showResult(Run.projectConsole(currentProject), currentProject.log)
433 433
 			case _ =>
@@ -476,7 +476,7 @@ class xMain extends xsbti.AppMain
476 476
 		if(!isInteractive)
477 477
 			printCmd(InteractiveCommand, "Enters the sbt interactive shell")
478 478
 	}
479  
-	private def listProject(p: Project) = printProject("\t", p)
  479
+	private def listProject(p: Project, curr: Project) = printProject(if(p.name == curr.name) "\t* " else "\t  ", p)
480 480
 	private def printProject(prefix: String, p: Project): Unit =
481 481
 		Console.println(prefix + p.name + " " + p.version)
482 482
 

0 notes on commit aa75ecf

Please sign in to comment.
Something went wrong with that request. Please try again.