[Lldb-commits] [lldb] r149139 - /lldb/trunk/source/Commands/CommandObjectHelp.cpp

Johnny Chen johnny.chen at apple.com
Fri Jan 27 10:49:33 PST 2012


Author: johnny
Date: Fri Jan 27 12:49:33 2012
New Revision: 149139

URL: http://llvm.org/viewvc/llvm-project?rev=149139&view=rev
Log:
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.

Modified:
    lldb/trunk/source/Commands/CommandObjectHelp.cpp

Modified: lldb/trunk/source/Commands/CommandObjectHelp.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.cpp?rev=149139&r1=149138&r2=149139&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectHelp.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectHelp.cpp Fri Jan 27 12:49:33 2012
@@ -158,11 +158,13 @@
                     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())





More information about the lldb-commits mailing list