mirror of https://github.com/djcb/mu.git
* add warning for using --xquery
This commit is contained in:
parent
5e0cfdca57
commit
f6de417117
|
@ -206,6 +206,11 @@ query_params_valid (MuConfig *opts)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opts->xquery) {
|
||||||
|
g_warning ("--xquery is obsolete; use --format=xquery instead");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (format == FORMAT_LINKS && !opts->linksdir) {
|
if (format == FORMAT_LINKS && !opts->linksdir) {
|
||||||
g_warning ("missing --linksdir argument");
|
g_warning ("missing --linksdir argument");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -169,6 +169,9 @@ config_options_group_find (MuConfig *opts)
|
||||||
{"format", 'o', 0, G_OPTION_ARG_STRING, &opts->formatstr,
|
{"format", 'o', 0, G_OPTION_ARG_STRING, &opts->formatstr,
|
||||||
"output format ('plain'(*), 'links', 'xml',"
|
"output format ('plain'(*), 'links', 'xml',"
|
||||||
"'json', 'sexp', 'xquery') (plain)", NULL},
|
"'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}
|
{NULL, 0, 0, 0, NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -77,8 +77,8 @@ struct _MuConfig {
|
||||||
* default */
|
* default */
|
||||||
|
|
||||||
/* options for querying */
|
/* options for querying */
|
||||||
gboolean xquery; /* give the Xapian query
|
gboolean xquery; /* (obsolete) give the Xapian
|
||||||
instead of search
|
query instead of search
|
||||||
results */
|
results */
|
||||||
char *fields; /* fields to show in output */
|
char *fields; /* fields to show in output */
|
||||||
char *sortfield; /* field to sort by (string) */
|
char *sortfield; /* field to sort by (string) */
|
||||||
|
|
Loading…
Reference in New Issue