From d2a18e267c5d8908377d5a73172bd4313edc4891 Mon Sep 17 00:00:00 2001 From: Jeffas Date: Fri, 20 Sep 2019 17:26:17 +0100 Subject: Change search flags This changes the search flags for maildir and imap backends. They now no longer use -t for searching all text. This seems to make more sense as being the targeted recipient. I have similarly added Cc for -c. The text search now resides under -a for all text. --- worker/maildir/search.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'worker/maildir') diff --git a/worker/maildir/search.go b/worker/maildir/search.go index f8130ac..47eab6a 100644 --- a/worker/maildir/search.go +++ b/worker/maildir/search.go @@ -29,7 +29,7 @@ func newSearchCriteria() *searchCriteria { func parseSearch(args []string) (*searchCriteria, error) { criteria := newSearchCriteria() - opts, optind, err := getopt.Getopts(args, "rubtH:f:") + opts, optind, err := getopt.Getopts(args, "rubat:H:f:c:") if err != nil { return nil, err } @@ -45,9 +45,13 @@ func parseSearch(args []string) (*searchCriteria, error) { // TODO case 'f': criteria.Header.Add("From", opt.Value) + case 't': + criteria.Header.Add("To", opt.Value) + case 'c': + criteria.Header.Add("Cc", opt.Value) case 'b': body = true - case 't': + case 'a': text = true } } -- cgit v1.2.3