From 712cdf5e7b83a4f79803d46e89cbbc713fc60f95 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Tue, 19 Dec 2017 20:44:45 +0100 Subject: [PATCH] Update usage() with --suggestion --- src/searcher/kiwix-search.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/searcher/kiwix-search.cpp b/src/searcher/kiwix-search.cpp index 34e3bb9..b6fac3b 100644 --- a/src/searcher/kiwix-search.cpp +++ b/src/searcher/kiwix-search.cpp @@ -22,9 +22,16 @@ #include #include + void usage() { - cout << "Usage: kiwix-search [--verbose|-v] ZIM_PATH SEARCH" << endl; + cout << "Usage: kiwix-search [OPTIONS] ZIM PATTERN" << endl << endl + << " kiwix-search allows to find articles based on the a fulltext search pattern." << endl << endl + << " ZIM is the full path of the ZIM file. This can also be a disctinct fulltext" << endl + << " index directory (usually distributed with the *.idx extension)." << endl + << " PATTERN is/are word(s) - or part of - to search in the ZIM." << endl << endl + << " -s, --suggestion\tSuggest article titles based on the few letters of the PATTERN instead of making a fulltext search. Work a bit like a completion solution." << endl + << " -v, --verbose\t\tGive details about the search process" << endl; exit(1); }