zsh-workers
 help / color / mirror / code / Atom feed
From: Greg Klanderman <gak@klanderman.net>
To: zsh-workers@zsh.org
Subject: Re: reading/saving history file dependent on isset(RCS)
Date: Fri, 21 Oct 2011 11:26:14 -0400	[thread overview]
Message-ID: <m3zkgu74dl.fsf@klanderman.net> (raw)
In-Reply-To: <111021054029.ZM15446@torch.brasslantern.com> (Bart Schaefer's message of "Fri, 21 Oct 2011 05:40:29 -0700")

>>>>> On October 21, 2011 Bart Schaefer <schaefer@brasslantern.com> wrote:

> On Oct 20, 12:55pm, Greg Klanderman wrote:
> } 
> } Based on there being no default setting for HISTFILE, can the
> } isset(RCS) check can be safely removed for the readhistfile() call?

> Something you said tripped a synapse.

> No, this can't be safely removed.

> I now seem to recall that this was added when sourcing /etc/zshenv was
> exempted from NO_RCS.  If the system zshenv sets HISTFILE or SAVEHIST,
> then you can get bad side-effects even with "zsh -f" unless NO_RCS
> suppresses history file management.

Thank you for looking into this Bart.  Do you still object if both the
guard against reading and saving are removed?  In that case, if
/etc/zshenv were to set HISTFILE/SAVEHIST, then the HISTFILE should
not get clobbered.  I guess given the multitude of ways one could get
shot in the foot via stuff in /etc/zshenv, guarding against just this
one seems a bit pointless, but I can deal with it.

Hmm one other proposal for you to consider - how about changing the
logic to use the value of isset(RCS) from *before* any init scripts
were loaded to condition reading/saving the history file?  In that
case, 'zsh -f' would inhibit history reading/saving, but having
'setopt norcs' in one of your init scripts would not.

thanks,
Greg


  reply	other threads:[~2011-10-21 15:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19 18:34 Greg Klanderman
2011-10-19 18:48 ` Benjamin R. Haskell
2011-10-20  7:10   ` Bart Schaefer
2011-10-20 16:55     ` Greg Klanderman
2011-10-21 12:40       ` Bart Schaefer
2011-10-21 15:26         ` Greg Klanderman [this message]
2011-10-24 17:08           ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3zkgu74dl.fsf@klanderman.net \
    --to=gak@klanderman.net \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).