From 63123b6484726e020eec5ec7afd66aab26104c4f Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Mon, 17 Jun 2013 23:28:27 +0000 Subject: [PATCH] Renaming the "--wipe" option to "command history" to "--clear" (-C) for coherence with the rest of the LLDB command-line interface llvm-svn: 184147 --- lldb/source/Commands/CommandObjectCommands.cpp | 16 ++++++++-------- .../command_history/TestCommandHistory.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index 3e460418e29f..223083677ec6 100644 --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -70,7 +70,7 @@ protected: m_start_idx(0), m_stop_idx(0), m_count(0), - m_wipe(false) + m_clear(false) { } @@ -100,9 +100,9 @@ protected: case 'e': error = m_stop_idx.SetValueFromCString(option_arg,eVarSetOperationAssign); break; - case 'w': - m_wipe.SetCurrentValue(true); - m_wipe.SetOptionWasSet(); + case 'C': + m_clear.SetCurrentValue(true); + m_clear.SetOptionWasSet(); break; default: error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option); @@ -118,7 +118,7 @@ protected: m_start_idx.Clear(); m_stop_idx.Clear(); m_count.Clear(); - m_wipe.Clear(); + m_clear.Clear(); } const OptionDefinition* @@ -136,13 +136,13 @@ protected: OptionValueUInt64 m_start_idx; OptionValueUInt64 m_stop_idx; OptionValueUInt64 m_count; - OptionValueBoolean m_wipe; + OptionValueBoolean m_clear; }; bool DoExecute (Args& command, CommandReturnObject &result) { - if (m_options.m_wipe.GetCurrentValue() && m_options.m_wipe.OptionWasSet()) + if (m_options.m_clear.GetCurrentValue() && m_options.m_clear.OptionWasSet()) { m_interpreter.GetCommandHistory().Clear(); result.SetStatus(lldb::eReturnStatusSuccessFinishNoResult); @@ -230,7 +230,7 @@ CommandObjectCommandsHistory::CommandOptions::g_option_table[] = { LLDB_OPT_SET_1, false, "count", 'c', required_argument, NULL, 0, eArgTypeUnsignedInteger, "How many history commands to print."}, { LLDB_OPT_SET_1, false, "start-index", 's', required_argument, NULL, 0, eArgTypeUnsignedInteger, "Index at which to start printing history commands (or end to mean tail mode)."}, { LLDB_OPT_SET_1, false, "end-index", 'e', required_argument, NULL, 0, eArgTypeUnsignedInteger, "Index at which to stop printing history commands."}, -{ LLDB_OPT_SET_2, false, "wipe", 'w', no_argument, NULL, 0, eArgTypeBoolean, "Clears the current command history."}, +{ LLDB_OPT_SET_2, false, "clear", 'C', no_argument, NULL, 0, eArgTypeBoolean, "Clears the current command history."}, { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } }; diff --git a/lldb/test/functionalities/command_history/TestCommandHistory.py b/lldb/test/functionalities/command_history/TestCommandHistory.py index b6b7d4d256c6..513a7b71c7b4 100644 --- a/lldb/test/functionalities/command_history/TestCommandHistory.py +++ b/lldb/test/functionalities/command_history/TestCommandHistory.py @@ -13,7 +13,7 @@ class CommandHistoryTestCase(TestBase): mydir = os.path.join("functionalities", "command_history") def test_history(self): - self.runCmd('command history --wipe', inHistory=False) + self.runCmd('command history --clear', inHistory=False) self.runCmd('breakpoint list', check=False, inHistory=True) #0 self.runCmd('register read', check=False, inHistory=True) #1 self.runCmd('apropos hello', check=False, inHistory=True) #2