From de12fe1cc67cb7b61c8a824c2bffbfbd75ba503f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 6 Jan 2015 19:06:53 +0000 Subject: [PATCH] Add completion for debug command --- src/commands.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/commands.cc b/src/commands.cc index f549bd0c..de7c3281 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -798,7 +798,12 @@ const CommandDesc debug_cmd = { " existing commands: info, buffers", ParameterDesc{ SwitchMap{}, ParameterDesc::Flags::SwitchesOnlyAtStart, 1 }, CommandFlags::None, - CommandCompleter{}, + PerArgumentCommandCompleter({ + [](const Context& context, CompletionFlags flags, + const String& prefix, ByteCount cursor_pos) -> Completions { + auto c = {"info", "buffers", "options"}; + return { 0_byte, cursor_pos, complete(prefix, cursor_pos, c) }; + } }), [](const ParametersParser& parser, Context& context) { if (parser[0] == "info")