1 Return-Path: <bremner@tesseract.cs.unb.ca>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by arlo.cworth.org (Postfix) with ESMTP id 0D3B46DE0B36
\r
6 for <notmuch@notmuchmail.org>; Mon, 15 Jun 2015 08:47:52 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=0.191 tagged_above=-999 required=5 tests=[AWL=0.181,
\r
12 T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled
\r
13 Received: from arlo.cworth.org ([127.0.0.1])
\r
14 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id 0MzBInF0e3w1 for <notmuch@notmuchmail.org>;
\r
16 Mon, 15 Jun 2015 08:47:49 -0700 (PDT)
\r
17 Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net
\r
19 by arlo.cworth.org (Postfix) with ESMTPS id 8C29D6DE0924
\r
20 for <notmuch@notmuchmail.org>; Mon, 15 Jun 2015 08:47:49 -0700 (PDT)
\r
21 Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim
\r
22 4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)
\r
23 id 1Z4WbJ-0003P0-So; Mon, 15 Jun 2015 15:47:05 +0000
\r
24 Received: (nullmailer pid 17207 invoked by uid 1000); Mon, 15 Jun 2015
\r
26 From: David Bremner <david@tethera.net>
\r
27 To: notmuch@notmuchmail.org
\r
28 Subject: [PATCH] cli: enable notmuch --help command
\r
29 Date: Mon, 15 Jun 2015 17:46:44 +0200
\r
30 Message-Id: <1434383204-17152-1-git-send-email-david@tethera.net>
\r
31 X-Mailer: git-send-email 2.1.4
\r
32 X-BeenThere: notmuch@notmuchmail.org
\r
33 X-Mailman-Version: 2.1.18
\r
35 List-Id: "Use and development of the notmuch mail system."
\r
36 <notmuch.notmuchmail.org>
\r
37 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
38 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
39 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
40 List-Post: <mailto:notmuch@notmuchmail.org>
\r
41 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
42 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
44 X-List-Received-Date: Mon, 15 Jun 2015 15:47:52 -0000
\r
46 This functionality seems to have been undocumented, if it ever
\r
47 existed. Document it now.
\r
49 doc/man1/notmuch.rst | 4 +++-
\r
51 2 files changed, 5 insertions(+), 3 deletions(-)
\r
53 diff --git a/doc/man1/notmuch.rst b/doc/man1/notmuch.rst
\r
54 index ae0461a..87fb7bc 100644
\r
55 --- a/doc/man1/notmuch.rst
\r
56 +++ b/doc/man1/notmuch.rst
\r
57 @@ -39,8 +39,10 @@ OPTIONS
\r
59 Supported global options for ``notmuch`` include
\r
62 + ``--help`` [command-name]
\r
63 Print a synopsis of available commands and exit.
\r
64 + With an optional command name, show the man page
\r
65 + for that subcommand.
\r
68 Print the installed version of notmuch, and exit.
\r
69 diff --git a/notmuch.c b/notmuch.c
\r
70 index c528dce..9580c3f 100644
\r
73 @@ -381,11 +381,11 @@ main (int argc, char *argv[])
\r
77 - notmuch_process_shared_options (NULL);
\r
79 if (opt_index < argc)
\r
80 command_name = argv[opt_index];
\r
82 + notmuch_process_shared_options (command_name);
\r
84 command = find_command (command_name);
\r
86 fprintf (stderr, "Error: Unknown command '%s' (see \"notmuch help\")\n",
\r