diff --git a/src/mu-cmd-find.c b/src/mu-cmd-find.c index ad67b312..0fe9d094 100644 --- a/src/mu-cmd-find.c +++ b/src/mu-cmd-find.c @@ -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; diff --git a/src/mu-config.c b/src/mu-config.c index 01462e70..37f19345 100644 --- a/src/mu-config.c +++ b/src/mu-config.c @@ -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} }; diff --git a/src/mu-config.h b/src/mu-config.h index 65592999..2cef1b26 100644 --- a/src/mu-config.h +++ b/src/mu-config.h @@ -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) */