Zsh Mailing List Archive
Messages sorted by:
Re: Failing to write to history file if containing directory doesn't exist
- X-seq: zsh-users 12025
- From: Matthew Wozniski <godlygeek@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Failing to write to history file if containing directory doesn't exist
- Date: Wed, 17 Oct 2007 07:47:51 -0400
- Cc: Richard Hartmann <richih.mailinglist@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:date:from:to:cc:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:x-editor:user-agent; bh=M5EO0OcwpJRto6tG5m6BtFF+UQb/7J2nPvLm5P2eE+Y=; b=YrEwJ8821ySp6cu6+uOG32jg/VBnrr5firxC7Q+FXbhZAcLudK/0/uetQxa4HZ9fX/Q7P/07chsWp4XMAaKZ4zxrnQmzbpcCgNh2h8FlP/lEx0SvH/wvjuw/s08HgCvKj+HG+bcGnUOw7D1Glnj/8/AyyN8IFMj1SQLYUCnV/aQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:x-editor:user-agent; b=aBIxO2bYx4qYygjQis2FXuxt9uma53G9GYFOiSO0dNiHKMOnGf7FEYRaAQIRT8YBbWH2zDmvlwpuf091tdDabEXLiGbA3npRjyq0vJE1Q3z1jhkzJYHPb8bbPnA8cUZDPl0fGk/PyyYu4u/6H0B6+KWpW4eCIVCrIOoMXCtafUE=
- In-reply-to: <2d460de70710170416i10627e1epc1f20811bc62859e@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200710081338.l98Dc2br012284@xxxxxxxxxxxxxx> <dbfc82860710080705w6e90db9i2a9714caf27460c4@xxxxxxxxxxxxxx> <20071008141403.GA25326@xxxxxxxxxxx> <20071008151949.GA18576@mastermind> <dbfc82860710080830r289c962eyde18f1564e7f0de0@xxxxxxxxxxxxxx> <20071008154632.GB18576@mastermind> <dbfc82860710081532m5672197crf568b7d120ab192f@xxxxxxxxxxxxxx> <071008184445.ZM25513@xxxxxxxxxxxxxxxxxxxxxx> <20071009015814.GA21038@mastermind> <2d460de70710170416i10627e1epc1f20811bc62859e@xxxxxxxxxxxxxx>
On Wed, Oct 17, 2007 at 01:16:23PM +0200, Richard Hartmann wrote:
> On 09/10/2007, Matthew Wozniski <godlygeek@xxxxxxxxx> wrote:
> > Along that vein, and still leaning towards a solution in shell code,
> > might it be reasonable to put a precmd hook into the default
> > /etc/zshrc to check up on HISTFILE? That seems like a compromise that
> > allows everyone to get it but for it still to be maintained in shell,
> > rather than c.
> Perhaps check when the shell starts and in the history write function.
> precmd should be as light as possible.
As Bart noted earlier in this thread, history writes occur once per
command anyway for users with SHARE_HISTORY or INC_APPEND_HISTORY set.
And a solution handled during a history write can't be handled
directly in shell code. That's exactly what my suggestion was aimed
at avoiding. The only advantage I can see to handling it in C would
be that it would add only one extra instruction for an unexceptional
write (if (errno != ...) ) instead of the full cost of a glob and
a parameter expansion, which are presumably much more expensive. But,
either way, I'm still against this proposed feature; I still find it
to be unnecessary at best.
Messages sorted by: