mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-31 16:20:22 -05:00
Feature : clip command (#578)
This commit is contained in:
parent
6c050c55d9
commit
a2e82dc883
15 changed files with 250 additions and 41 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#include <QCoreApplication>
|
||||
#include <QStringList>
|
||||
|
||||
#include <cli/Clip.h>
|
||||
#include <cli/EntropyMeter.h>
|
||||
#include <cli/Extract.h>
|
||||
#include <cli/List.h>
|
||||
|
|
@ -35,7 +36,7 @@
|
|||
#include <sanitizer/lsan_interface.h>
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
#ifdef QT_NO_DEBUG
|
||||
Tools::disableCoreDumps();
|
||||
|
|
@ -53,6 +54,7 @@ int main(int argc, char **argv)
|
|||
|
||||
QString description("KeePassXC command line interface.");
|
||||
description = description.append(QString("\n\nAvailable commands:"));
|
||||
description = description.append(QString("\n clip\t\tCopy a password to the clipboard."));
|
||||
description = description.append(QString("\n extract\tExtract and print the content of a database."));
|
||||
description = description.append(QString("\n entropy-meter\tCalculate password entropy."));
|
||||
description = description.append(QString("\n list\t\tList database entries."));
|
||||
|
|
@ -82,7 +84,10 @@ int main(int argc, char **argv)
|
|||
|
||||
int exitCode = EXIT_FAILURE;
|
||||
|
||||
if (commandName == "entropy-meter") {
|
||||
if (commandName == "clip") {
|
||||
argv[0] = const_cast<char*>("keepassxc-cli clip");
|
||||
exitCode = Clip::execute(argc, argv);
|
||||
} else if (commandName == "entropy-meter") {
|
||||
argv[0] = const_cast<char*>("keepassxc-cli entropy-meter");
|
||||
exitCode = EntropyMeter::execute(argc, argv);
|
||||
} else if (commandName == "extract") {
|
||||
|
|
@ -110,5 +115,4 @@ int main(int argc, char **argv)
|
|||
#endif
|
||||
|
||||
return exitCode;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue