From b391e6f7d9ca5644f7e55dee2dd4a79544ac91fb Mon Sep 17 00:00:00 2001 From: David Bremner Date: Mon, 9 Mar 2015 08:14:17 +0100 Subject: [PATCH] Re: [PATCH 2/2] cli: add support for notmuch command --help --- 81/4facde50c004b4b111dfdc404287aeb093e5f0 | 65 +++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 81/4facde50c004b4b111dfdc404287aeb093e5f0 diff --git a/81/4facde50c004b4b111dfdc404287aeb093e5f0 b/81/4facde50c004b4b111dfdc404287aeb093e5f0 new file mode 100644 index 000000000..f344d4e81 --- /dev/null +++ b/81/4facde50c004b4b111dfdc404287aeb093e5f0 @@ -0,0 +1,65 @@ +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 B3894431FBD + for ; Mon, 9 Mar 2015 00:16:22 -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 PSAGOoJ6Q7ZS for ; + Mon, 9 Mar 2015 00:16:19 -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 6892A431FBC + for ; Mon, 9 Mar 2015 00:16:19 -0700 (PDT) +Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim + 4.80) (envelope-from ) + id 1YUrtX-0002mp-4T; Mon, 09 Mar 2015 07:14:31 +0000 +Received: (nullmailer pid 8926 invoked by uid 1000); Mon, 09 Mar 2015 + 07:14:17 -0000 +From: David Bremner +To: Jani Nikula , notmuch@notmuchmail.org +Subject: Re: [PATCH 2/2] cli: add support for notmuch command --help +In-Reply-To: <1425831535-15920-2-git-send-email-jani@nikula.org> +References: <1425831535-15920-1-git-send-email-jani@nikula.org> + <1425831535-15920-2-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:14:17 +0100 +Message-ID: <87bnk2tzg6.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:16:22 -0000 + +Jani Nikula writes: + +> - 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)) { + +I like the feature, and I can live with the implementation. I'm reminded +that you once proposed a more sophisticated way of handling shared +arguments for subcommands, but that foundered on a reef of bikeshedding. + +d -- 2.26.2