From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Jani Nikula <jani@nikula.org>
Cc: Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH 0/9] argument parsing fixes and improvements
Date: Thu, 21 Sep 2017 14:52:07 -0400 [thread overview]
Message-ID: <87h8vv3mw8.fsf@fifthhorseman.net> (raw)
In-Reply-To: <87k20st1yl.fsf@nikula.org>
[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-09-21 20:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 20:39 [PATCH 0/9] argument parsing fixes and improvements Jani Nikula
2017-09-19 20:39 ` [PATCH 1/9] hex-xcode: use notmuch_bool_t for boolean arguments Jani Nikula
2017-09-19 20:39 ` [PATCH 2/9] cli: use notmuch_bool_t for boolean argument in show Jani Nikula
2017-09-19 20:39 ` [PATCH 3/9] cli: refactor boolean argument processing Jani Nikula
2017-09-19 20:39 ` [PATCH 4/9] cli: change while to for in keyword " Jani Nikula
2017-09-19 20:39 ` [PATCH 5/9] cli: reduce indent " Jani Nikula
2017-09-19 20:39 ` [PATCH 6/9] cli: add support for --no- prefixed boolean and keyword flag arguments Jani Nikula
2017-09-19 20:39 ` [PATCH 7/9] cli: use the negating boolean support for new and insert --no-hooks Jani Nikula
2017-09-19 20:39 ` [PATCH 8/9] test: add boolean argument to arg-test Jani Nikula
2017-09-19 20:39 ` [PATCH 9/9] test: expand argument parsing sanity checks Jani Nikula
2017-09-19 21:43 ` [PATCH 0/9] argument parsing fixes and improvements Daniel Kahn Gillmor
2017-09-20 9:16 ` Jani Nikula
2017-09-20 13:21 ` Daniel Kahn Gillmor
2017-09-21 17:07 ` Jani Nikula
2017-09-21 18:52 ` Daniel Kahn Gillmor [this message]
2017-09-25 11:34 ` David Bremner
2017-09-25 13:02 ` Daniel Kahn Gillmor
2017-09-25 20:57 ` David Bremner
2017-09-30 9:40 ` Jani Nikula
2017-09-30 21:37 ` Jani Nikula
2017-10-01 11:11 ` David Bremner
2017-10-01 20:57 ` Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h8vv3mw8.fsf@fifthhorseman.net \
--to=dkg@fifthhorseman.net \
--cc=jani@nikula.org \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).