- Fix alias-building & resolving to properly handle optional arguments for command options.
- Add logging for command resolution ('log enable lldb commands')
- Fix alias resolution to properly handle commands that take raw input (resolve the alias, but
don't muck up the raw arguments).
Net result: Among other things, 'expr' command can now take strings with escaped characters and
not have the command handling & alias resolution code muck up the escaped characters. E.g.
'expr printf ("\n\n\tHello there!")' should now work properly.
Not working yet: Creating aliases with raw input for commands that take raw input. Working on that.
e.g. 'command alias print_hi expr printf ("\n\tHi!")' does not work yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121171 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectHelp.cpp b/source/Commands/CommandObjectHelp.cpp
index 416bdd5..98fe2ad 100644
--- a/source/Commands/CommandObjectHelp.cpp
+++ b/source/Commands/CommandObjectHelp.cpp
@@ -146,6 +146,10 @@
&& (strlen (long_help) > 0))
output_strm.Printf ("\n%s", long_help);
// Mark this help command with a success status.
+ if (sub_cmd_obj->WantsRawCommandString())
+ {
+ m_interpreter.OutputFormattedHelpText (output_strm, "", "", "\nIMPORTANT NOTE: Because this command takes 'raw' input, if you use any command options you must use ' -- ' between the end of the command options and the beginning of the raw input.", 1);
+ }
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else if (sub_cmd_obj->IsMultiwordObject())