DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Remove Duplicate 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

Ref:

Preventing duplicate lines in the history

https://github.com/mattjj/my-oh-my-zsh/blob/master/history.zsh

zsh options



Published

Jan 8, 2016

Last Updated

Jan 8, 2016

Category

Tech

Tags

  • duplicate 2
  • history 3
  • linux 158
  • shell 46

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor