This is the best way I've found to remove duplicate entries while
keeping the most recent occurence, but I'm not a ZSH expert. There may
be a more efficient way.
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 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.
2011-07-25 13:39:39 -07:00
Renamed from history-substring-search.zsh (Browse further)