5 #include "../Command.hpp"
13 _description =
"See a guide about each implemented command";
14 _usage =
"help <command?>";
22 bool filtering =
false;
26 res = std::string(
C_U) + std::string(
C_BOLD) + std::string(
C_GREEN) +
"Commands usage guide" + std::string(
C_X) +
"\n";
33 if (filtering && it->second->getName() != params[0])
35 res += std::string(
"Command: " + it->second->getName() +
36 "\n\t Description: " + it->second->getDescription() +
37 "\n\t Usage: " + it->second->getUsage() +
"\n\t Example:\n");
39 std::map<size_t, std::string> example(it->second->getExample());
40 std::map<size_t, std::string>::iterator it_ex = example.begin();
41 for (; it_ex != example.end(); it_ex++)
42 res += std::string(
"\t\t" + it_ex->second +
"\n");