unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <bremner@debian.org>
To: notmuch@notmuchmail.org
Cc: David Bremner <bremner@debian.org>
Subject: [PATCH 3/3] notmuch-dump.c: add a format option
Date: Wed, 30 Nov 2011 17:15:30 -0800	[thread overview]
Message-ID: <1322702130-26068-3-git-send-email-bremner@debian.org> (raw)
In-Reply-To: <1322702130-26068-1-git-send-email-bremner@debian.org>

Note that the option does not do anything yet.
---
 notmuch-dump.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/notmuch-dump.c b/notmuch-dump.c
index 8a8d6ec..2a6daef 100644
--- a/notmuch-dump.c
+++ b/notmuch-dump.c
@@ -43,10 +43,13 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[])
 	return 1;
 
     notmuch_opt_desc_t options[] = {
+	{ "format", 'f', NOTMUCH_OPT_KEYWORD,
+	  (notmuch_keyword_t []){ { "sup", 's' }, { "path", 'p' }, {0, 0} } },
 	{ 0, 0, 0, 0 }
     };
 
     notmuch_opt_t result;
+    int output_format='s';
     int opt_index;
     notmuch_bool_t more_args=TRUE;
 
@@ -55,6 +58,9 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[])
 	more_args=parse_argument (argv[0], argv[opt_index], options, &result);
 
 	switch (result.arg_id) {
+	case 'f':
+	    output_format=result.keyword_id;
+	    break;
 	case '?':
 	    return 1;
 	    break;
-- 
1.7.5.4

  parent reply	other threads:[~2011-12-01  1:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-13 22:47 [PATCH 0/6] cli getoptification Jani Nikula
2011-11-13 22:47 ` [PATCH 1/6] cli: notmuch new: use getopt_long for parsing command line options Jani Nikula
2011-11-13 22:47 ` [PATCH 2/6] cli: notmuch search: " Jani Nikula
2011-11-13 22:47 ` [PATCH 3/6] cli: notmuch show: " Jani Nikula
2011-11-13 22:47 ` [PATCH 4/6] cli: notmuch count: " Jani Nikula
2011-11-13 22:47 ` [PATCH 5/6] cli: notmuch reply: " Jani Nikula
2011-11-13 22:47 ` [PATCH 6/6] test: emacs-large-search-buffer: expected results according to getopt_long Jani Nikula
2011-12-01  1:15   ` [RFC PATCH 1/3] notmuch-opts.[ch]: new argument parsing framework for notmuch David Bremner
2011-12-01  1:15     ` [PATCH 2/3] notmuch-dump: convert to notmuch-opts option-parsing David Bremner
2011-12-01  1:15     ` David Bremner [this message]
2011-12-02  6:41       ` [RFC Patch v2 1/3] notmuch-opts.[ch]: new argument parsing framework for notmuch David Bremner
2011-12-02  6:41         ` [RFC Patch v2 2/3] notmuch-dump: convert to notmuch-opts argument handling David Bremner
2011-12-02  6:41         ` [RFC Patch v2 3/3] notmuch-dump: add --format option David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1322702130-26068-3-git-send-email-bremner@debian.org \
    --to=bremner@debian.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).