Re: [PATCH 0/9] argument parsing fixes and improvements

Subject: Re: [PATCH 0/9] argument parsing fixes and improvements

Date: Thu, 21 Sep 2017 14:52:07 -0400

To: Jani Nikula

Cc: Notmuch Mail

From: Daniel Kahn Gillmor


On Thu 2017-09-21 20:07:30 +0300, Jani Nikula wrote:
> So I think I'd prefer either strict booleans where the default is one or
> the other, or an explicit tristate true|false|default. In your case,
> perhaps --try-decrypt=(true|false|database), where the default can be
> requested and clearly documented. And that's again not a bool, like
> notmuch search --exclude, but then neither is your proposed option. It
> has three options in reality, but you've hidden one.

being able to set a default in the database is definitely useful, rather
than having to find all the places that you (or some other tool) might
be invoking a notmuch indexing subcommand.

If you want to make it an explicit third variant as stated above, that's
fine, but then we don't get --no-try-decrypt from your series here,
which is itself a different kind of interface inconsistency. :/

I have plans for a few more boolean variables like this for indexing
that will store their defaults in the database.

Perhaps we should introduce a new tristate (true|false|database) type to
make that simpler to deal with internally, but could also implement
--no- prefixes?  If that was something you're interested in providing,
i'd be fine adjusting my patches to make use of it.

      --dkg
signature.asc (application/pgp-signature)
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: