RFC: add space as argument separator

2017-03-28 Thread David Bremner
I guess the main question here is whether we should support space as seperators for boolean arguments as well. I'm not really sure if it's possible to dissambiguate e.g. % notmuch show --decrypt false friends It's not clear if false is a search term or an argument to decrypt. Personally I

[rfc patch 1/2] cli: change api of parse_option

2017-03-28 Thread David Bremner
The idea is to allow it (in a future commit) advance to the next argv element to get a value --- command-line-arguments.c | 37 - command-line-arguments.h | 4 ++-- test/T690-command-line-args.sh | 11 +++ 3 files changed, 33 insertions(+),

[rfc patch 2/2] cli: add space seperator for keyword, string, and int arguments

2017-03-28 Thread David Bremner
Defer the complication of optional boolean arguments for later (never?). --- command-line-arguments.c | 11 +++ test/T690-command-line-args.sh | 40 +++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/command-line-arguments.c

fix for dump headers

2017-03-28 Thread David Bremner
When I added message properties to the dump output I messed up the copy-paste to add properties to the header. The fix is trivial, but I'm not sure if this means we should bump the format version (i.e. write #notmuch-dump:3) to denote the header can be relied upon. I guess it doesn't hurt to do

[PATCH 1/2] test: add known broken test for dump header

2017-03-28 Thread David Bremner
Apparently nobody uses the list of "what was included in the dump" --- test/T240-dump-restore.sh | 8 1 file changed, 8 insertions(+) diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh index 206c3ae1..f626a19e 100755 --- a/test/T240-dump-restore.sh +++

[PATCH 2/2] cli/dump: fix bug in dump header

2017-03-28 Thread David Bremner
Fix copy paste error. --- notmuch-dump.c| 2 +- test/T240-dump-restore.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/notmuch-dump.c b/notmuch-dump.c index 0cbcdc16..e451ac0c 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -84,7 +84,7 @@ print_dump_header