From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 0MwpDJnjqF4bJwAA0tVLHw (envelope-from ) for ; Wed, 29 Apr 2020 02:16:57 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id kLhCC6HjqF4NIgAAB5/wlQ (envelope-from ) for ; Wed, 29 Apr 2020 02:17:05 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5B1B5943F41 for ; Wed, 29 Apr 2020 02:17:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 0C9BE6DE0F5E; Tue, 28 Apr 2020 19:17:00 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id okz5d8DBt_ZJ; Tue, 28 Apr 2020 19:16:59 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id AE6256DE0F96; Tue, 28 Apr 2020 19:16:56 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id CFCFD6DE0F96 for ; Tue, 28 Apr 2020 19:16:55 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id isBCLq4TUTg6 for ; Tue, 28 Apr 2020 19:16:54 -0700 (PDT) Received: from che.mayfirst.org (unknown [162.247.75.117]) by arlo.cworth.org (Postfix) with ESMTPS id 581926DE0F5E for ; Tue, 28 Apr 2020 19:16:54 -0700 (PDT) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1588126612; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=HB1qpEveFsiF4nNXKnhxsiDvsI/FUYT6rMdoPuaSDjU=; b=1yF4e0/UK+5/wuPPhFBc5TikkEjCY5Rl8b6vtLfshS1HvaQMPbhaIoqhG+N01qmxJhHCb oghsgfuV7cePVF3DQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1588126612; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=HB1qpEveFsiF4nNXKnhxsiDvsI/FUYT6rMdoPuaSDjU=; b=OOBiC8RaVx/8+3uK/oWUoV/jfyVgg+sdslpOj8e4j3Gug9FQkYCEDV4hXBrWutbFR+Liz mVhzHyanybAN95SED1m+I6HkRalFV2gKzViXEdozLipvRcPscf1SxF7jJZvn9fOXzbzTusK HefpWyxZqdyM25Kb7hRwm8caTrI0ptI/VSrk0YJWyqbwQG7jh/11yTzb4kPFywLyWwUCRK0 d6WXa9CJ11BhbnH6BbpMvCfl9AGqUv+7JrL+vRF/i1OSLyROJbJHfBcf6d6ZIrySFZdfK6m 95D8dq8WAvI7P6FZTWZFzmht89t+iF1N995aR7gnp2swpU+g7uN3xjoVSStg== Received: from fifthhorseman.net (unknown [108.58.6.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id CD413F9A5; Tue, 28 Apr 2020 22:16:49 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id AE49E2043E; Tue, 28 Apr 2020 22:16:40 -0400 (EDT) From: Daniel Kahn Gillmor To: Ciprian Dorin Craciun , Tomi Ollila Subject: Re: Inconsistencies in handling command flags: `--flag=value` different than `--flag value` In-Reply-To: References: <87imhk95oc.fsf@tethera.net> <87k120x0wh.fsf@fifthhorseman.net> Autocrypt: addr=dkg@fifthhorseman.net; prefer-encrypt=mutual; keydata= mDMEXEK/AhYJKwYBBAHaRw8BAQdAr/gSROcn+6m8ijTN0DV9AahoHGafy52RRkhCZVwxhEe0K0Rh bmllbCBLYWhuIEdpbGxtb3IgPGRrZ0BmaWZ0aGhvcnNlbWFuLm5ldD6ImQQTFggAQQIbAQULCQgH AgYVCgkICwIEFgIDAQIeAQIXgAIZARYhBMS8Lds4zOlkhevpwvIGkReQOOXGBQJd5Hw3BQkFpJWB AAoJEPIGkReQOOXGDYEA/j0ERjPxDleKMZ2LDcWc/3o5cLFwAVzBKQHppu0Be5IWAP0aeTnyEqlp RTE7M8zugwkhYeUYfYu0BjecDUMnYz6iDLgzBF3kewUWCSsGAQQB2kcPAQEHQK1IuW0GZmcrs2mx CYMl8IHse0tMF8cP7eBNXevrlx2ZiPUEGBYIACYCGwIWIQTEvC3bOMzpZIXr6cLyBpEXkDjlxgUC XeR7TwUJAiGl/gCBdiAEGRYIAB0WIQQsv6x2UaqQJzY+dXHEDyVUMvKBDwUCXeR7BQAKCRDEDyVU MvKBD7KmAQCHs+7588C4jto6fMje0Nu97zzoppjJM7lrGF2rVnbHvwD+MgmGUbHzPSUrTWnZBQDi /QM595bxNrBA4N1CiXhs2AMJEPIGkReQOOXGpp0BAM7YeBnt/UNvxJAGm4DidSfHU7RDMWe6Tgux HrH21cDkAQC9leNFXJsQ7F2ZniRPHa8CkictcQEKPL8VCWpfe8LbArg4BF3ke5wSCisGAQQBl1UB BQEBB0Cf+EiAXtntQMf51xpqb6uZ5O0eCLAZtkg0SXHjA1JlEwMBCAeIfgQYFggAJhYhBMS8Lds4 zOlkhevpwvIGkReQOOXGBQJd5HucAhsMBQkCIaVkAAoJEPIGkReQOOXGdYcBANYnW7VyL2CncKH1 iO4Zr0IwfdIv6rai1PUHL98pVi3cAP9tMh85CKGDa0Xi/fptQH41meollLW5tLb/bEWMuUNuBQ== Date: Tue, 28 Apr 2020 22:16:39 -0400 Message-ID: <87blnbvxx4.fsf@fifthhorseman.net> MIME-Version: 1.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: notmuch@notmuchmail.org Content-Type: multipart/mixed; boundary="===============4242324863051253289==" Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 X-Spam-Score: -2.01 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=fifthhorseman.net header.s=2019 header.b=1yF4e0/U; dkim=fail (body hash did not verify) header.d=fifthhorseman.net header.s=2019rsa header.b=OOBiC8Ra; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fifthhorseman.net (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Scan-Result: default: False [-2.01 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.46383985088948]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:c]; IP_REPUTATION_HAM(0.00)[asn: 27017(-0.18), country: US(-0.00), ip: 50.126.95.6(-0.46)]; DWL_DNSWL_FAIL(0.00)[50.126.95.6:server fail]; R_DKIM_REJECT(1.00)[fifthhorseman.net:s=2019,fifthhorseman.net:s=2019rsa]; MX_GOOD(-0.50)[cached: notmuchmail.org]; DKIM_TRACE(0.00)[fifthhorseman.net:-]; MAILLIST(-0.20)[mailman]; SIGNED_PGP(-2.00)[]; FREEMAIL_TO(0.00)[gmail.com,iki.fi]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~,4:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:27017, ipnet:50.126.64.0/18, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[dkg@fifthhorseman.net,notmuch-bounces@notmuchmail.org]; ARC_NA(0.00)[]; URIBL_BLOCKED(0.00)[notmuchmail.org:email,iki.fi:email]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.20)[multipart/mixed,multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[notmuch@notmuchmail.org]; HAS_LIST_UNSUB(-0.01)[]; DNSWL_BLOCKED(0.00)[50.126.95.6:from]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[fifthhorseman.net : SPF not aligned (relaxed),none] X-TUID: JqjzjQu+ytRo Content-Transfer-Encoding: 7bit --===============4242324863051253289== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain On Mon 2020-04-27 22:21:36 +0300, Ciprian Dorin Craciun wrote: > On Mon, Apr 27, 2020 at 9:21 PM Tomi Ollila wrote: >>> [dkg wrote:] >>> release, remove the suggestion to use a whitespace separator from the >>> documentation, and eventually phase it out entirely in some future >>> release. >> >> Alternatively we could check that next arg is (case-insensitively) >> (subset of) 'true', 'false', 'yes', 'no', '0', '1', 't', 'nil' >> (but not tpyoes of these ;) and in that case have that as an option >> value... > > This would be perhaps the best approach. However I don't think it > would solve the issues for integrators that would not see these > warnings in the logs, until it is too late. this looks really ugly to me, in that some legitimate queries (e.g. those that include terms like "true" or "1") might not be accessible, unless the user supplies --booloption=true instead of --booloption. I mean, these are all slightly idiosyncratic corner cases, but this particular corner case looks super ugly and hard to explain to me. i'm trying to imagine writing some example text that explains it for the man page, and it comes out horribly complex! If we can't explain it succinctly in the manpage, should we be implementing it? > Perhaps there could be an additional option (either on the command > line or in the configuration) that would apply "strict" checking, and > not letting any other form except `--argument=value`, including the > boolean flags, and failing loudly. > > I think this third option would enable much safer integrations. > > (BTW, this "strict" option could also apply to the parsing of the > search terms, which most of the time are under the control of the end > user.) I've spent many years helping to maintain GnuPG now, and i'm pretty wary of having contextually different modes of argument parsing and interacting/intersecting arguments. It also leads to some weird ambiguities: if --strict is supplied on the command line, then does it need to be first on the command line? or could parsing the command line turn out different if you tack on --strict at the end? Seems like we'd be injecting additional idiosyncracies to chase after the first. One final way we could normalize everything and make it less idiosyncratic, with shorter, simpler man pages: deprecate and then drop the --booloption/--no-booloption mechanisms, requiring --booloption=true or --booloption=false instead. Once they're dropped, allow whitespace between "--booloption true" and "--booloption false" just like every other type of option. in case it's not clear: I believe that "we have succinct and yet complete man pages" is a convenient shorthand for "have we made this command-line program behave in an understandable/usable way?" --dkg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQQsv6x2UaqQJzY+dXHEDyVUMvKBDwUCXqjjiAAKCRDEDyVUMvKB D55+AQCjlhPHKBCCKwGcl2DoG+l3yKuJ2pLVJ7yPVEXkmVKDjgEArZPv47RcaLYP TWpP6S2U1Q+tfN1VCcVqH/+J89q7lQM= =dlQC -----END PGP SIGNATURE----- --=-=-=-- --===============4242324863051253289== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============4242324863051253289==--