X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=notmuch.c;h=c9b5c8b989df3a0033acfd4d576d8033a98d86ab;hb=6bd01e1b340f6a209dde64471bc9d7137511dada;hp=56f93a7c11b3eac8c089bba5aaf6d70ebe82ae81;hpb=a9f3ad4fcbaf1415ec40a82125dbf4064dbdc819;p=notmuch diff --git a/notmuch.c b/notmuch.c index 56f93a7c..c9b5c8b9 100644 --- a/notmuch.c +++ b/notmuch.c @@ -204,18 +204,30 @@ notmuch_help_command (unused (void *ctx), int argc, char *argv[]) argv[0]); return 1; } - + +/* Handle the case of "notmuch" being invoked with no command + * argument. For now we just call notmuch_setup_command, but we plan + * to be more clever about this in the future. + */ +static int +notmuch (void *ctx) +{ + return notmuch_setup_command (ctx, 0, NULL); +} + int main (int argc, char *argv[]) { - void *local = talloc_new (NULL); + void *local; command_t *command; unsigned int i; + local = talloc_new (NULL); + g_mime_init (0); if (argc == 1) - return notmuch_setup_command (local, 0, NULL); + return notmuch (local); for (i = 0; i < ARRAY_SIZE (commands); i++) { command = &commands[i];