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 3:09 PM, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:

> I am currently unsure why unsetting HIST_FIND_NO_DUPS doesn't have this
> behaviour already. Possibly it only finds the same line after finding
> another line in between that also matches the search

Exactly.  Under normal circumstance, if the user has rejected a particular
line as not being one that they want to run, showing them the same line
isn't usually very useful to them (and may indeed be confusing).

I don't particularly like the HIST_FIND_DUPS option.  If you named it
HIST_FIND_ALL_DUPS I'd like it a bit better, but I do wonder if there isn't
a better solution to help you solve this particular search idiom (one where
you're really searching not just for a line, but for a set of lines).  For
instance, it would be interesting to be able to ask zsh to show a line or
two of context following the line as you visit each matching line.  In such
a search, it would make a lot of sense to show the user another identical
line that has differing context, so that would be the default.


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