diff --git a/docs/debugger.html b/docs/debugger.html index 8ea40d64b..97e3b0161 100644 --- a/docs/debugger.html +++ b/docs/debugger.html @@ -936,6 +936,7 @@ Type "help 'cmd'" to see extended information about the given command.
cheat - Use a cheat code (see manual for cheat types) clearBreaks - Clear all breakpoints clearConfig - Clear DiStella config directives [bank xx] + clearHistory - Clear the prompt history clearSaveStateIfs - Clear all saveState points clearTraps - Clear all traps clearWatches - Clear all watches diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx index e1503eb01..94f9139c6 100644 --- a/src/debugger/DebuggerParser.cxx +++ b/src/debugger/DebuggerParser.cxx @@ -950,6 +950,14 @@ void DebuggerParser::executeClearConfig() commandResult << debugger.cartDebug().clearConfig(); } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// "clearHistory" +void DebuggerParser::executeClearHistory() +{ + debugger.prompt().clearHistory(); + commandResult << ""; +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // "clearBreaks" void DebuggerParser::executeClearSaveStateIfs() @@ -2600,6 +2608,16 @@ DebuggerParser::CommandArray DebuggerParser::commands = { { std::mem_fn(&DebuggerParser::executeClearConfig) }, + { + "clearHistory", + "Clear the prompt history", + "Example: clearhisotry (no parameters)", + false, + true, + { Parameters::ARG_END_ARGS }, + std::mem_fn(&DebuggerParser::executeClearHistory) + }, + { "clearSaveStateIfs", "Clear all saveState points", diff --git a/src/debugger/DebuggerParser.hxx b/src/debugger/DebuggerParser.hxx index 040bed485..89cea1abe 100644 --- a/src/debugger/DebuggerParser.hxx +++ b/src/debugger/DebuggerParser.hxx @@ -101,7 +101,7 @@ class DebuggerParser std::array