MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / clear

Method clear

cmd2/history.py:183–186  ·  view source on GitHub ↗

Remove all items from the History list.

(self)

Source from the content-addressed store, hash-verified

181 super().append(history_item)
182
183 def clear(self) -> None:
184 """Remove all items from the History list."""
185 super().clear()
186 self.start_session()
187
188 def get(self, index: int) -> HistoryItem:
189 """Get item from the History list using 1-based indexing.

Callers

nothing calls this directly

Calls 1

start_sessionMethod · 0.95

Tested by

no test coverage detected