Zsh Mailing List Archive
Messages sorted by:
Re: Failing to write to history file if containing directory doesn't exist
- X-seq: zsh-users 12027
- From: "Richard Hartmann" <richih.mailinglist@xxxxxxxxx>
- To: "Matthew Wozniski" <godlygeek@xxxxxxxxx>
- Subject: Re: Failing to write to history file if containing directory doesn't exist
- Date: Wed, 17 Oct 2007 14:07:04 +0200
- Cc: zsh-users@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=REUYtZLDSn8V8YloLIUWO6NA35x4aTzu71EreJEIRps=; b=ESVAZMjxY5NITQeM7TvmKch52AwRKSDY1I49qUzJyPWprtgfxmwmz5UIF5Q5K17P7BBpjHoaHRdEobML6yjR3jkfxI3M4v/mNfO6A7gKPpehIstdbQsIMCU65i6DYtgqxCUNbbb+1O5EvGMNDUCYexmK8sT5yi+l+0PJifsT5JM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FtKvsMNjxWNdicB7pk6UmiHl8KAU9Y53wt69ooMdzXYT6n7Rd9LksL7E9rVcjzrGiDT/7X5QEt5M7RS6t2bl6qJIgAZ/o7Oke9u/wsPOIh02oIDqbgh+B2gGOQJs+zqQmMxQ1qOIs8qxhgiLhPHK5AAwTU3sL8dPQtZnHmNKL+w=
- In-reply-to: <20071017114751.GB13054@mastermind>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200710081338.l98Dc2br012284@xxxxxxxxxxxxxx> <20071008141403.GA25326@xxxxxxxxxxx> <20071008151949.GA18576@mastermind> <dbfc82860710080830r289c962eyde18f1564e7f0de0@xxxxxxxxxxxxxx> <20071008154632.GB18576@mastermind> <dbfc82860710081532m5672197crf568b7d120ab192f@xxxxxxxxxxxxxx> <071008184445.ZM25513@xxxxxxxxxxxxxxxxxxxxxx> <20071009015814.GA21038@mastermind> <2d460de70710170416i10627e1epc1f20811bc62859e@xxxxxxxxxxxxxx> <20071017114751.GB13054@mastermind>
On 17/10/2007, Matthew Wozniski <godlygeek@xxxxxxxxx> wrote:
> > 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.
Yah, that is why I worded it that way :)
> 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.
Exactly. To me, the only clean solution would be a new option.
> But, either way, I'm still against this proposed feature; I still find it
> to be unnecessary at best.
I would not want to use it, either. My comments are more geared towards
'if one would do it, this could be a good way'.
An easy, light and scriptable solution that solves 99% of all cases has
already been hinted at:
mkdir -p $HISTDIR || echo 'Woe is me!'
Messages sorted by: