aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.c15
1 files changed, 13 insertions, 2 deletions
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);