diff --git a/README.md b/README.md index b96ae01..458702f 100644 --- a/README.md +++ b/README.md @@ -104,16 +104,16 @@ default values only after having loaded this script into your ZSH session. * HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE is a global variable that defines whether all search results returned are _unique_. If set to a non-empty - value, then only unique search results are presented. It is unset by - default. An alternative way to ensure that search results are unique is - to use `setopt HIST_IGNORE_ALL_DUPS`. If both this configuration variable - and `setopt HIST_IGNORE_ALL_DUPS` are unset, then `setopt HIST_FIND_NO_DUPS` - is still respected, and makes this plugin skip duplicate _adjacent_ search + value, then only unique search results are presented. This behaviour is off + by default. An alternative way to ensure that search results are unique is + to use `setopt HIST_IGNORE_ALL_DUPS`. If this configuration variable is off + and `setopt HIST_IGNORE_ALL_DUPS` is unset, then `setopt HIST_FIND_NO_DUPS` + is still respected and it makes this plugin skip duplicate _adjacent_ search results as you cycle through them, but this does not guarantee that search results are unique: if your search results were "Dog", "Dog", "HotDog", "Dog", then cycling them gives "Dog", "HotDog", "Dog". Notice that the "Dog" search result appeared twice as you cycled through them. If you wish to - receive globally unique search results only once, then set this + receive globally unique search results only once, then use this configuration variable, or use `setopt HIST_IGNORE_ALL_DUPS`. ------------------------------------------------------------------------------ diff --git a/zsh-history-substring-search.zsh b/zsh-history-substring-search.zsh index b571d4c..dbfddbe 100644 --- a/zsh-history-substring-search.zsh +++ b/zsh-history-substring-search.zsh @@ -45,7 +45,7 @@ HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=magenta,fg=white,bold' HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=white,bold' HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS='i' -unset HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE +HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE='' #----------------------------------------------------------------------------- # the main ZLE widgets