diff options
| author | Tristan Riehs <tristan.riehs@inria.fr> | 2025-11-21 17:20:03 +0100 |
|---|---|---|
| committer | Tristan Riehs <tristan.riehs@inria.fr> | 2025-11-21 17:20:03 +0100 |
| commit | bcc7bc9baf46ca0a27703865daff729dd7f51363 (patch) | |
| tree | bf6eaed72a8c3f30c8fcb08dacc993d2e8288c75 /src | |
| parent | 244e3eb9da3b1ca56185ffd108ca6eb56c112f0d (diff) | |
Add a bunch of to dos
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -19,6 +19,9 @@ 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 @@ -596,6 +599,7 @@ static void ftag_tag(int argc, char **argv) const struct ftag_command tag_commands[] = { {.name = "add", .func = ftag_tag_add}, {.name = "list", .func = ftag_tag_list} + /* TODO: add an alias command */ }; int tag_command_count = sizeof(tag_commands) / sizeof(struct ftag_command); parse_args(argc, argv, tag_commands, tag_command_count); @@ -632,6 +636,11 @@ int main(int argc, char *argv[]) {.name = "help", .func = ftag_help}, {.name = "query", .func = ftag_query}, {.name = "tag", .func = ftag_tag} + /* TODO: add an export command For instance, "ftag export + ARCHIVE" exports files read on stdin to ARCHIVE.tar.gz or + ARCHIVE.zip. Typical usag would be "ftag query -t TAG0 -t TAG1 + | ftag export ARCHIVE". Maybe adding a "-e" (for "export") + option to ftag query is better.*/ }; const int toplevel_command_count = sizeof(toplevel_commands) / sizeof(struct ftag_command); parse_args(argc-1, argv+1, toplevel_commands, toplevel_command_count); |
