From 8043109f7eeb2a48bf1e2404278d8bc4af9a5634 Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Sat, 27 Dec 2025 21:56:39 +0100 Subject: Add "ftag file help" command --- src/main.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index beb39c0..460894e 100644 --- a/src/main.c +++ b/src/main.c @@ -531,6 +531,16 @@ step4: sqlite3_close(db); } +static void ftag_file_help(int, char **) +{ + printf("Usage: ftag file COMMAND [ARG]...\n"); + printf("Available values for COMMAND:\n"); + printf(" add add files to the database\n"); + printf(" help print this help\n"); + printf(" list list files in the database\n"); + printf(" tag add tags to files\n"); +} + static void ftag_file_list(int argc, char **argv) { ftag_list_table("files", "full_name"); @@ -597,9 +607,10 @@ static void ftag_file(int argc, char **argv) { assert_db_exists(); const struct ftag_command file_commands[] = { - {.name = "add", .func = ftag_file_add}, + {.name = "add", .func = ftag_file_add}, + {.name = "help", .func = ftag_file_help}, {.name = "list", .func = ftag_file_list}, - {.name = "tag", .func = ftag_file_tag} + {.name = "tag", .func = ftag_file_tag} /* TODO: add help command */ }; const int file_command_count = sizeof(file_commands)/ sizeof(struct ftag_command); -- cgit v1.2.3