MCPcopy Index your code
hub / github.com/prompt-toolkit/ptpython / enter_history

Method enter_history

src/ptpython/python_input.py:1051–1072  ·  view source on GitHub ↗

Display the history.

(self)

Source from the content-addressed store, hash-verified

1049 self.signatures = []
1050
1051 def enter_history(self) -> None:
1052 """
1053 Display the history.
1054 """
1055 app = self.app
1056 app.vi_state.input_mode = InputMode.NAVIGATION
1057
1058 history = PythonHistory(self, self.default_buffer.document)
1059
1060 import asyncio
1061
1062 from prompt_toolkit.application import in_terminal
1063
1064 async def do_in_terminal() -> None:
1065 async with in_terminal():
1066 result = await history.app.run_async()
1067 if result is not None:
1068 self.default_buffer.text = result
1069
1070 app.vi_state.input_mode = InputMode.INSERT
1071
1072 asyncio.ensure_future(do_in_terminal())
1073
1074 def read(self) -> str:
1075 """

Callers 2

_Function · 0.80
enter_historyFunction · 0.80

Calls 1

PythonHistoryClass · 0.85

Tested by

no test coverage detected