From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25103 invoked by alias); 31 Jan 2015 19:06:27 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34443 Received: (qmail 12806 invoked from network); 31 Jan 2015 19:06:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, T_FROM_12LTRDOM,T_MANY_HDRS_LCASE autolearn=ham version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=PYxIXZlY c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=YNv0rlydsVwA:10 a=vCtJwxAwO2uvxROf5sAA:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <150131110612.ZM18938@torch.brasslantern.com> Date: Sat, 31 Jan 2015 11:06:12 -0800 X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Somebody remind me of the reasoning in readhistfile()? MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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?