aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Riehs <tristan.riehs@inria.fr>2025-11-21 17:20:03 +0100
committerTristan Riehs <tristan.riehs@inria.fr>2025-11-21 17:20:03 +0100
commitbcc7bc9baf46ca0a27703865daff729dd7f51363 (patch)
treebf6eaed72a8c3f30c8fcb08dacc993d2e8288c75
parent244e3eb9da3b1ca56185ffd108ca6eb56c112f0d (diff)
Add a bunch of to dos
-rw-r--r--src/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index a69b4bb..1fdb506 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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);