1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-01 08:23:05 +03:00

Add command aliases in command info

Fixes #101
This commit is contained in:
Maxime Coste 2014-05-03 15:54:51 +01:00
parent e83123de1f
commit 5db3b51843

View File

@ -432,6 +432,17 @@ CommandInfo CommandManager::command_info(StringView command_line) const
res.first = cmd->first;
if (not cmd->second.docstring.empty())
res.second += cmd->second.docstring + "\n";
String aliases;
for (auto& alias : m_aliases)
{
if (alias.second == cmd->first)
aliases += " " + alias.first;
}
if (not aliases.empty())
res.second += "Aliases:" + aliases + "\n";
auto& switches = cmd->second.param_desc.switches;
if (not switches.empty())
{