zsh, I find there are many duplicate lines in
$ cat $HISTFILE : 1593874281:0;ls : 1593874287:0;l : 1593874288:0;ls : 1593874291:0;l
hist_ignore_dups should solve this. (
But duplicate lines still appeared in
$HISTFILE, even though
hist_ignore_dups is already enabled by
ohmyzsh with history plugin.
## History command configuration setopt extended_history # record timestamp of command in HISTFILE setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE setopt hist_ignore_dups # ignore duplicated commands history list setopt hist_ignore_space # ignore commands that start with space setopt hist_verify # show command with history expansion to user before running it setopt share_history # share command history data
I suspect that
hist_ignore_dups are in conflict.