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



On 10/8/07, Matthew Wozniski <godlygeek@xxxxxxxxx> 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.



Messages sorted by: Reverse Date, Date, Thread, Author