* add warning for using --xquery

This commit is contained in:
Dirk-Jan C. Binnema 2011-01-06 16:34:21 +02:00
parent 5e0cfdca57
commit f6de417117
3 changed files with 10 additions and 2 deletions

View File

@ -206,6 +206,11 @@ query_params_valid (MuConfig *opts)
return FALSE;
}
if (opts->xquery) {
g_warning ("--xquery is obsolete; use --format=xquery instead");
return FALSE;
}
if (format == FORMAT_LINKS && !opts->linksdir) {
g_warning ("missing --linksdir argument");
return FALSE;

View File

@ -169,6 +169,9 @@ config_options_group_find (MuConfig *opts)
{"format", 'o', 0, G_OPTION_ARG_STRING, &opts->formatstr,
"output format ('plain'(*), 'links', 'xml',"
"'json', 'sexp', 'xquery') (plain)", NULL},
{"xquery", 0, 0, G_OPTION_ARG_NONE, &opts->xquery,
"obsolete, use --format=xquery instead", NULL},
{NULL, 0, 0, 0, NULL, NULL, NULL}
};

View File

@ -77,8 +77,8 @@ struct _MuConfig {
* default */
/* options for querying */
gboolean xquery; /* give the Xapian query
instead of search
gboolean xquery; /* (obsolete) give the Xapian
query instead of search
results */
char *fields; /* fields to show in output */
char *sortfield; /* field to sort by (string) */