summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-02-09 23:26:12 +0000
committerMaxime Coste <mawww@kakoune.org>2017-02-09 23:26:12 +0000
commit4ae441db687ae7cd96ae8763dcab4ba603324345 (patch)
tree33924f00ba4b39994abd828c87d8c6ea2351cafe /src
parent86bba5d9d2d003c3cde3aa8acc122afa302575a2 (diff)
parent0cf94292e457d7ec5667ca94df4484c61b1c6f10 (diff)
Merge remote-tracking branch 'Delapouite/decl-completer'
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/commands.cc b/src/commands.cc
index cc47a8b8..2b7a8e5c 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -1317,7 +1317,12 @@ const CommandDesc declare_option_cmd = {
},
CommandFlags::None,
CommandHelper{},
- CommandCompleter{},
+ make_completer(
+ [](const Context& context, CompletionFlags flags,
+ const String& prefix, ByteCount cursor_pos) -> Completions {
+ auto c = {"int", "bool", "str", "regex", "int-list", "str-list", "completions", "line-flags", "range-faces"};
+ return { 0_byte, cursor_pos, complete(prefix, cursor_pos, c) };
+ }),
[](const ParametersParser& parser, Context& context, const ShellContext&)
{
Option* opt = nullptr;