[Lldb-commits] [lldb] r266940 - Added command prefix to new help messages to ensure that they're correctly words in REPL mode.

Kate Stone via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 20 17:55:20 PDT 2016


Author: kate
Date: Wed Apr 20 19:55:20 2016
New Revision: 266940

URL: http://llvm.org/viewvc/llvm-project?rev=266940&view=rev
Log:
Added command prefix to new help messages to ensure that they're correctly words in REPL mode.


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=266940&r1=266939&r2=266940&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectHelp.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectHelp.cpp Wed Apr 20 19:55:20 2016
@@ -35,22 +35,16 @@ CommandObjectHelp::GenerateAdditionalHel
     if (s && command && *command)
     {
         s->Printf("'%s' is not a known command.\n", command);
-        if (prefix && *prefix)
-        {
-            s->Printf("Try '%shelp' to see a current list of commands.\n", prefix);
-        }
-        else
-        {
-            s->PutCString("Try 'help' to see a current list of commands.\n");
-        }
-        
+        s->Printf("Try '%shelp' to see a current list of commands.\n", prefix ? prefix : "");
         if (include_apropos)
         {
-            s->Printf("Try 'apropos %s' for a list of related commands.\n", subcommand ? subcommand : command);
+	  s->Printf("Try '%sapropos %s' for a list of related commands.\n",
+                    prefix ? prefix : "", subcommand ? subcommand : command);
         }
         if (include_type_lookup)
         {
-            s->Printf("Try 'type lookup %s' for information on types, methods, functions, modules, etc.", subcommand ? subcommand : command);
+            s->Printf("Try '%stype lookup %s' for information on types, methods, functions, modules, etc.",
+		      prefix ? prefix : "", subcommand ? subcommand : command);
         }
     }
 }




More information about the lldb-commits mailing list