diff options
author | Johnny Chen <johnny.chen@apple.com> | 2012-01-27 18:49:33 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2012-01-27 18:49:33 +0000 |
commit | 921ca5d4b809542c4995f4ae93b51b2f331ad687 (patch) | |
tree | 4d776ef35edb094083cb64257d093a2702927e7e /lldb/source/Commands/CommandObjectHelp.cpp | |
parent | 29ad7b914f78c9d9dc1fc4a2f7a4d09ca7bc3f79 (diff) | |
download | llvm-921ca5d4b809542c4995f4ae93b51b2f331ad687.zip llvm-921ca5d4b809542c4995f4ae93b51b2f331ad687.tar.gz llvm-921ca5d4b809542c4995f4ae93b51b2f331ad687.tar.bz2 |
Emit the message about putting ' -- ' between the end of command options and the raw input conditionally,
that is, only if the command object does not want completion. An example is the "settings set" command.
llvm-svn: 149139
Diffstat (limited to 'lldb/source/Commands/CommandObjectHelp.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectHelp.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp index d3b9b0d..8428e4f 100644 --- a/lldb/source/Commands/CommandObjectHelp.cpp +++ b/lldb/source/Commands/CommandObjectHelp.cpp @@ -158,11 +158,13 @@ CommandObjectHelp::Execute (Args& command, CommandReturnObject &result) if ((long_help != NULL) && (strlen (long_help) > 0)) output_strm.Printf ("\n%s", long_help); - // Mark this help command with a success status. - if (sub_cmd_obj->WantsRawCommandString()) + // Emit the message about using ' -- ' between the end of the command options and the raw input + // conditionally, i.e., only if the command object does not want completion. + if (sub_cmd_obj->WantsRawCommandString() && !sub_cmd_obj->WantsCompletion()) { 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); } + // Mark this help command with a success status. result.SetStatus (eReturnStatusSuccessFinishNoResult); } else if (sub_cmd_obj->IsMultiwordObject()) |