Skip to content

Instantly share code, notes, and snippets.

@antonga23
Created May 25, 2021 09:19
Show Gist options
  • Save antonga23/41350c27e3f64ec9962cb371afcc2e9b to your computer and use it in GitHub Desktop.
Save antonga23/41350c27e3f64ec9962cb371afcc2e9b to your computer and use it in GitHub Desktop.
Occasionally you may find you have a corrupt zsh history file preventing you from using the `fc` command or searching the history. Here's how to fix it.
cd ~
mv .zsh_history .zsh_history_bad
strings -eS .zsh_history_bad > .zsh_history
fc -R .zsh_history
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment