Created
March 15, 2024 01:04
-
-
Save LazyRen/92af3c17cb873ec9f69d81295a7e453f to your computer and use it in GitHub Desktop.
Remove zsh history entry
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
# Use TAB to select entries to delete | |
# Run `fc -R` to reload history file from a current shell. | |
alias hfzf='history -w; cat ~/.zsh_history | fzf -m > /tmp/to_remove; grep -vxFf /tmp/to_remove ~/.zsh_history > ~/.new_zsh_history; mv ~/.new_zsh_history ~/.zsh_history; rm /tmp/to_remove; history -r' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment