dropshell release 2025.0518.1451
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled
This commit is contained in:
44
source/src/commands/colours.cpp
Normal file
44
source/src/commands/colours.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
#include "command_registry.hpp"
|
||||
#include "config.hpp"
|
||||
#include "utils/output.hpp"
|
||||
#include "utils/assert.hpp"
|
||||
|
||||
namespace dropshell {
|
||||
|
||||
void colours_autocomplete(const CommandContext& ctx) {}
|
||||
int colours_handler(const CommandContext& ctx)
|
||||
{
|
||||
info << "Colours:" << std::endl;
|
||||
debug << "Debug Example: The quick brown fox jumps over the lazy dog." << std::endl;
|
||||
info << "Info Example: The quick brown fox jumps over the lazy dog." << std::endl;
|
||||
warning << "Warning Example: The quick brown fox jumps over the lazy dog." << std::endl;
|
||||
error << "Error Example: The quick brown fox jumps over the lazy dog." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static std::vector<std::string> colours_name_list={"colours","c","--colours","-c"};
|
||||
|
||||
// Static registration
|
||||
struct ColoursCommandRegister {
|
||||
ColoursCommandRegister() {
|
||||
CommandRegistry::instance().register_command({
|
||||
colours_name_list,
|
||||
colours_handler,
|
||||
colours_autocomplete,
|
||||
true, // hidden
|
||||
false, // requires_config
|
||||
false, // requires_install
|
||||
0, // min_args (after command)
|
||||
0, // max_args (after command)
|
||||
"colours",
|
||||
"Show the colours used by dropshell.",
|
||||
// heredoc
|
||||
R"(
|
||||
Show the colours used by dropshell.
|
||||
)"
|
||||
});
|
||||
}
|
||||
} colours_command_register;
|
||||
|
||||
|
||||
} // namespace dropshell
|
Reference in New Issue
Block a user