Created
April 9, 2020 02:10
-
-
Save satriyop/00e6d988ed15e8b1a3eb04bec6b71de0 to your computer and use it in GitHub Desktop.
fix zsh history corrupt
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
| #!/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