[PATCH 0/9] argument parsing fixes and improvements

Jani Nikula jani at nikula.org
Tue Sep 19 13:39:20 PDT 2017


I had some other things in mind, but ended up with this prep series
instead... The main thing is patch 6 adding --no-argument style negating
arguments for boolean and keyword flag args. The rest is mostly just
refactoring and tests to make that happen.

BR,
Jani.

Jani Nikula (9):
  hex-xcode: use notmuch_bool_t for boolean arguments
  cli: use notmuch_bool_t for boolean argument in show
  cli: refactor boolean argument processing
  cli: change while to for in keyword argument processing
  cli: reduce indent in keyword argument processing
  cli: add support for --no- prefixed boolean and keyword flag arguments
  cli: use the negating boolean support for new and insert --no-hooks
  test: add boolean argument to arg-test
  test: expand argument parsing sanity checks

 command-line-arguments.c      | 93 ++++++++++++++++++++++++++++---------------
 notmuch-insert.c              |  6 +--
 notmuch-new.c                 |  8 ++--
 notmuch-show.c                |  2 +-
 test/T410-argument-parsing.sh | 40 ++++++++++++++++++-
 test/arg-test.c               |  5 +++
 test/hex-xcode.c              |  2 +-
 7 files changed, 113 insertions(+), 43 deletions(-)

-- 
2.11.0



More information about the notmuch mailing list