Created
May 25, 2021 09:19
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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