Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A28AA41ED85 for ; Thu, 30 Jun 2011 01:20:37 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Bf5RPaSmM4yH for ; Thu, 30 Jun 2011 01:20:37 -0700 (PDT) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 0F9AD41ED86 for ; Thu, 30 Jun 2011 01:20:36 -0700 (PDT) Received: by wwj40 with SMTP id 40so1626089wwj.2 for ; Thu, 30 Jun 2011 01:20:35 -0700 (PDT) Received: by 10.217.5.130 with SMTP id w2mr2375278wes.61.1309422035524; Thu, 30 Jun 2011 01:20:35 -0700 (PDT) Received: from localhost ([109.131.21.173]) by mx.google.com with ESMTPS id fi5sm1447823wbb.22.2011.06.30.01.20.33 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 30 Jun 2011 01:20:34 -0700 (PDT) From: Pieter Praet To: notmuch@notmuchmail.org Subject: [PATCH] add `tag:' prefix to `--output=tags' results Date: Thu, 30 Jun 2011 10:20:29 +0200 Message-Id: <1309422029-22924-1-git-send-email-pieter@praet.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <877hbiep5g.fsf@SSpaeth.de> References: <877hbiep5g.fsf@SSpaeth.de> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Thu, 30 Jun 2011 08:20:37 -0000 Alter `do_search_tags()' to prepend each result with `tag:', and update affected test. This makes its output consistent with `do_search_threads()' and `do_search_messages()'. See this discussion: id:"871v6b79s0.fsf@yoom.home.cworth.org" Signed-off-by: Pieter Praet --- notmuch-search.c | 2 +- test/search-output | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index faccaf7..5b91a40 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -364,7 +364,7 @@ do_search_tags (notmuch_database_t *notmuch, if (! first_tag) fputs (format->item_sep, stdout); - format->item_id (tags, "", tag); + format->item_id (tags, "tag:", tag); first_tag = 0; } diff --git a/test/search-output b/test/search-output index 10291c3..37f1b3d 100755 --- a/test/search-output +++ b/test/search-output @@ -289,10 +289,10 @@ test_expect_equal_file OUTPUT EXPECTED test_begin_subtest "--output=tags" notmuch search --output=tags '*' >OUTPUT cat <EXPECTED -attachment -inbox -signed -unread +tag:attachment +tag:inbox +tag:signed +tag:unread EOF test_expect_equal_file OUTPUT EXPECTED -- 1.7.4.1