zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Somebody remind me of the reasoning in readhistfile()?
Date: Sat, 31 Jan 2015 11:06:12 -0800	[thread overview]
Message-ID: <150131110612.ZM18938@torch.brasslantern.com> (raw)

        newflags = HIST_OLD | HIST_READ;
        if (readflags & HFILE_FAST)
            newflags |= HIST_FOREIGN;
        if (readflags & HFILE_SKIPOLD
         || (hist_ignore_all_dups && newflags & hist_skip_flags))
            newflags |= HIST_MAKEUNIQUE;

hist_skip_flags is always either the single bit HIST_FOREIGN, or zero.
The initial value is zero.

The only way to change hist_skip_flags is with "zle set-local-history",
which it's not possible to execute during reading of init files.

This means (unless I'm missing something?) that HIST_MAKEUNIQUE is never
used here unless set-local-history has been executed by the user.  That
in turn means that set-local-history changes the behavior not just of
history ZLE bindings but of the actual incremental read of the history
file if share_history is set.

Why does HIST_MAKEUNIQUE depend on this?


                 reply	other threads:[~2015-01-31 19:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=150131110612.ZM18938@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).