diff options
| -rw-r--r-- | src/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -19,9 +19,6 @@ struct ftag_command { /* Execute the command, eventually by parsing some options. FUNC may * shift ARGC and ARGV and call parse_args again. */ void (*func)(int argc, char **argv); - /* TODO: add help string - * This will allow dynamically generating the help message, - * maybe also add child ftag_commands */ }; /* Parse arguments using an array of available commands. ARGV[0] has to match @@ -409,6 +406,7 @@ static void ftag_file(int argc, char **argv) {.name = "add", .func = ftag_file_add}, {.name = "list", .func = ftag_file_list}, {.name = "tag", .func = ftag_file_tag} + /* TODO: add help command */ }; const int file_command_count = sizeof(file_commands)/ sizeof(struct ftag_command); parse_args(argc, argv, file_commands, file_command_count); @@ -416,7 +414,7 @@ static void ftag_file(int argc, char **argv) static void ftag_help(int, char **) { - printf("Usage: ftag COMMAND [COMMAND-ARG]...\n"); + printf("Usage: ftag COMMAND [ARG]...\n"); printf("Available values for COMMAND:\n"); printf(" init initialize the database\n"); printf(" file manage files\n"); @@ -620,6 +618,7 @@ static void ftag_tag(int argc, char **argv) {.name = "add", .func = ftag_tag_add}, {.name = "list", .func = ftag_tag_list} /* TODO: add an alias command */ + /* TODO: add help command */ }; int tag_command_count = sizeof(tag_commands) / sizeof(struct ftag_command); parse_args(argc, argv, tag_commands, tag_command_count); |
