From: David Bremner Date: Mon, 9 Mar 2015 07:06:49 +0000 (+0100) Subject: Re: [PATCH 1/2] cli: fix top level --help combined with other options X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8280b35d50df0840e065ff22cfe53abe4941beb2;p=notmuch-archives.git Re: [PATCH 1/2] cli: fix top level --help combined with other options --- diff --git a/c3/6baa814f792cc512a0cb3d0966eedb61f96252 b/c3/6baa814f792cc512a0cb3d0966eedb61f96252 new file mode 100644 index 000000000..f2fc7f639 --- /dev/null +++ b/c3/6baa814f792cc512a0cb3d0966eedb61f96252 @@ -0,0 +1,66 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 3FD1C431FBD + for ; Mon, 9 Mar 2015 00:09:06 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 2.438 +X-Spam-Level: ** +X-Spam-Status: No, score=2.438 tagged_above=-999 required=5 + tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id wt-CCrjYCHIn for ; + Mon, 9 Mar 2015 00:09:03 -0700 (PDT) +Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net + [87.98.215.224]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 41772431FBC + for ; Mon, 9 Mar 2015 00:09:03 -0700 (PDT) +Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim + 4.80) (envelope-from ) + id 1YUrmI-0002jg-96; Mon, 09 Mar 2015 07:07:02 +0000 +Received: (nullmailer pid 6159 invoked by uid 1000); Mon, 09 Mar 2015 + 07:06:49 -0000 +From: David Bremner +To: Jani Nikula , notmuch@notmuchmail.org +Subject: Re: [PATCH 1/2] cli: fix top level --help combined with other options +In-Reply-To: <1425831535-15920-1-git-send-email-jani@nikula.org> +References: <1425831535-15920-1-git-send-email-jani@nikula.org> +User-Agent: Notmuch/0.19+67~gdbe9924 (http://notmuchmail.org) Emacs/24.4.1 + (x86_64-pc-linux-gnu) +Date: Mon, 09 Mar 2015 08:06:49 +0100 +Message-ID: <87egoytzsm.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 09 Mar 2015 07:09:06 -0000 + +Jani Nikula 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