Your Name 93e563948f
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled
Shift things around
2025-05-17 10:18:25 +12:00

45 lines
1.9 KiB
C++

#include "command_registry.hpp"
#include "version.hpp"
namespace dropshell {
int version_handler(const CommandContext &ctx);
static std::vector<std::string> version_name_list = {"version","v","ver","-v","-ver","--version"};
void version_autocomplete(const CommandContext &ctx)
{
}
// Static registration
struct VersionCommandRegister
{
VersionCommandRegister()
{
CommandRegistry::instance().register_command({version_name_list,
version_handler,
version_autocomplete,
false, // hidden
false, // requires_config
false, // requires_install
0, // min_args (after command)
0, // max_args (after command)
"version",
"Uninstall a service on a server. Does not remove configuration or user data.",
// heredoc
R"(
Uninstall a service on a server. Does not remove configuration or user data.
uninstall <server> <service> uninstall the given service on the given server.
uninstall <server> uninstall all services on the given server.
)"});
}
} version_command_register;
int version_handler(const CommandContext &ctx)
{
std::cout << VERSION << std::endl;
return 0;
}
} // namespace dropshell