Re: [PATCH 1/2] cli: fix top level --help combined with other options

Subject: Re: [PATCH 1/2] cli: fix top level --help combined with other options

Date: Mon, 09 Mar 2015 08:06:49 +0100

To: Jani Nikula, notmuch@notmuchmail.org

Cc:

From: David Bremner


Jani Nikula <jani@nikula.org> writes:

> -	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;
>      }

LGTM

Thread: