- Modified command usage help output.
This commit is contained in:
Paul Beckingham 2011-05-31 00:43:26 -04:00
parent 067f5920bb
commit 5d9fb1fff9
2 changed files with 4 additions and 1 deletions

View file

@ -56,6 +56,7 @@ int CmdHelp::execute (const std::string&, std::string& output)
int row = view.addRow (); int row = view.addRow ();
view.set (row, 0, "Usage:"); view.set (row, 0, "Usage:");
view.set (row, 1, "task"); view.set (row, 1, "task");
view.set (row, 2, "Runs rc.default.command, if specified.");
// Obsolete method of getting a list of all commands. // Obsolete method of getting a list of all commands.
std::vector <std::string> all; std::vector <std::string> all;
@ -66,6 +67,7 @@ int CmdHelp::execute (const std::string&, std::string& output)
// Sort alphabetically by usage. // Sort alphabetically by usage.
std::sort (all.begin (), all.end ()); std::sort (all.begin (), all.end ());
// Add the regular commands.
std::vector <std::string>::iterator name; std::vector <std::string>::iterator name;
for (name = all.begin (); name != all.end (); ++name) for (name = all.begin (); name != all.end (); ++name)
{ {
@ -77,6 +79,7 @@ int CmdHelp::execute (const std::string&, std::string& output)
} }
} }
// Add the helper commands.
for (name = all.begin (); name != all.end (); ++name) for (name = all.begin (); name != all.end (); ++name)
{ {
if ((*name)[0] == '_') if ((*name)[0] == '_')

View file

@ -35,7 +35,7 @@ extern Context context;
CmdQuery::CmdQuery () CmdQuery::CmdQuery ()
{ {
_keyword = "_query"; _keyword = "_query";
_usage = "task _query <external command>"; _usage = "task _query [<filter>]";
_description = "Executes external commands and scripts"; _description = "Executes external commands and scripts";
_read_only = true; _read_only = true;
_displays_id = true; _displays_id = true;