From e3046c688be7a28e7dcfbce5fa54074917fd9904 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 9 Mar 2010 16:03:58 -0800 Subject: [PATCH] Add is: as a synonym for tag: in search terms. I like the readability of this, it provides compatibility with people trained in this syntax by sup, and it even saves one character. --- lib/database.cc | 1 + notmuch.1 | 4 ++-- notmuch.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 88c85ed4..c91e97c1 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -147,6 +147,7 @@ prefix_t BOOLEAN_PREFIX_INTERNAL[] = { prefix_t BOOLEAN_PREFIX_EXTERNAL[] = { { "thread", "G" }, { "tag", "K" }, + { "is", "K" }, { "id", "Q" } }; diff --git a/notmuch.1 b/notmuch.1 index 2df320d8..e573749c 100644 --- a/notmuch.1 +++ b/notmuch.1 @@ -373,7 +373,7 @@ terms to match against specific portions of an email, (where attachment: - tag: + tag: (or is:) id: @@ -402,7 +402,7 @@ prefix can be used to search for specific filenames (or extensions) of attachments to email messages. For -.BR tag: , +.BR tag: " and " is: valid tag values include .BR inbox " and " unread by default for new messages added by diff --git a/notmuch.c b/notmuch.c index dca8d382..95f057ea 100644 --- a/notmuch.c +++ b/notmuch.c @@ -52,7 +52,7 @@ static const char search_terms_help[] = "\t\t\tto:\n" "\t\t\tsubject:\n" "\t\t\tattachment:\n" - "\t\t\ttag:\n" + "\t\t\ttag: (or is:)\n" "\t\t\tid:\n" "\t\t\tthread:\n" "\n" @@ -66,7 +66,7 @@ static const char search_terms_help[] = "\t\tthe subject of an email. Quoted phrases are supported when\n" "\t\tsearching with: subject:\"this is a phrase\".\n" "\n" - "\t\tFor tag:, valid tag values include \"inbox\" and \"unread\"\n" + "\t\tFor tag: and is:, valid tag values include \"inbox\" and \"unread\"\n" "\t\tby default for new messages added by \"notmuch new\" as well\n" "\t\tas any other tag values added manually with \"notmuch tag\".\n" "\n" -- 2.26.2