* add skipping support to mu-find

This commit is contained in:
djcb
2012-12-17 22:30:07 +02:00
parent 76adc694c0
commit 3353e32c28
4 changed files with 11 additions and 10 deletions

View File

@ -127,8 +127,8 @@ run_query (MuQuery *xapian, const gchar *query, MuConfig *opts, GError **err)
qflags |= MU_QUERY_FLAG_THREADS;
if (opts->reverse)
qflags |= MU_QUERY_FLAG_DESCENDING;
if (opts->no_msgid_dups)
qflags |= MU_QUERY_FLAG_SKIP_MSGID_DUPS;
if (opts->no_dups)
qflags |= MU_QUERY_FLAG_SKIP_DUPS;
iter = mu_query_run (xapian, query, sortid, -1, qflags, err);
return iter;

View File

@ -213,10 +213,10 @@ config_options_group_find (void)
"use a bookmarked query", "<bookmark>"},
{"reverse", 'z', 0, G_OPTION_ARG_NONE, &MU_CONFIG.reverse,
"sort in reverse (descending) order (z -> a)", NULL},
{"no-msgid-dups", 'u', 0, G_OPTION_ARG_NONE,
&MU_CONFIG.no_msgid_dups,
"only show the first of multiple messages with the same "
"message-id (false)", NULL},
{"no-dups", 'u', 0, G_OPTION_ARG_NONE,
&MU_CONFIG.no_dups,
"show only the first of multiple messages duplicates (false)",
NULL},
{"linksdir", 0, 0, G_OPTION_ARG_STRING, &MU_CONFIG.linksdir,
"output as symbolic links to a target maildir", "<dir>"},
{"clearlinks", 0, 0, G_OPTION_ARG_NONE, &MU_CONFIG.clearlinks,

View File

@ -139,7 +139,7 @@ struct _MuConfig {
gchar *exec; /* command to execute on the
* files for the matched
* messages */
gboolean no_msgid_dups; /* if there are multiple
gboolean no_dups; /* if there are multiple
* messages with the same
* msgid, show only the first
* one */