unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/2] cli: Parsing. Add option NOTMUCH_OPT_INT_OR_BOOLEAN
@ 2012-03-08 22:15 Mark Walters
  2012-03-08 22:15 ` [PATCH 1/2] " Mark Walters
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Mark Walters @ 2012-03-08 22:15 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-03-11 19:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-08 22:15 [PATCH 0/2] cli: Parsing. Add option NOTMUCH_OPT_INT_OR_BOOLEAN Mark Walters
2012-03-08 22:15 ` [PATCH 1/2] " 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

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).