From 0af800a66f02aec9ebf6d9232c111012b6aad541 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Mon, 14 Nov 2011 10:04:05 +0100 Subject: [PATCH] small usage string clarifications --- src/qtgui/main.cpp | 9 ++++++--- src/query/recollq.cpp | 15 ++++++++------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/qtgui/main.cpp b/src/qtgui/main.cpp index 4cd6449d..02c01a17 100644 --- a/src/qtgui/main.cpp +++ b/src/qtgui/main.cpp @@ -195,9 +195,10 @@ static const char usage [] = " -o : the query will be interpreted as an OR query.\n" " -f : the query will be interpreted as a filename search\n" " -l : the query will be interpreted as a query language string (default)\n" -" -t : terminal display: no gui. Results go to stdout. MUST be given\n" -" explicitly as -t (not ie, -at), and -q MUST\n" -" be last on the command line if this is used.\n" +" -t : terminal display: no gui. Results go to stdout. MUST be given\n" +" explicitly as -t (not ie, -at), and -q MUST\n" +" be last on the command line if this is used.\n" +" Use -t -h to see the additional non-gui options\n" ; static void Usage(void) @@ -209,6 +210,8 @@ Usage(void) int main(int argc, char **argv) { + // If "-t" is present at all, we don't do the GUI thing and pass the + // whole to recollq for command line / pipe usage. for (int i = 0; i < argc; i++) { if (!strcmp(argv[i], "-t")) { exit(recollq(&theconfig, argc, argv)); diff --git a/src/query/recollq.cpp b/src/query/recollq.cpp index b8026db4..19abc3c4 100644 --- a/src/query/recollq.cpp +++ b/src/query/recollq.cpp @@ -79,26 +79,27 @@ void output_fields(const vectorfields, Rcl::Doc& doc, static char *thisprog; static char usage [] = -" -P: Show date span for documents in index\n" -" [-o|-a|-f] \n" +" -P: Show the date span for all the documents present in the index\n" +" [-o|-a|-f] [-q] \n" " Runs a recoll query and displays result lines. \n" " Default: will interpret the argument(s) as a xesam query string\n" " query may be like: \n" " implicit AND, Exclusion, field spec: t1 -t2 title:t3\n" " OR has priority: t1 OR t2 t3 OR t4 means (t1 OR t2) AND (t3 OR t4)\n" " Phrase: \"t1 t2\" (needs additional quoting on cmd line)\n" -" -o Emulate the gui simple search in ANY TERM mode\n" -" -a Emulate the gui simple search in ALL TERMS mode\n" -" -f Emulate the gui simple search in filename mode\n" +" -o Emulate the GUI simple search in ANY TERM mode\n" +" -a Emulate the GUI simple search in ALL TERMS mode\n" +" -f Emulate the GUI simple search in filename mode\n" +" -q is just ignored (compatibility with the recoll GUI command line)\n" "Common options:\n" " -c : specify config directory, overriding $RECOLL_CONFDIR\n" " -d also dump file contents\n" " -n limit the maximum number of results (0->no limit, default 2000)\n" " -b : basic. Just output urls, no mime types or titles\n" " -Q : no result lines, just the processed query and result count\n" -" -m : dump the whole document meta[] array\n" +" -m : dump the whole document meta[] array for each result\n" " -A : output the document abstracts\n" -" -S fld : sort by field name\n" +" -S fld : sort by field \n" " -D : sort descending\n" " -i : additional index, several can be given\n" " -e use url encoding (%xx) for urls\n"