summaryrefslogtreecommitdiff
path: root/src/command_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/command_manager.cc')
-rw-r--r--src/command_manager.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/command_manager.cc b/src/command_manager.cc
index e626ed6c..5d5920a2 100644
--- a/src/command_manager.cc
+++ b/src/command_manager.cc
@@ -567,9 +567,14 @@ Completions CommandManager::complete(const Context& context,
{
if (command.second.flags & CommandFlags::Hidden)
continue;
- if ( prefix_match(command.first, prefix))
+ if (prefix_match(command.first, prefix))
result.candidates.push_back(command.first);
}
+ for (auto& alias : context.aliases())
+ {
+ if (prefix_match(alias.first, prefix))
+ result.candidates.push_back(alias.first);
+ }
std::sort(result.candidates.begin(), result.candidates.end());
return result;
}