From 758a2e332ce1a85b2ed669561f190bf512904125 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Fri, 31 Jul 2015 09:50:30 +0200 Subject: [PATCH] recoll GUI: behave as recollq if argv[0] is recollq --- src/qtgui/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qtgui/main.cpp b/src/qtgui/main.cpp index 32e1d5c8..93986ffe 100644 --- a/src/qtgui/main.cpp +++ b/src/qtgui/main.cpp @@ -235,8 +235,11 @@ 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. + // if we are named recollq or option "-t" is present at all, we + // don't do the GUI thing and pass the whole to recollq for + // command line / pipe usage. + if (!strcmp(argv[0], "recollq")) + exit(recollq(&theconfig, argc, argv)); for (int i = 0; i < argc; i++) { if (!strcmp(argv[i], "-t")) { exit(recollq(&theconfig, argc, argv));