Created
April 23, 2018 17:04
-
-
Save diegorribeiro/9cd97bb2200aa5c2ed6d453942dac83c to your computer and use it in GitHub Desktop.
Zsh history error
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
#!/bin/sh | |
# Borrowed from http://marcparadise.com/blog/2013/09/21/how-to-fix-a-corrupt-history-file/ | |
# If you ever see a message like this upon starting a new shell | |
# zsh: corrupt history file /home/marc/.zsh_history | |
# here is a quick fix | |
cd ~ | |
mv .zsh_history .zsh_history_bad | |
strings .zsh_history_bad > .zsh_history | |
# And reload history | |
fc -R .zsh_history |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment