Created
May 2, 2020 13:20
-
-
Save edugon/c37049b4c35fe512bfdf29e685ef3e86 to your computer and use it in GitHub Desktop.
Fix corrupt history file for zsh
This file contains 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
#!/usr/bin/env zsh | |
# George Ornbo (shapeshed) http://shapeshed.com | |
# License - http://unlicense.org | |
# | |
# Fixes a corrupt .zsh_history file | |
mv ~/.zsh_history ~/.zsh_history_bad | |
strings ~/.zsh_history_bad > ~/.zsh_history | |
fc -R ~/.zsh_history | |
rm ~/.zsh_history_bad |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment