On Fri, Dec 16, 2005 at 09:42:29AM +0100, Arkadiusz Miskiewicz wrote: > rename(".historyz.new", ".historyz") [loses] all permissions and > user/owner of the original .historyz file. I think that having rsync maintain the current permissions and group is a desirable feature. I also like Bart's idea that zsh should refuse to re-write the history file (with a warning) if it is currently owned by some other user. The attached patch does this. (If folks like the idea for the upcoming release, I'll go ahead and commit it.) As for the HISTFILE behavior when using sudo, I have code in my .zshrc that makes sure that root writes out its history into its own history file. You can do this by conditionally redefining HISTFILE based on the current user (among other possibilities). ..wayne..