# move to home directory
cd ~
# move the .zsh_history file into another .zsh_history_bad file
mv .zsh_history .zsh_history_bad
# write all printable strings into a new .zsh_history file
strings .zsh_history_bad > .zsh_history
# reload the history
fc -R .zsh_history
If you found this helpful, don't hesitate to buymeacoffee
@Arios509
Typically you didn't shut down your computer correctly. Another way you can fix this is just opening your zsh history file in a text editor and removing the corrupted parts. Corrupted parts usually look like this
☒