mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-24 20:13:00 +03:00
Add an 'options' debug command
This commit is contained in:
parent
593aa44c3f
commit
4c7f6985f1
@ -781,7 +781,7 @@ const CommandDesc debug_cmd = {
|
||||
ParameterDesc{ SwitchMap{}, ParameterDesc::Flags::SwitchesOnlyAtStart, 1 },
|
||||
CommandFlags::None,
|
||||
CommandCompleter{},
|
||||
[](const ParametersParser& parser, Context&)
|
||||
[](const ParametersParser& parser, Context& context)
|
||||
{
|
||||
if (parser[0] == "info")
|
||||
{
|
||||
@ -794,6 +794,12 @@ const CommandDesc debug_cmd = {
|
||||
for (auto& buffer : BufferManager::instance())
|
||||
write_debug(buffer->debug_description());
|
||||
}
|
||||
if (parser[0] == "options")
|
||||
{
|
||||
write_debug("Options:");
|
||||
for (auto& option : context.options().flatten_options())
|
||||
write_debug(" * " + option->name() + ": " + option->get_as_string());
|
||||
}
|
||||
else
|
||||
throw runtime_error("unknown debug command '" + parser[0] + "'");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user