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 3E29A431FB6 for ; Tue, 10 Mar 2015 01:06:55 -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 zXuPIHroN7Es for ; Tue, 10 Mar 2015 01:06:52 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 898FE431FAF for ; Tue, 10 Mar 2015 01:06:52 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id ADF73100033; Tue, 10 Mar 2015 10:06:27 +0200 (EET) From: Tomi Ollila To: David Bremner , Jani Nikula , notmuch@notmuchmail.org Subject: Re: [PATCH 2/2] cli: add support for notmuch command --help In-Reply-To: <87bnk2tzg6.fsf@maritornes.cs.unb.ca> References: <1425831535-15920-1-git-send-email-jani@nikula.org> <1425831535-15920-2-git-send-email-jani@nikula.org> <87bnk2tzg6.fsf@maritornes.cs.unb.ca> User-Agent: Notmuch/0.19+53~gb45d2f9 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'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: Tue, 10 Mar 2015 08:06:55 -0000 On Mon, Mar 09 2015, David Bremner wrote: > 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 This part above I agree :D > that you once proposed a more sophisticated way of handling shared > arguments for subcommands, but that foundered on a reef of bikeshedding. > > d Tomi