Skip to content

Instantly share code, notes, and snippets.

@majedbojan
Created September 15, 2020 06:54
Show Gist options
  • Save majedbojan/b8b9bdd26f6351c2696cacb3387c8900 to your computer and use it in GitHub Desktop.
Save majedbojan/b8b9bdd26f6351c2696cacb3387c8900 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.
1) cd ~
2) mv .zsh_history .zsh_history_bad
3) strings .zsh_history_bad > .zsh_history
4) fc -R .zsh_history # reload history
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment