Uncorrupt your ZSH history

zsh: corrupt history file /home/username/.zsh_history
Most often due to that then eviromental variable HISTFILE has been passed over to some other shell like sh, bash or ksh. Well there is a somewhat easy fix.

mv .zsh_history .zsh_history_bad
strings .zsh_history_bad >! .zsh_history
fc -R .zsh_history

 

Leave a Reply

Your email address will not be published. Required fields are marked *