We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d023e7a commit bc5c0b2Copy full SHA for bc5c0b2
Lib/_pyrepl/readline.py
@@ -346,7 +346,7 @@ def read_history_file(self, filename="~/.history"):
346
def write_history_file(self, filename="~/.history"):
347
maxlength = self.saved_history_length
348
history = self.get_reader().get_trimmed_history(maxlength)
349
- with open(os.path.expanduser(filename), "a", encoding="utf-8") as f:
+ with open(os.path.expanduser(filename), "w", encoding="utf-8") as f:
350
for entry in history:
351
entry = entry.replace("\n", "\r\n") # multiline history support
352
f.write(entry + "\n")
0 commit comments