From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3492 invoked by alias); 20 Oct 2011 07:10:55 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29832 Received: (qmail 19228 invoked from network); 20 Oct 2011 07:10:42 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <111020001018.ZM9637@torch.brasslantern.com> Date: Thu, 20 Oct 2011 00:10:17 -0700 In-reply-to: Comments: In reply to "Benjamin R. Haskell" "Re: reading/saving history file dependent on isset(RCS)" (Oct 19, 2:48pm) References: <20127.6190.501587.50858@gargle.gargle.HOWL> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh list Subject: Re: reading/saving history file dependent on isset(RCS) MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Oct 19, 2:48pm, Benjamin R. Haskell wrote: } Subject: Re: reading/saving history file dependent on isset(RCS) } } On Wed, 19 Oct 2011, Greg Klanderman wrote: } } > Hi, can someone explain the thinking behind reading and saving of the } > history file being dependent on isset(RCS)? The code predates CVS.. AFAICT "it has always been that way." I have sources dating back to version 2.4 and it's already in there. } > I did find this partially documented, in section } > "5.1 Startup/Shutdown Files": } > } > | Note also that the RCS option affects the saving of history files, } > | i.e. if RCS is unset when the shell exits, no history file will be } > | saved. } > } > but it does not document that reading the history file is similarly } > conditioned on that option. There isn't a default setting for HISTFILE, so if no startup files are read there's no way for the shell to know what history file to read. That's not "conditioned on" the option, it's just a side-effect. } This bit me last time I was trying to debug someone's history-related } issues. I found that passage, too, (eventually), which is why I didn't } complain then. I don't understand the rationale for the conditioning. } I'd be interested in seeing this changed if there's not a good reason } for its being conditioned by default. I'm pretty sure that the reasoning is that if the shell didn't read the history file in the first place (which it could not possibly have, see above) then it's likely to destroy information if it writes the file on exit. So the user has to deliberately clear the option if he wants the shell to behave like one that started up with the option off. -- Barton E. Schaefer