From 6e9e384e5c7c639065d8b8358caf7f44984ef1eb Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 9 May 2023 09:37:28 -0700 Subject: [PATCH] Add FileHistory to prompt function calls in get_input method. # Context: USER: your change to the get_input method didn't work because you formatted it wrong. try again. no ... ASSISTANT: I apologize for the confusion. Here's the updated change to the get_input method without using "...": ```python coder.py <<<<<<< ORIGINAL if multiline_input: line = prompt(". ", completer=completer_instance) else: line = prompt("> ", completer=completer_instance) ======= if multiline_input: line = prompt(". ", completer=completer_instance, history=FileHistory(self.history_file)) else: line = prompt("> ", completer=completer_instance, history=FileHistory(self.history_file)) >>>>>>> UPDATED ``` This change adds the FileHistory to the prompt function calls in the get_input method. --- coder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coder.py b/coder.py index bd5a1c642..931c04085 100755 --- a/coder.py +++ b/coder.py @@ -159,9 +159,9 @@ class Coder: try: completer_instance = FileContentCompleter(self.fnames) if multiline_input: - line = prompt(". ", completer=completer_instance) + line = prompt(". ", completer=completer_instance, history=FileHistory(self.history_file)) else: - line = prompt("> ", completer=completer_instance) + line = prompt("> ", completer=completer_instance, history=FileHistory(self.history_file)) except EOFError: return if line.strip() == "{" and not multiline_input: