-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(zsh): ✨ zsh_history issues broke my machine.
- Loading branch information
1 parent
57babb1
commit 309c50c
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# ZSH SNIPPETS | ||
|
||
## Corrupted zsh_history | ||
|
||
WSL crashed on me and left my zsh history in a complete state and failing to run commands. | ||
|
||
Performing the following actions fixed my shell. | ||
|
||
```sh | ||
cd ~ | ||
mv .zsh_history .zsh_history_bad | ||
strings .zsh_history_bad > .zsh_history | ||
fc -R .zsh_history | ||
rm ~/.zsh_history_bad | ||
``` | ||
|
||
## Resources | ||
|
||
* How to fix a corrupt zsh history file [here](https://shapeshed.com/zsh-corrupt-history-file/) |