Elliott Cable wrote: > HIST_IGNORE_ALL_DUPS doesn't provide the functionality I want; > > I don't want my history actually modified; I simply want to skip > duplicate entries when using my history-substring-search keybind. |=< #19 (comment)
There's no need to do a full numerical sort here, since we know the keys will be in reverse numerical order, because (R) searches in last- to-first order. Not a big deal, but this is just simpler and presumably more efficient. Also cleaned up a rather confusing comment about (on) being used to remove duplicates, which it definitely doesn't.
This gives further advice for keybindings: for some reason, on my Ubuntu 12.04 system, I need to enter `^[[A` but `$terminfo[kcuu1]` gives `^[OA`
This brings in the several improvements since the code was initially added for compatibility. In particular, this fixes widget conflicts with existing functions and executables by prefixing all redefined widgets with "_zsh_highlight_widget_".
@zsh-users/zsh-syntax-highlighting and @zsh-users/zsh-history-substring-search don't follow the same naming convention. This commit just rename history-substring-search.zsh and history-substring-search.plugin.zsh to zsh-history-substring-search.zsh and zsh-history-substring-search.plugin.zsh respectively.