Re: [PATCH 1/3] cli: add support for --no- prefixed boolean and keyword flag arguments

Subject: Re: [PATCH 1/3] cli: add support for --no- prefixed boolean and keyword flag arguments

Date: Sat, 14 Oct 2017 23:21:47 +0300

To: William Casarin, notmuch@notmuchmail.org

Cc:

From: Jani Nikula


On Sat, 14 Oct 2017, William Casarin <jb55@jb55.com> wrote:
> Hey Jani,
>
> Patches look good so far, concept ack for sure.
>
>
> Jani Nikula <jani@nikula.org> writes:
>
>> For example, you can use --no-exclude instead of --exclude=false in
>> notmuch show. If we had keyword flag arguments with some flags
>> defaulting to on, say --include=tags in notmuch dump/restore, this
>> would allow --no-include=tags to switch that off while not affecting
>> other flags.
>
> I've been testing it a bit, I can't seem to make this work in this example:
>
>     ./notmuch count --no-exclude
>
> After some brief investigation it might be because count is using
> EXCLUDE_true(1) and EXCLUDE_false(0) which are not equal to
> NOTMUCH_EXCLUDE_TRUE(1) and NOTMUCH_EXCLUDE_FALSE(2), but I'm not sure.

*blush* I screwed those enums up. Here's a patch that takes care of both
issues id:20171014201836.4486-1-jani@nikula.org. It's independent of
this series.

BR,
Jani.


_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: