mirror of
https://github.com/lucaspalomodevelop/autom.git
synced 2026-03-12 23:27:21 +00:00
added sorted help output
This commit is contained in:
parent
7cec36d331
commit
243be8220d
@ -67,9 +67,11 @@ bool Command::isInCommands(std::string name)
|
||||
std::string Command::listCommands()
|
||||
{
|
||||
std::string list = "";
|
||||
for (auto const &command : commands)
|
||||
|
||||
|
||||
for (std::map<std::string, CommandInfo>::iterator it = commands.begin(); it != commands.end(); ++it)
|
||||
{
|
||||
list += "\t" + command.second.name + " " + command.second.description + "\n";
|
||||
list += "\t" + it->second.name + " " + it->second.description + "\n";
|
||||
}
|
||||
return list;
|
||||
}
|
||||
@ -36,10 +36,5 @@ void removeScript(int argc, char *argv[]);
|
||||
void showScript(int argc, char *argv[]);
|
||||
// help function for showing help message
|
||||
void help(int argc, char *argv[]);
|
||||
// void create(int argc,char *argv[]);
|
||||
// void remove(int argc,char *argv[]);
|
||||
// void list(int argc,char *argv[]);
|
||||
// void edit(int argc,char *argv[]);
|
||||
// void run(int argc,char *argv[]);
|
||||
|
||||
#endif // MAIN_H
|
||||
Loading…
x
Reference in New Issue
Block a user