Restore autocompletion working!
This commit is contained in:
14
src/main.cpp
14
src/main.cpp
@ -12,6 +12,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <iomanip>
|
||||
|
||||
namespace dropshell {
|
||||
|
||||
void print_help() {
|
||||
@ -163,6 +164,19 @@ int main(int argc, char* argv[]) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cmd == "autocomplete_list_backups") {
|
||||
if (argc < 4) {
|
||||
std::cerr << "Error: autocomplete_list_backups requires a server name and service name" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
if (cfg->is_config_set()) {
|
||||
auto backups = dropshell::list_backups(argv[2], argv[3]);
|
||||
for (const auto& backup : backups)
|
||||
std::cout << backup << std::endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// from here we require the config file to be loaded.
|
||||
if (!cfg->is_config_set()) {
|
||||
|
Reference in New Issue
Block a user