From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3601 invoked from network); 8 Oct 2007 14:06:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 Oct 2007 14:06:16 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 56355 invoked from network); 8 Oct 2007 14:06:10 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Oct 2007 14:06:10 -0000 Received: (qmail 3564 invoked by alias); 8 Oct 2007 14:06:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23920 Received: (qmail 3466 invoked from network); 8 Oct 2007 14:06:06 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 8 Oct 2007 14:06:06 -0000 Received: (qmail 55742 invoked from network); 8 Oct 2007 14:06:06 -0000 Received: from wr-out-0506.google.com (64.233.184.239) by a.mx.sunsite.dk with SMTP; 8 Oct 2007 14:05:59 -0000 Received: by wr-out-0506.google.com with SMTP id c48so611270wra for ; Mon, 08 Oct 2007 07:05:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=7wvLYyDVa3kUgMnkQZW4NYSvUurWKHnYvQn/5ibXa08=; b=tEYkJpOR/yHjL9HCfbFpReoJ4lchjTqHclvX9lF5gOJWGLGe+oy0/Y8TXroWj6uOpsVHXu3za1ONm5WLrBz35XZYpBA06YpCzyrmqSgg5VPo1NyLyaWeDnzdHoNCgf/8dRbbe12X1TOvJOzfvWLoRih4bH5H2vuwSnd6GXcyT+Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=hz5JQ5bBGHuJH+CTGVs7Gn5dk+PZWAzvKZjCD0Y3tO/RE0T+MMxmCok5vrtmupbUZLKS2F0pvsdjWGFD7I1NLXOHLIqYwRfy2orX6KTijyD/Ae7x6DSWA5qENC1VvYTrkh+XNPi1G1awHi1RPI7S/dI20WTGsEd259N9NsLpTvg= Received: by 10.90.83.14 with SMTP id g14mr4407059agb.1191852358754; Mon, 08 Oct 2007 07:05:58 -0700 (PDT) Received: by 10.90.93.19 with HTTP; Mon, 8 Oct 2007 07:05:58 -0700 (PDT) Message-ID: Date: Mon, 8 Oct 2007 16:05:58 +0200 From: "Nikolai Weibull" Sender: nikolai.weibull@gmail.com To: "Peter Stephenson" Subject: Re: Failing to write to history file if containing directory doesn't exist Cc: zsh-workers In-Reply-To: <200710081338.l98Dc2br012284@news01.csr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200710081015.l98AFlIU018448@news01.csr.com> <200710081338.l98Dc2br012284@news01.csr.com> X-Google-Sender-Auth: 1b2da61803b9e30e On 10/8/07, Peter Stephenson wrote: > Nikolai Weibull wrote: > > > I'd have thought it was a reasonable expectation that the directory > > > already existed. You can always add "mkdir -p ${HISTFILE:h}" when you > > > set HISTFILE, if you need to. > > Yes, sure, but if we assume that this isn't always the case, would > > code that dealt with this case be interesting for inclusion? > I'm frankly lukewarm about adding code for stuff that can already be > done in shell code if you need it, but if you think this is likely to > happen in practice I'll add your C code. I was guessing as much. It's not a condition that comes up often. I discovered this "problem" when I set up a new account for myself on a new system. I have HISTFILE set to "~/.local/var/lib/zsh/history" in an attempt at making my home directory somewhat Filesystem Hierachy Standard "compliant". Now "~/.local/var/lib" existed, but zsh wasn't there. Thus Zsh failed to open the history file. [1] http://www.pathname.com/fhs/pub/fhs-2.3.html