This series combines the designated initializers for argument parsing from id:20170930213239.15392-1-j...@nikula.org and the argument parsing refactoring from id:cover.1505853159.git.j...@nikula.org.
Additionally patch 1 handles some const confusion in notmuch-insert before it becomes a problem in patch 2, and patches 5-7 add support for the .present field to opt desc discussed in id:87lgkvrhpa....@nikula.org. Some more tests are sprinkled here and there too. BR, Jani. Jani Nikula (15): cli: strip trailing "/" from the final maildir path in notmuch insert cli: use designated initializers for opt desc test: add boolean argument to arg-test test: add opt_inherit to arg-test cli: add .present field to opt desc to check if the arg was present test: expand argument parsing tests cli: use the arg parser .present feature to handle show --entire-thread 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: expand argument parsing sanity checks command-line-arguments.c | 174 ++++++++++++++++++++++++++---------------- command-line-arguments.h | 41 ++++------ notmuch-client.h | 2 +- notmuch-compact.c | 8 +- notmuch-count.c | 16 ++-- notmuch-dump.c | 14 ++-- notmuch-insert.c | 48 ++++++------ notmuch-new.c | 18 ++--- notmuch-reindex.c | 4 +- notmuch-reply.c | 12 +-- notmuch-restore.c | 14 ++-- notmuch-search.c | 46 +++++------ notmuch-show.c | 41 +++++----- notmuch-tag.c | 12 +-- notmuch.c | 22 +++--- test/T410-argument-parsing.sh | 53 ++++++++++++- test/arg-test.c | 56 +++++++++----- test/hex-xcode.c | 12 +-- test/random-corpus.c | 20 ++--- 19 files changed, 350 insertions(+), 263 deletions(-) -- 2.11.0 _______________________________________________ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch