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

Re: [PATCH]: restore permissions and mode on HISTFILE when renaming it



Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx> wrote:
> 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.)

Seems OK to me.

> 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).

Yes, I think that's the right way to go (we just started using sudo a
couple of weeks ago, coincidentally, and that's what I did).  I admit it's
a bit annoying the first time.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com



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