cli: main: Improve usage text, print it when unknown command given
Dieser Commit ist enthalten in:
Ursprung
72dae1f7be
Commit
b3c6ce3899
@ -30,6 +30,7 @@
|
|||||||
void printUsage(QString argv0)
|
void printUsage(QString argv0)
|
||||||
{
|
{
|
||||||
qInfo() << "Usage:" << argv0 << "command";
|
qInfo() << "Usage:" << argv0 << "command";
|
||||||
|
qInfo() << "Valid commands: add, update, delete, search, list. Each command has a --help option.";
|
||||||
}
|
}
|
||||||
|
|
||||||
Command *commandFromName(QString name, SqliteDbService &dbService)
|
Command *commandFromName(QString name, SqliteDbService &dbService)
|
||||||
@ -116,7 +117,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Logger::error() << "Unknown command:" << commandName << Qt::endl;
|
printUsage(argv0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren