#include "autocomplete.hpp" #include "servers.hpp" #include "config.hpp" #include "templates.hpp" #include "services.hpp" #include "servers.hpp" #include "utils/assert.hpp" #include #include void dropshell::autocomplete(const std::vector &args) { auto cfg = dropshell::get_global_config(); // std::cerr << "[ "<= 3); std::string cmd = args[2]; // std::cout<<" cmd = ["<is_config_set()) return; // can't help without working config. if (args.size()==3) // we have the command but nothing else. dropshell autocomplete command { auto servers = dropshell::get_configured_servers(); for (const auto& server : servers) std::cout << server.name << std::endl; return; } if (args.size()==4) // we have the command and the server. dropshell autocomplete command server { std::string server = args[3]; if (cmd=="create-service") { // create-service