Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Failing to write to history file if containing directory doesn't exist
- X-seq: zsh-users 12033
- 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 10:57:24 -0400
- Cc: Nikolai Weibull <now@xxxxxxxx>
- 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=b7bJJt8cb8qpnb52QjrFF73Ufud9m8COnwZvauy7oQg=; b=iMiLEb+KMFf1KPA1qha8oxckAdQCTVkH59kRuPW/3nagcS9kKJQHmxrp5HCP3CuWF1CZrHmFlPGNwnWkg9wowmfJ0kn/oybyQbrAd4K00Ed74vcALUKF9PLMF5ZZKlUnjXKTj0i59t17vfB3rvRMV8sxu/Pl74gOMR8CVBGRHaU=
- 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=iRBl6I48wUYzZZCSOP3CxSVUBSCdvoUFEwOhNzUzKIBeHUSwVzJMU+oL7OSTKD9x18E48/PiXuknpsVnJHZJA8QRjBEyU6rufocl24gBQBY8dJJn5549uomHHL18Yuhc/NWWoUgkzzwYoPrpfev16BatrHK6Ih1SqSG/mr5PFBQ=
- In-reply-to: <dbfc82860710170624l1cbba6a2qdf01bd6296297695@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20071008151949.GA18576@mastermind> <dbfc82860710080830r289c962eyde18f1564e7f0de0@xxxxxxxxxxxxxx> <20071008154632.GB18576@mastermind> <dbfc82860710081532m5672197crf568b7d120ab192f@xxxxxxxxxxxxxx> <071008184445.ZM25513@xxxxxxxxxxxxxxxxxxxxxx> <20071009015814.GA21038@mastermind> <2d460de70710170416i10627e1epc1f20811bc62859e@xxxxxxxxxxxxxx> <20071017114751.GB13054@mastermind> <2d460de70710170507j2317dab0r1440591912773b41@xxxxxxxxxxxxxx> <dbfc82860710170624l1cbba6a2qdf01bd6296297695@xxxxxxxxxxxxxx>
On Wed, Oct 17, 2007 at 03:24:16PM +0200, Nikolai Weibull wrote:
> On 10/17/07, Richard Hartmann <richih.mailinglist@xxxxxxxxx> wrote:
> > An easy, light and scriptable solution that solves 99% of all cases has
> > already been hinted at:
> >
> > export HISTDIR=foo
> > mkdir -p $HISTDIR || echo 'Woe is me!'
> > export HISTFILE=$HISTDIR/bar
>
> I'm sorry, but how does it solve 99% of all cases? There are two cases:
>
> 1. $HISTFILE:h exists when writing $HISTFILE
> 2. $HISTFILE:h does not exist when writing $HISTFILE
>
> The above solution makes case 1 more likely, sure, but it doesn't solve case 2.
I don't believe case 2 to be a problem. That directory didn't just
disappear, it was removed. You told zsh to write to $HISTFILE, then
you removed $HISTFILE:h, and now zsh can't write to $HISTFILE anymore:
in what way is that behavior unexpected or undesirable? I still don't
see it.
~Matt
Messages sorted by:
Reverse Date,
Date,
Thread,
Author