Skip to content

Instantly share code, notes, and snippets.

@antonydevanchi
Forked from fundottz/distinct-history-zsh.md
Created November 12, 2020 20:21
Show Gist options
  • Save antonydevanchi/d19265b45145012e20d04816f116fe28 to your computer and use it in GitHub Desktop.
Save antonydevanchi/d19265b45145012e20d04816f116fe28 to your computer and use it in GitHub Desktop.
Only unique commands in fzf

Remove duplicates in zsh history

To remove duplicate items in fzf prompt, add the following lines into ~/.zshrc:

setopt EXTENDED_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_FIND_NO_DUPS
setopt HIST_SAVE_NO_DUPS
setopt HIST_BEEP
source ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment