Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add immediate saving of every line of input to history file #698

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

rben01
Copy link
Contributor

@rben01 rben01 commented Mar 4, 2025

The current implementation shows an error after every line of input if appending to the history file fails. I could see this being annoying, but at the same time it is the safe option compared to only showing the warning once and having a user think they've fixed their issue with the history file, and then having it turn out they didn't, and having their history silently lost.

By writing history after each input line, we avoid losing history if numbat fails to exit gracefully.
@sharkdp
Copy link
Owner

sharkdp commented Mar 4, 2025

Thank you very much!

The current implementation shows an error after every line of input if appending to the history file fails. I could see this being annoying, but at the same time it is the safe option compared to only showing the warning once and having a user think they've fixed their issue with the history file, and then having it turn out they didn't, and having their history silently lost.

Sounds okay to me, I don't think it's a particularly common error, hopefully. Thank you for bringing it up.

@sharkdp sharkdp merged commit 7aa1155 into sharkdp:master Mar 4, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants