diff --git a/src/command_manager.cc b/src/command_manager.cc index a2f1aad5..caae2776 100644 --- a/src/command_manager.cc +++ b/src/command_manager.cc @@ -821,7 +821,10 @@ Completions CommandManager::complete(const Context& context, { auto switches = Kakoune::complete(token.content.substr(1_byte), pos_in_token, concatenated(command.param_desc.switches - | transform(&SwitchMap::Item::key), + | transform(&SwitchMap::Item::key) + | filter([&](const auto& key) { + return not parser.get_switch(key); + }), ConstArrayView{"-"})); return switches.empty() ? Completions{}