From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10528 invoked by alias); 4 Jun 2014 14:50:59 -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: 32702 Received: (qmail 19934 invoked from network); 4 Jun 2014 14:50:55 -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 autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140604075054.ZM30348@torch.brasslantern.com> Date: Wed, 04 Jun 2014 07:50:54 -0700 In-reply-to: <20140604075755.GA5352@localhost.localdomain> Comments: In reply to Han Pingtian "Re: Bug#749969: history no longer syncs immediately, INC_APPEND_HISTORY broken" (Jun 4, 3:57pm) References: <20140531074936.GA9011@valiant.palfrader.org> <87d2eu5mmg.fsf@ft.bewatermyfriend.org> <20140531202211.396cd06e@pws-pc.ntlworld.com> <20140603205607.00cc39f1@pws-pc.ntlworld.com> <20140604075755.GA5352@localhost.localdomain> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Bug#749969: history no longer syncs immediately, INC_APPEND_HISTORY broken MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jun 4, 3:57pm, Han Pingtian wrote: } Subject: Re: Bug#749969: history no longer syncs immediately, INC_APPEND_H } } I have just a quick idea for it :) } } How about in this case, write the command into history first in the } hend(), then rewrite the history in hbegin() after the commnad finished? This would work only if we were guaranteed that no other zsh session had manipulated the history file in the meantime. Given that the only reason to care how soon the command is written is because there *is* another zsh session manipulating the file, this approach unfortunately is probably not practical. It'd be more practical if history was maintained as an actual database, and maybe nobody cares any more that the history be readable as text or by other shells ... but that's a pretty large change.