mirror of https://github.com/djcb/mu.git
* mu-cmd-find, mu-cmd-cfind: make 'no matches found' uniform
This commit is contained in:
parent
93522893bf
commit
b6291e1522
|
@ -174,15 +174,18 @@ run_cmd_cfind (const char* pattern, OutputFormat format)
|
|||
}
|
||||
|
||||
print_header (format);
|
||||
rv = mu_contacts_foreach (contacts, (MuContactsForeachFunc)each_contact,
|
||||
rv = mu_contacts_foreach (contacts,
|
||||
(MuContactsForeachFunc)each_contact,
|
||||
GINT_TO_POINTER(format), pattern, &num);
|
||||
|
||||
mu_contacts_destroy (contacts);
|
||||
|
||||
if (rv)
|
||||
return (num == 0) ? MU_EXITCODE_NO_MATCHES : MU_EXITCODE_OK;
|
||||
else
|
||||
return MU_EXITCODE_ERROR;
|
||||
if (num == 0) {
|
||||
g_warning ("no matching contacts found");
|
||||
return MU_EXITCODE_NO_MATCHES;
|
||||
}
|
||||
|
||||
return rv ? MU_EXITCODE_OK : MU_EXITCODE_ERROR;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -180,8 +180,8 @@ run_query (MuQuery *xapian, const gchar *query, MuConfig *opts,
|
|||
|
||||
rv = run_query_format (iter, opts, format, count);
|
||||
|
||||
if (rv && count && *count == 0)
|
||||
g_warning ("no matches found");
|
||||
if (rv && count && *count == 0)
|
||||
g_warning ("no matching messages found");
|
||||
|
||||
mu_msg_iter_destroy (iter);
|
||||
|
||||
|
|
Loading…
Reference in New Issue