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

Re: bug: can't write history file

On Tue, Oct 24, 2006 at 06:15:06PM +0200, Dmitry Karasik wrote:
> as far as I can see in the code, "isset(APPENDHISTORY)" or
> "isset(SHAREHISTORY)" are only checked when "writeflags &
> HFILE_USE_OPTIONS", which is actually never true in the second call. 

Right.  As I said, this is as it should be.  That part of the code is
rewriting the file on exit, so it should never honor the incremental
options at that point -- it must always rewrite the file from scratch.

> I'd like to ask you to send me a minimalistic .zshenv that will not
> trigger the error and will save the history correctly both under root
> and non-root. 

One new option that I just remembered is HIST_SAVE_BY_COPY:  if you
unset that, the error will go away.  It is a little less safe of an
update, but it does allow root to update the user's file without
changing its ownership.  The alternative is to just live with the
occasional history-file warning while using a history-appending option
(I tested that that will still leave root's commands in the file).


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