Fix bug where aliases for commands that take raw input were not
executing properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116735 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/CommandInterpreter.cpp b/source/Interpreter/CommandInterpreter.cpp
index 0f5d85b..bb2adeb 100644
--- a/source/Interpreter/CommandInterpreter.cpp
+++ b/source/Interpreter/CommandInterpreter.cpp
@@ -542,11 +542,22 @@
if (command_obj != NULL)
{
+ std::string aliased_cmd_str;
if (command_obj->IsAlias())
{
BuildAliasCommandArgs (command_obj, command_cstr, command_args, result);
if (!result.Succeeded())
return false;
+ else
+ {
+ // We need to transfer the newly constructed args back into the command_line, in case
+ // this happens to be an alias for a command that takes raw input.
+ if (command_args.GetCommandString (aliased_cmd_str))
+ {
+ command_line = aliased_cmd_str.c_str();
+ command_cstr = command_obj->GetCommandName();
+ }
+ }
}
if (add_to_history)