From: Mark Walters <markwalters1009@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 0/2] cli: Parsing. Add option NOTMUCH_OPT_INT_OR_BOOLEAN
Date: Thu, 8 Mar 2012 22:15:42 +0000 [thread overview]
Message-ID: <1331244944-7960-1-git-send-email-markwalters1009@gmail.com> (raw)
The first patch adds a new command line parsing option
NOTMUCH_OPT_INT_OR_BOOLEAN for command line parsing which accepts
--verbose=3 and --verbose with the latter setting verbose to 1. It
also allows --verbose=0 so (with a little caller support) the user can
turn off boolean options.
It also means that extra options can be added to the command line
programs in a backwards compatible manner (e.g. if --verbose already
exists we could add --verbose=2).
The second patch uses this to make the --entire-thread option to
notmuch-show a NOTMUCH_OPT_INT_OR_BOOLEAN. In particular this allows
the caller to disable --entire-thread (with --entire-thread=0) when
format=json.
Best wishes
Mark
Mark Walters (2):
cli: Parsing. Add option NOTMUCH_OPT_INT_OR_BOOLEAN
cli: make --entire-thread option notmuch-show.c INT_OR_BOOLEAN
command-line-arguments.c | 29 +++++++++++++++++++++++++++--
command-line-arguments.h | 3 +++
notmuch-show.c | 10 ++++++++--
3 files changed, 38 insertions(+), 4 deletions(-)
--
1.7.9.1
next reply other threads:[~2012-03-08 22:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-08 22:15 Mark Walters [this message]
2012-03-08 22:15 ` [PATCH 1/2] cli: Parsing. Add option NOTMUCH_OPT_INT_OR_BOOLEAN Mark Walters
2012-03-08 22:15 ` [PATCH 2/2] cli: make --entire-thread option notmuch-show.c INT_OR_BOOLEAN Mark Walters
2012-03-09 0:48 ` [PATCH 0/2] cli: Parsing. Add option NOTMUCH_OPT_INT_OR_BOOLEAN Jani Nikula
2012-03-09 5:11 ` Mark Walters
2012-03-09 22:33 ` [PATCH 0/3] argument parsing additions Jani Nikula
2012-03-09 22:33 ` [PATCH 1/3] command-line-arguments: allow true and false keywords for booleans Jani Nikula
2012-03-09 22:33 ` [PATCH 2/3] command-line-arguments: support keyword arguments with default value Jani Nikula
2012-03-09 22:33 ` [PATCH 3/3] cli: allow switching off entire thread mode in notmuch show json format Jani Nikula
2012-03-10 11:23 ` [PATCH 0/3] argument parsing additions Mark Walters
2012-03-11 19:26 ` Jani Nikula
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=1331244944-7960-1-git-send-email-markwalters1009@gmail.com \
--to=markwalters1009@gmail.com \
--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).