Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: (rfc) HIST_FIND_DUPS option



On Mon, May 9, 2011 at 5:03 PM, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:

> Yeah, but why show it again if there was an intervening other line, but not
> otherwise?
>

Well, that's the whole purpose of the no-dups option is to remove all the
duplicates that you've already rejected. With that off, zsh just tries to
avoid appearing to be buggy -- if the user hits a key to search backward and
the line doesn't change, it has the appearance of having done nothing.

This is already possible, and indeed how I have been using this feature.
>

Nice!  I had forgotten that post.

Unfortunately I don't think I can do anything from this hook to affect the
> dupness of results.


It might be interesting to have a way for that hook to affect the value of
last_line so that it could not compare as identical.

One more note on your idea of a HIST_FIND_ALL_DUPS option -- it would need
to affect other hist movement too.  I know that the arrow up/down code has a
similar avoid-the-appearance-of-doing-nothing idiom, for instance.

..wayne..


Messages sorted by: Reverse Date, Date, Thread, Author