Skip to content

Commit

Permalink
Merge #3206
Browse files Browse the repository at this point in the history
3206: [cli] fix regex to remove `command` argument from help messages r=townsend2010 a=andrei-toterman

fix #3205 

Co-authored-by: Andrei Toterman <[email protected]>
  • Loading branch information
townsend2010 and andrei-toterman authored Oct 4, 2023
2 parents 511f99e + 295278d commit e04b12e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/client/cli/argparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,7 @@ QString mp::ArgParser::helpText(cmd::Command* command)
text = text.replace(QCommandLineParser::tr("[options]") + " <command>",
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, "");

Expand Down

0 comments on commit e04b12e

Please sign in to comment.