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

Re: Bug#749969: history no longer syncs immediately, INC_APPEND_HISTORY broken



On Sat, 31 May 2014 11:21:59 +0200
Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> wrote:
> 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.

The issue is that, without rewriting the history, either the time taken
for the command is wrong (that was the old case) or the command isn't
written out to the history until it's finished (that's the current
position).  Writing the history to get the best of both worlds probably
isn't beyond the bounds of 21st century science, but it's beyond my
understanding of the history code at the moment.  So at the moment
having two options looks like the only way to allow you to achieve any
one of the effects.  I think the new behaviour could be
INC_APPEND_HISTORY_TIME which puts it next to the original one and
indicates why it exists.

I haven't looked, but I don't think this ought to be too difficult ---
there are still some reasons why you might have to deal with history at
the original place anyway, so it should be possible to add an option
test at that point as well as one at the later point.

pws



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