From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id F2F636DE035A for ; Tue, 19 Sep 2017 13:39:39 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.037 X-Spam-Level: X-Spam-Status: No, score=0.037 tagged_above=-999 required=5 tests=[AWL=0.057, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled 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 rxpof263Pvzw for ; Tue, 19 Sep 2017 13:39:38 -0700 (PDT) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by arlo.cworth.org (Postfix) with ESMTPS id 8C7916DE012F for ; Tue, 19 Sep 2017 13:39:38 -0700 (PDT) Received: by mail-lf0-f65.google.com with SMTP id h80so384313lfe.1 for ; Tue, 19 Sep 2017 13:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=AGZJMcAbm3mqmZwp4WAc5j0Wlgszo5bniPBTHKrU53w=; b=T+qydP8qfWhKIjQIOnYjVrTgfVDKBlrkUW4tfCeAlnngMEu2ZtSKzPiiItfCdn7qyd SKg0zo8O2Q4C8ZgVOZNfdyVlOVRwih5sy7JruUu7IM0ogYzeQPa8BO/aHgPtM9twd1uq Qmls80kNLiEKpRMlloXB5v500DBHW4GdhsTMNjHDl7pXNfPlKNQu8aPUgdn+HFooPhnx NeMAevD75XOXnxcKVgu4xcjybbB7eqqjNTeXReh9kbPuCUHvs4I5BMcNn1DvFxF/obG4 Gb++Si93qu4LpipEABv4pDHVid+bu5KjKUCNOu3X77ikJVD14HLh+z6FRJPS0xMVDo0F fesg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AGZJMcAbm3mqmZwp4WAc5j0Wlgszo5bniPBTHKrU53w=; b=I6uFEFWNDBmjzbzvLUzk+U/OT/BzOaAzhXO/+PM2KPlDMYthmghijpz7IK4WAkxDnt NvbwzbBu/6gXAOK6WVusBEu/yWRW9ungRjl9rVQ/isvOTVEN+PyRLYq/PJdE2GYhqW2F gSxLyA01o28VyzSf7hIrLJpn1nD5cd/A3/fc1PiFWy1R724h3E5OxgvKQ8nMwzNE38o/ 5FIivN2QGPC6h1r29IUlFcDq16bT4AMu0nhf6cPpt3Bc32vgtSdykf02QYZzY3QLjXxk lb9WUNK0hdHfcQRpZBY4ElHcLQ7D3z1fbmo9Qvd9jPP7Hr4Qj2SAUHV04JfWXo3F7L9x gxmQ== X-Gm-Message-State: AHPjjUgHDe96+yfYqyB7KQ93eyVlwH8kBEzic8Qh6Gi9aCj61x4xHdlO aNhRy3HTQ6u+pAzCDJ5sDTD/5fbkhOo= X-Google-Smtp-Source: AOwi7QCDNoExTmEcNGXsVcqH7JzbGzAmPofb0Xl7g0hu9hnL6FpLrx5MzniMRmztym0eyrm7gJlAqw== X-Received: by 10.46.84.67 with SMTP id y3mr1239324ljd.74.1505853575599; Tue, 19 Sep 2017 13:39:35 -0700 (PDT) Received: from localhost (mobile-access-5d6a60-234.dhcp.inet.fi. [93.106.96.234]) by smtp.gmail.com with ESMTPSA id p17sm47984ljb.43.2017.09.19.13.39.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Sep 2017 13:39:32 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH 0/9] argument parsing fixes and improvements Date: Tue, 19 Sep 2017 23:39:20 +0300 Message-Id: X-Mailer: git-send-email 2.11.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 20:39:40 -0000 I had some other things in mind, but ended up with this prep series instead... The main thing is patch 6 adding --no-argument style negating arguments for boolean and keyword flag args. The rest is mostly just refactoring and tests to make that happen. BR, Jani. Jani Nikula (9): hex-xcode: use notmuch_bool_t for boolean arguments cli: use notmuch_bool_t for boolean argument in show cli: refactor boolean argument processing cli: change while to for in keyword argument processing cli: reduce indent in keyword argument processing cli: add support for --no- prefixed boolean and keyword flag arguments cli: use the negating boolean support for new and insert --no-hooks test: add boolean argument to arg-test test: expand argument parsing sanity checks command-line-arguments.c | 93 ++++++++++++++++++++++++++++--------------- notmuch-insert.c | 6 +-- notmuch-new.c | 8 ++-- notmuch-show.c | 2 +- test/T410-argument-parsing.sh | 40 ++++++++++++++++++- test/arg-test.c | 5 +++ test/hex-xcode.c | 2 +- 7 files changed, 113 insertions(+), 43 deletions(-) -- 2.11.0