@@ -1,4 +1,5 @@
#include "../include/commands.hpp"
+#include <cstdio>
CMD commands[]{
{CMD_HELP, "help", "show help"},
@@ -43,5 +44,7 @@ const char *getCmdStringFromId(COMMANDID id) {
}
void printCmds(void) {
- // TODO
+ for(CMD command : commands) {
+ printf("%-12s - %s\n", command.name, command.desc);
+ }
@@ -316,10 +316,7 @@ void UserIoManager::run() {
case CMD_HELP: {
std::printf("\n");
std::printf("AVAILABLE COMMANDS are:\n");
- printCmds(); // TODO: implement to have put and get in here
- std::printf("help - shows this help\n");
- std::printf("status - asks the server for status\n");
- std::printf("disconnect - closes the connection to the server\n");
+ printCmds();
break;