X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.c;h=a5b2877aee09243044b960d6b3b1f833fbf091af;hp=1717e8b3683c485e4652e37abc9886e13d2afa49;hb=2447f4c1192ac6a90fbddcce40008efb0b4a0ee6;hpb=c17e4fe62988edfe99af804c3d6321353d755e7f diff --git a/notmuch.c b/notmuch.c index 1717e8b3..a5b2877a 100644 --- a/notmuch.c +++ b/notmuch.c @@ -314,7 +314,9 @@ main (int argc, char *argv[]) goto DONE; } - if (print_help) { + /* Handle notmuch --help [command] and notmuch command --help. */ + if (print_help || + (opt_index + 1 < argc && strcmp (argv[opt_index + 1], "--help") == 0)) { /* * Pass the first positional argument as argv[1] so the help * command can give help for it. The help command ignores the