Help
- Modified command usage help output.
This commit is contained in:
@@ -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] == '_')
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user