Added maxnum argument to mu find.
This commit is contained in:
@ -598,6 +598,8 @@ output_query_results (MuMsgIter *iter, MuConfig *opts, GError **err)
|
||||
|
||||
MuMsg *msg;
|
||||
|
||||
if (opts->maxnum > 0 && count == opts->maxnum)
|
||||
break;
|
||||
msg = get_message (iter, opts->after);
|
||||
if (!msg)
|
||||
break;
|
||||
|
||||
@ -205,6 +205,8 @@ config_options_group_find (void)
|
||||
{"sortfield", 's', 0, G_OPTION_ARG_STRING,
|
||||
&MU_CONFIG.sortfield,
|
||||
"field to sort on", "<field>"},
|
||||
{"maxnum", 'n', 0, G_OPTION_ARG_INT, &MU_CONFIG.maxnum,
|
||||
"number of entries to display in the output", "<number>"},
|
||||
{"threads", 't', 0, G_OPTION_ARG_NONE, &MU_CONFIG.threads,
|
||||
"show message threads", NULL},
|
||||
{"bookmark", 'b', 0, G_OPTION_ARG_STRING, &MU_CONFIG.bookmark,
|
||||
|
||||
@ -123,6 +123,7 @@ struct _MuConfig {
|
||||
/* options for querying 'find' (and view-> 'summary') */
|
||||
gchar *fields; /* fields to show in output */
|
||||
gchar *sortfield; /* field to sort by (string) */
|
||||
int maxnum; /* max # of entries to print */
|
||||
gboolean reverse; /* sort in revers order (z->a) */
|
||||
gboolean threads; /* show message threads */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user