zsh-workers
 help / color / mirror / code / Atom feed
From: Wayne Davison <wayned@users.sourceforge.net>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: (rfc) HIST_FIND_DUPS option
Date: Mon, 9 May 2011 22:08:07 -0700	[thread overview]
Message-ID: <BANLkTikZ7NCNMXDPwxayBF3wykkMnmP3pg@mail.gmail.com> (raw)
In-Reply-To: <BANLkTimsaZNtZ_uqr+S-QzV2B8v7nGGanA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]

On Mon, May 9, 2011 at 5:03 PM, Mikael Magnusson <mikachu@gmail.com> 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..

      reply	other threads:[~2011-05-10  5:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09 22:09 Mikael Magnusson
2011-05-09 23:51 ` Wayne Davison
2011-05-10  0:03   ` Mikael Magnusson
2011-05-10  5:08     ` Wayne Davison [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTikZ7NCNMXDPwxayBF3wykkMnmP3pg@mail.gmail.com \
    --to=wayned@users.sourceforge.net \
    --cc=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).