Commands - help

- Help command now displays helper functions after the regular commands.
This commit is contained in:
Paul Beckingham 2011-05-28 14:11:04 -04:00
parent bd93126f4e
commit 4857269d12

View file

@ -68,11 +68,24 @@ int CmdHelp::execute (const std::string& command_line, std::string& output)
std::vector <std::string>::iterator name;
for (name = all.begin (); name != all.end (); ++name)
{
if ((*name)[0] != '_')
{
row = view.addRow ();
view.set (row, 1, context.commands[*name]->usage ());
view.set (row, 2, context.commands[*name]->description ());
}
}
for (name = all.begin (); name != all.end (); ++name)
{
if ((*name)[0] == '_')
{
row = view.addRow ();
view.set (row, 1, context.commands[*name]->usage ());
view.set (row, 2, context.commands[*name]->description ());
}
}
/*
row = view.addRow ();