Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save VictorQueiroz/c8fab67e2528ff58549a2e0a293b3b59 to your computer and use it in GitHub Desktop.

Select an option

Save VictorQueiroz/c8fab67e2528ff58549a2e0a293b3b59 to your computer and use it in GitHub Desktop.

Found a blog post describing a fix that appears to work for me, while restoring my missing history:

mv .zsh_history .zsh_history_bad
strings .zsh_history_bad > .zsh_history

Afterwards, you may want to instruct zsh to re-read the history form the recovered history file

fc -R .zsh_history

Original post:

How to fix and recover a "corrupt history file" in zsh?

@VictorQueiroz
Copy link
Author

Original post from Stack Exchange:

How to fix and recover a "corrupt history file" in zsh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment