diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectHelp.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectHelp.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp index 9f75e62..1f1d63d 100644 --- a/lldb/source/Commands/CommandObjectHelp.cpp +++ b/lldb/source/Commands/CommandObjectHelp.cpp @@ -167,10 +167,13 @@ bool CommandObjectHelp::DoExecute(Args &command, CommandReturnObject &result) { } sub_cmd_obj->GenerateHelpText(result); - - if (m_interpreter.AliasExists(command_name)) { + std::string alias_full_name; + // Don't use AliasExists here, that only checks exact name matches. If + // the user typed a shorter unique alias name, we should still tell them + // it was an alias. + if (m_interpreter.GetAliasFullName(command_name, alias_full_name)) { StreamString sstr; - m_interpreter.GetAlias(command_name)->GetAliasExpansion(sstr); + m_interpreter.GetAlias(alias_full_name)->GetAliasExpansion(sstr); result.GetOutputStream().Printf("\n'%s' is an abbreviation for %s\n", command[0].c_str(), sstr.GetData()); } |