From d61b076ede88b56f3372a55e7d1eac6a9d717120 Mon Sep 17 00:00:00 2001 From: emaste Date: Mon, 9 Feb 2015 01:44:09 +0000 Subject: Import LLDB as of upstream SVN 228549 (git 39760838) --- source/Commands/CommandObjectHelp.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'source/Commands/CommandObjectHelp.cpp') diff --git a/source/Commands/CommandObjectHelp.cpp b/source/Commands/CommandObjectHelp.cpp index f73d9d2..b02515e 100644 --- a/source/Commands/CommandObjectHelp.cpp +++ b/source/Commands/CommandObjectHelp.cpp @@ -54,9 +54,10 @@ CommandObjectHelp::~CommandObjectHelp() OptionDefinition CommandObjectHelp::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_ALL, false, "show-aliases", 'a', OptionParser::eNoArgument, NULL, NULL, 0, eArgTypeNone, "Show aliases in the command list."}, + { LLDB_OPT_SET_ALL, false, "hide-aliases", 'a', OptionParser::eNoArgument, NULL, NULL, 0, eArgTypeNone, "Hide aliases in the command list."}, { LLDB_OPT_SET_ALL, false, "hide-user-commands", 'u', OptionParser::eNoArgument, NULL, NULL, 0, eArgTypeNone, "Hide user-defined commands from the list."}, - { 0, false, NULL, 0, 0, NULL, NULL, 0, eArgTypeNone, NULL } + { LLDB_OPT_SET_ALL, false, "show-hidden-commands", 'h', OptionParser::eNoArgument, NULL, NULL, 0, eArgTypeNone, "Include commands prefixed with an underscore."}, + { 0, false, NULL, 0, 0, 0, NULL, 0, eArgTypeNone, NULL } }; bool @@ -75,6 +76,8 @@ CommandObjectHelp::DoExecute (Args& command, CommandReturnObject &result) cmd_types |= CommandInterpreter::eCommandTypesAliases; if (m_options.m_show_user_defined) cmd_types |= CommandInterpreter::eCommandTypesUserDef; + if (m_options.m_show_hidden) + cmd_types |= CommandInterpreter::eCommandTypesHidden; result.SetStatus (eReturnStatusSuccessFinishNoResult); m_interpreter.GetHelp (result, cmd_types); // General help @@ -136,17 +139,19 @@ CommandObjectHelp::DoExecute (Args& command, CommandReturnObject &result) else if (!sub_cmd_obj) { result.AppendErrorWithFormat("'%s' is not a known command.\n" - "Try 'help' to see a current list of commands.\n", - cmd_string.c_str()); + "Try '%shelp' to see a current list of commands.\n", + cmd_string.c_str(), + m_interpreter.GetCommandPrefix()); result.SetStatus (eReturnStatusFailed); return false; } else { result.GetOutputStream().Printf("'%s' is not a known command.\n" - "Try 'help' to see a current list of commands.\n" + "Try '%shelp' to see a current list of commands.\n" "The closest match is '%s'. Help on it follows.\n\n", cmd_string.c_str(), + m_interpreter.GetCommandPrefix(), sub_cmd_obj->GetCommandName()); } } @@ -183,8 +188,9 @@ CommandObjectHelp::DoExecute (Args& command, CommandReturnObject &result) else { result.AppendErrorWithFormat - ("'%s' is not a known command.\nTry 'help' to see a current list of commands.\n", - command.GetArgumentAtIndex(0)); + ("'%s' is not a known command.\nTry '%shelp' to see a current list of commands.\n", + command.GetArgumentAtIndex(0), + m_interpreter.GetCommandPrefix()); result.SetStatus (eReturnStatusFailed); } } -- cgit v1.1