help message changes

This commit is contained in:
Mark Harrah
2012-04-07 18:10:23 -04:00
parent 585a62bf5e
commit 2ba5e0a363
2 changed files with 26 additions and 7 deletions
+22 -6
View File
@@ -126,15 +126,21 @@ It does not list the scopes the %<s are defined in; use the 'inspect' command fo
def settingsBrief(label: String) = (label, "Displays the " + label + " defined for the current project.") def settingsBrief(label: String) = (label, "Displays the " + label + " defined for the current project.")
def settingsDetailed(label: String) = def settingsDetailed(label: String) =
"""%s [-(v|vv|...|V)] [filter] """
Syntax summary
%s [-(v|-vv|...|-V)] [<filter>]
Displays the %<s defined directly or indirectly for the current project. %<s
Additional %<s may be displayed by providing -v, -vv, ... or providing Displays the main %<s defined directly or indirectly for the current project.
-V to display all %<s.
A filter may be given to restrict the %<s shown. The names of %<s are searched for an exact match against the filter, in which case only the description of the exact match is displayed. Otherwise, the filter is interpreted as a regular expression and all %<s whose name or description match the regular expression are displayed. -v
Displays additional tasks. More 'v's increase the number of tasks displayed.
Note that this is an additional filter on top of the %<s selected by the -v style switches, so you must specify -V to search all tasks. Use the %s command to search all commands, tasks, and settings at once. -V
displays all %<s
<filter>
Restricts the %<s that are displayed. The names of %<s are searched for an exact match against the filter, in which case only the description of the exact match is displayed. Otherwise, the filter is interpreted as a regular expression and all %<s whose name or description match the regular expression are displayed. Note that this is an additional filter on top of the %<s selected by the -v style switches, so you must specify -V to search all %<s. Use the %s command to search all commands, tasks, and settings at once.
""".format(label, BasicCommandStrings.HelpCommand) """.format(label, BasicCommandStrings.HelpCommand)
def moreAvailableMessage(label: String, search: Boolean) = def moreAvailableMessage(label: String, search: Boolean) =
@@ -155,6 +161,16 @@ ProjectCommand +
Changes to the project with the provided name. Changes to the project with the provided name.
This command fails if there is no project with the given name. This command fails if there is no project with the given name.
""" + ProjectCommand + """ {uri}
Changes to the root project in the build defined by `uri`.
`uri` must have already been declared as part of the build, such as with Project.dependsOn.
""" + ProjectCommand + """ {uri}name
Changes to the project `name` in the build defined by `uri`.
`uri` must have already been declared as part of the build, such as with Project.dependsOn.
""" + ProjectCommand + """ / """ + ProjectCommand + """ /
Changes to the initial project. Changes to the initial project.
+4 -1
View File
@@ -45,7 +45,10 @@ object CommandUtil
case Some(exactDetail) =>exactDetail case Some(exactDetail) =>exactDetail
case None => case None =>
val details = searchHelp(selected, detailMap) val details = searchHelp(selected, detailMap)
if(details.isEmpty) "No matches for regular expression '" + selected + "'." else layoutDetails(details) if(details.isEmpty)
"No matches for regular expression '" + selected + "'."
else
layoutDetails(details)
} }
def searchHelp(selected: String, detailMap: Map[String, String]): Map[String, String] = def searchHelp(selected: String, detailMap: Map[String, String]): Map[String, String] =
{ {