diff --git a/main/Act.scala b/main/Act.scala index 395990e1a..5de1c5b2c 100644 --- a/main/Act.scala +++ b/main/Act.scala @@ -10,6 +10,7 @@ package sbt import DefaultParsers._ import Types.idFun import java.net.URI + import CommandSupport.ShowCommand object Act { @@ -153,7 +154,7 @@ object Act scopedKeyParser(extracted) flatMap Aggregation.valueParser(state, structure, show) } } - def showParser = token( ("show" ~ Space) ^^^ true) ?? false + def showParser = token( (ShowCommand ~ Space) ^^^ true) ?? false def scopedKeyParser(state: State): Parser[ScopedKey[_]] = scopedKeyParser(Project extract state) def scopedKeyParser(extracted: Extracted): Parser[ScopedKey[_]] = { diff --git a/main/CommandSupport.scala b/main/CommandSupport.scala index 1cb57bb9e..077ff063d 100644 --- a/main/CommandSupport.scala +++ b/main/CommandSupport.scala @@ -38,6 +38,7 @@ object CommandSupport val TasksCommand = "tasks" val ProjectCommand = "project" val ProjectsCommand = "projects" + val ShowCommand = "show" val Exit = "exit" val Quit = "quit" @@ -49,6 +50,17 @@ EvalCommand + """ Evaluates the given Scala expression and prints the result and type. """ + def actHelp = Help(ShowCommand, (ShowCommand + " ", actBrief), actDetailed) + def actBrief = "Displays the result of evaluating the setting or task associated with 'key'." + def actDetailed = +ShowCommand + """ + + Displays the value of the specified setting. + +""" + ShowCommand + """ + + Evaluates the specified task and display the value returned by the task.""" + val LastCommand = "last" val LastGrepCommand = "last-grep" @@ -109,7 +121,7 @@ SetCommand + """ /** The command name to terminate the program.*/ val TerminateAction: String = Exit - def continuousBriefHelp = (ContinuousExecutePrefix + " ", "Executes the specified command whenever source files change.") + def continuousBriefHelp = (ContinuousExecutePrefix + " ", "Executes the specified command whenever source files change.") def tasksPreamble = """ This is a list of tasks defined for the current project. diff --git a/main/Main.scala b/main/Main.scala index 0f59601e0..aca7195bc 100644 --- a/main/Main.scala +++ b/main/Main.scala @@ -391,7 +391,7 @@ object BuiltinCommands for(id <- build.defined.keys.toSeq.sorted) log.info("\t" + prefix(id) + id) } - def act = Command.custom(Act.actParser) + def act = Command.custom(Act.actParser, actHelp :: Nil) def projects = Command.command(ProjectsCommand, projectsBrief, projectsDetailed ) { s => val extracted = Project extract s