X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.c;h=1717e8b3683c485e4652e37abc9886e13d2afa49;hp=dcda0392a0945123f735399f72308c8653a3b1f4;hb=c17e4fe62988edfe99af804c3d6321353d755e7f;hpb=b3e7e7925efe573b7209cfd055dd881bdd2533ce diff --git a/notmuch.c b/notmuch.c index dcda0392..1717e8b3 100644 --- a/notmuch.c +++ b/notmuch.c @@ -54,6 +54,8 @@ static command_t commands[] = { "Add a new message into the maildir and notmuch database." }, { "search", notmuch_search_command, FALSE, "Search for messages matching the given search terms." }, + { "address", notmuch_address_command, FALSE, + "Get addresses from messages matching the given search terms." }, { "show", notmuch_show_command, FALSE, "Show all messages matching the search terms." }, { "count", notmuch_count_command, FALSE, @@ -313,7 +315,13 @@ main (int argc, char *argv[]) } if (print_help) { - ret = notmuch_help_command (NULL, argc - 1, &argv[1]); + /* + * Pass the first positional argument as argv[1] so the help + * command can give help for it. The help command ignores the + * argv[0] passed to it. + */ + ret = notmuch_help_command (NULL, argc - opt_index + 1, + argv + opt_index - 1); goto DONE; }