From 295278dadbeb072047373aea9e985c164c6f15fc Mon Sep 17 00:00:00 2001 From: Andrei Toterman Date: Fri, 25 Aug 2023 13:21:16 +0200 Subject: [PATCH] [cli] fix regex to remove `command` argument from help messages --- src/client/cli/argparser.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/cli/argparser.cpp b/src/client/cli/argparser.cpp index fd6113b924..d77c6a69fc 100644 --- a/src/client/cli/argparser.cpp +++ b/src/client/cli/argparser.cpp @@ -271,8 +271,7 @@ QString mp::ArgParser::helpText(cmd::Command* command) text = text.replace(QCommandLineParser::tr("[options]") + " ", QString::fromStdString(command->name()) + " " + QCommandLineParser::tr("[options]")); - int start = - text.indexOf(QRegularExpression(QRegularExpression::anchoredPattern(" command\\s*The command to execute"))); + int start = text.indexOf(QRegularExpression(" command\\s*The command to execute")); int end = text.indexOf(nl, start); text = text.replace(start, end - start + 1, "");