cli: fix top level --help combined with other options
authorJani Nikula <jani@nikula.org>
Sun, 8 Mar 2015 16:18:54 +0000 (18:18 +0200)
committerDavid Bremner <david@tethera.net>
Wed, 11 Mar 2015 07:07:41 +0000 (08:07 +0100)
commitc17e4fe62988edfe99af804c3d6321353d755e7f
tree80a83e7b0d94eeaaee57bd3c6c1471537d5f5de8
parentc883e632bf0a3692fa4ca7aa77604e0e60820295
cli: fix top level --help combined with other options

If the top level --help is combined with other options, help
fails. For example:

    $ notmuch --version --help

    Sorry, --help is not a known command. There's not much I can do to help.

Fix this by adjusting argc and argv appropriately. The help command
ignores argv[0] anyway, so we don't have to set it to "help".
notmuch.c