Skip to content

Commit bc5c0b2

Browse files
committed
Lukasz was wrong all along
1 parent d023e7a commit bc5c0b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/_pyrepl/readline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def read_history_file(self, filename="~/.history"):
346346
def write_history_file(self, filename="~/.history"):
347347
maxlength = self.saved_history_length
348348
history = self.get_reader().get_trimmed_history(maxlength)
349-
with open(os.path.expanduser(filename), "a", encoding="utf-8") as f:
349+
with open(os.path.expanduser(filename), "w", encoding="utf-8") as f:
350350
for entry in history:
351351
entry = entry.replace("\n", "\r\n") # multiline history support
352352
f.write(entry + "\n")

0 commit comments

Comments
 (0)