From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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