From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10751 invoked by alias); 31 May 2014 09:29:57 -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: 32635 Received: (qmail 696 invoked from network); 31 May 2014 09:29:50 -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, SPF_HELO_PASS autolearn=ham version=3.3.2 From: Frank Terbeck To: zsh-workers@zsh.org Cc: 749969-forwarded@bugs.debian.org, Peter Palfrader , Han Pingtian Subject: Re: Bug#749969: history no longer syncs immediately, INC_APPEND_HISTORY broken In-Reply-To: <20140531074936.GA9011@valiant.palfrader.org> (Peter Palfrader's message of "Sat, 31 May 2014 09:49:39 +0200") References: <20140531074936.GA9011@valiant.palfrader.org> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) Date: Sat, 31 May 2014 11:21:59 +0200 Message-ID: <87d2eu5mmg.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Df-Sender: NDMwNDQ0 Hi list, Debian's BTS received a regression report for zsh. I'll include a slightly shortened account of the bug-reporter's findings. The version in "stable" he references is 4.3.17; the version that shows the broken behaviour is 5.0.5 (and I suspect that releases starting at 5.0.3 will contain the regression): Peter Palfrader wrote: [...] > since upgrading from stable, I noticed that zsh no longer adds commands > to the history immediately when they are started. They only get added > when they have finished. > > That's a regression from stable, where things got added as soon as they > started. > > This is as important feature for me, as I often want to run similar > (long running) commands at the same time. I.e., I issue a command, open > a new shell in a new terminal emulator window, slightly modify it and > send it off. Now that's no longer possible. > > E.g.: > - Run "sleep 10" in a zsh in your favorite terminal emulator. > - Open a second window. "sleep 10" is not yet in your history. > - > - Open a third window. "sleep 10" is now there. > > Ideally the sleep 10 would be there even in the second window. [...] > All I ask is that INC_APPEND_HISTORY again work as documented: > > | This options works like APPEND_HISTORY except that new history > | lines are added to the $HISTFILE incrementally (as soon as they > ^^^^^^^^^^^^^^^^ > | are entered) > ^^^^^^^^^^^^ I've skimmed through our version control history, and I'm pretty sure the reason for this is 16ff79a885f aka workers-31789 aka =C2=B9. And I agree that it's a regression, that breaks long standing behaviour, which affects at least the use case that Peter describes. I think to enable both ways to be possible, there should be two options: INC_APPEND_HISTORY that enables the original behaviour and (if the name is agreeable) DELAY_INC_APPEND_HISTORY, that amends the behaviour of the original option in the way that is reflected by the current behaviour. If your first instinct is to suggest enabling SHARE_HISTORY, then please note, that that's a rather intrusive option that can't possibly be forced onto users that don't want it (I wouldn't want it, and the bug reporter doesn't either). CC:ing Han, who is the original author. PWS, who did some refinements on top of Han's original code, reads all mails on -workers anyway. ;) Regards, Frank =C2=B9 http://www.zsh.org/mla/workers/2013/msg00824.html --=20 In protocol design, perfection has been reached not when there is nothing left to add, but when there is nothing left to take away. -- RFC 1925