[PATCH v2 0/2] cli: Allow true/false parameter for boolean
authorMark Walters <markwalters1009@gmail.com>
Sat, 10 Mar 2012 11:05:31 +0000 (11:05 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:22 +0000 (09:45 -0800)
5c/ad0dd77fd874b48b66de167cd88f01b2306eb7 [new file with mode: 0644]

diff --git a/5c/ad0dd77fd874b48b66de167cd88f01b2306eb7 b/5c/ad0dd77fd874b48b66de167cd88f01b2306eb7
new file mode 100644 (file)
index 0000000..ee309c6
--- /dev/null
@@ -0,0 +1,87 @@
+Return-Path: <markwalters1009@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 684CE431FBC\r
+       for <notmuch@notmuchmail.org>; Sat, 10 Mar 2012 03:05:42 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.7\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.7 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       FREEMAIL_REPLY=2.499, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id q4uGLC0YAS-Z for <notmuch@notmuchmail.org>;\r
+       Sat, 10 Mar 2012 03:05:42 -0800 (PST)\r
+Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com\r
+       [209.85.212.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id B4F7D431FAE\r
+       for <notmuch@notmuchmail.org>; Sat, 10 Mar 2012 03:05:41 -0800 (PST)\r
+Received: by wibhq7 with SMTP id hq7so1254475wib.2\r
+       for <notmuch@notmuchmail.org>; Sat, 10 Mar 2012 03:05:39 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer;\r
+       bh=vymqPDPaoLuJLVv6jQsK0eiId4rGrGAv16CUwaQ9YTY=;\r
+       b=yIuCIw13uKPUYRrdpmWa8dCHSfd+rG1eqs6zQUCZXtFPRs3kQg0D+Cec84S8StUHeU\r
+       cx0ZxGoYyeGLQYiIonhznOrM8oSFPt1Ip3+yJPz79bqHDAEsrNYEov6dhJIgUpAwMoYE\r
+       NmBPojz83XrkpfYPZbKts7xueIa1CNLL5Rowxeg2arnDAiVsqOb6mnt8mcj3NjIAuv1A\r
+       P2vYQQ82GR761jpnRNtVaNNJUK2eO+4sxaPmqk49ToWLzPiKf+rOUunAdKhXkWGfYFVj\r
+       rCTbTFS0C2uMcIwCBzrCMHbZ+xK7K8ZRhc6KmLAqVa0T+06M7Nnh9v6sHR91MBOaPQAU\r
+       FVwQ==\r
+Received: by 10.180.95.34 with SMTP id dh2mr12287588wib.15.1331377538984;\r
+       Sat, 10 Mar 2012 03:05:38 -0800 (PST)\r
+Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
+ [94.192.233.223])     by mx.google.com with ESMTPS id\r
+ be4sm24539449wib.8.2012.03.10.03.05.36        (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sat, 10 Mar 2012 03:05:37 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 0/2] cli: Allow true/false parameter for boolean  \r
+Date: Sat, 10 Mar 2012 11:05:31 +0000\r
+Message-Id: <1331377533-30262-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 10 Mar 2012 11:05:42 -0000\r
+\r
+Hi\r
+\r
+Here is a second version of a patch to allow parameters to boolean\r
+options on the command line. This version allows parameters\r
+(=true|false). My first version is at\r
+id:"1331244944-7960-1-git-send-email-markwalters1009@gmail.com". Jani\r
+posted an alternative version there. Jani's version and this one are\r
+quite similar: the key difference is that this version abuses a\r
+notmuch_bool_t by setting it to -1 (to indicate that the parser has\r
+not set this option). This makes the code simpler but is definitely an\r
+abuse. I will discuss this further in replies to Jani's series.\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+Mark Walters (2):\r
+  cli: Parsing. Allow true/false parameter for boolean options.\r
+  cli: make --entire-thread=false work for format=json.\r
+\r
+ command-line-arguments.c |   34 ++++++++++++++++++++++++++--------\r
+ notmuch-show.c           |   15 +++++++++++++--\r
+ 2 files changed, 39 insertions(+), 10 deletions(-)\r
+\r
+-- \r
+1.7.9.1\r
+\r