diff --git a/src/command_manager.cc b/src/command_manager.cc index 30684d85..e014d1d3 100644 --- a/src/command_manager.cc +++ b/src/command_manager.cc @@ -766,8 +766,9 @@ Completions CommandManager::complete(const Context& context, if (is_switch(token.content)) { auto switches = Kakoune::complete(token.content.substr(1_byte), pos_in_token, - command.param_desc.switches | - transform(&SwitchMap::Item::key)); + concatenated(command.param_desc.switches + | transform(&SwitchMap::Item::key), + ConstArrayView{"-"})); return switches.empty() ? Completions{} : Completions{start+1, cursor_pos, std::move(switches)}; } if (not command.completer)