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

Somebody remind me of the reasoning in readhistfile()?



        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?



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