From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13015 invoked from network); 8 Oct 2007 15:30:30 -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 15:30:30 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 57284 invoked from network); 8 Oct 2007 15:30:24 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Oct 2007 15:30:24 -0000 Received: (qmail 1667 invoked by alias); 8 Oct 2007 15:30:16 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11966 Received: (qmail 1642 invoked from network); 8 Oct 2007 15:30:15 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 8 Oct 2007 15:30:15 -0000 Received: (qmail 55951 invoked from network); 8 Oct 2007 15:30:15 -0000 Received: from wx-out-0506.google.com (66.249.82.228) by a.mx.sunsite.dk with SMTP; 8 Oct 2007 15:30:10 -0000 Received: by wx-out-0506.google.com with SMTP id h27so1284109wxd for ; Mon, 08 Oct 2007 08:30:08 -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=H2sHqRVyL1/YOmccEU7+0tGep3iWvZjkTVP5w36nYLs=; b=tWNZR+pf5YzvwpNxEIqqHCxaavX3jsz9/aaYlFokJUnx6hQcgtEmfYNRv5ihHP7ceR6d4/oc0Fo3Cmiq8Sbq2c4iHAbKscH2OnRRHt9sTaM1Qcc6Lbba81g2lmwtpsWLSUB24C1lQjIxCkdEfkzCo/sKN0nKaak2zkBP/cO4Em4= 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=spzJthI9wYkdLrdtnTlKUsWVI4Q00d646gmhkNe3FV3E3vAkyTRR3BhAh8W8mHsTl/E9I9+vBu084575pSZkLVeqhQfyEEQbwNI3pjX2oCuHL3Rh8cFyS14Z8CTSDtm2iFESdrJikfnqSHKVe73hivbG0Wai+t1/cNMNd4tugLM= Received: by 10.90.75.10 with SMTP id x10mr4517889aga.1191857408578; Mon, 08 Oct 2007 08:30:08 -0700 (PDT) Received: by 10.90.93.19 with HTTP; Mon, 8 Oct 2007 08:30:08 -0700 (PDT) Message-ID: Date: Mon, 8 Oct 2007 17:30:08 +0200 From: "Nikolai Weibull" Sender: nikolai.weibull@gmail.com To: "Matthew Wozniski" Subject: Re: Failing to write to history file if containing directory doesn't exist Cc: zsh-users@sunsite.dk In-Reply-To: <20071008151949.GA18576@mastermind> 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> <20071008141403.GA25326@scowler.net> <20071008151949.GA18576@mastermind> X-Google-Sender-Auth: 0fd4d38d22fd8766 On 10/8/07, Matthew Wozniski wrote: > On Mon, Oct 08, 2007 at 10:14:03AM -0400, Clint Adams wrote: > > Personally, I'd be a little shocked and annoyed if zsh started creating > > directories without my explicit permission. > I don't know that I'd be shocked, but I would err on the side of > a smaller, faster, more maintainable shell, given how easy to handle > in shell code the problem is. Shell code is more easily maintained > than C, and for an error condition that should only exist when the > HISTFILE parameter is set, I think adding code to the shell itself > would be overkill. If you're already setting HISTFILE yourself, it's > not too much extra work to add an mkdir -p above it. And what if the directory gets deleted between the time HISTFILE is set and the shell exits? I'd rather err on the side of a more intelligent, "work hard for the user"-type shell that doesn't let my data disappear out into oblivion without doing its best to keep said data around.