CLI: Add interactive session mode command open

This change adds a GNU Readline-based interactive mode to keepassxc-cli. If GNU Readline is not available, commands are just read from stdin with no editing or auto-complete support.

DatabaseCommand is modified to add the path to the current database to the arguments passed to executeWithDatabase. In this way, instances of DatabaseCommand do not have to prompt to re-open the database after each invocation, and existing command implementations do not have to be changed to support interactive mode.

This change also introduces a new way of handling commands between interactive and batch modes.

* Fixes #3224.
* Ran make format
This commit is contained in:
James Ring authored and Jonathan White committed 2019-09-28 11:24:42 -04:00
1 parent a07ea12ac4
commit b1eda37cca
27 files changed
+2751 -2015

No files matched your search

-1
View File
@@ -45,7 +45,6 @@ const QCommandLineOption Add::GenerateOption = QCommandLineOption(QStringList()
<< "generate",
QObject::tr("Generate a password for the entry."));
Add::Add()
{
name = QString("add");