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 11970
- From: Matthew Wozniski <godlygeek@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Failing to write to history file if containing directory doesn't exist
- Date: Mon, 8 Oct 2007 21:58:14 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:date:from:to:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; bh=MrGKbwaFNlgbD7t3vp54T9KW/i1fsBgI2tf0vkKaQrM=; b=GwBkrjzt7Hsp4tj6DnkD9P0NzV5oc4CmIcD6Mnugln3vl8eJgjXMSbHbnCrPuoh9gmC2EwlMDmh7JIqaKgLJpaXx7Kg2MaDCTuZFDa2pnUwSVH8nlA/v1QLhJ35cvpQJAnlCIJ++rVyh2YytV4sRGPdqAEbAEnX1Q4+4NnwDrPY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=siGNh27H1NAsVfZ+YsADQ/sEdk/6QQBSOOmJcma5YSXviN1SjWxqfvYkDd2txreCHH7o5kjAkq5CLFyZUcR8y9TiKeVWJ8aBf7jPILZqO4GMDCtC/460PlWeaBfluMoa5tMNjDfoPuIr7kr8pgmTu8gTRbv0nl0Epx9GKWjXS2I=
- In-reply-to: <071008184445.ZM25513@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200710081015.l98AFlIU018448@xxxxxxxxxxxxxx> <dbfc82860710080508o3ef1de0br957caf39bb2aa19f@xxxxxxxxxxxxxx> <200710081338.l98Dc2br012284@xxxxxxxxxxxxxx> <dbfc82860710080705w6e90db9i2a9714caf27460c4@xxxxxxxxxxxxxx> <20071008141403.GA25326@xxxxxxxxxxx> <20071008151949.GA18576@mastermind> <dbfc82860710080830r289c962eyde18f1564e7f0de0@xxxxxxxxxxxxxx> <20071008154632.GB18576@mastermind> <dbfc82860710081532m5672197crf568b7d120ab192f@xxxxxxxxxxxxxx> <071008184445.ZM25513@xxxxxxxxxxxxxxxxxxxxxx>
On Mon, Oct 08, 2007 at 06:44:45PM -0700, Bart Schaefer wrote:
> } Only under the condition that HISTFILE is written to between the two
> } commands.
>
> Which will be always, if the SHARE_HISTORY and/or INC_APPEND_HISTORY
> options are set.
Exactly so.
> } I still want to play a "don't lose data without trying to save it"
> } card, but it seems I'm the only one playing cards of that suite.
>
> History is only maintained for interactive shells, so you might get
> more traction with an option to prompt the user to create the directory
> and/or fix $HISTFILE when the file does not exist or is not writable.
Along that vein, and still leaning towards a solution in shell code,
might it be reasonable to put a precmd hook into the default
/etc/zshrc to check up on HISTFILE? That seems like a compromise that
allows everyone to get it but for it still to be maintained in shell,
rather than c.
~Matt Wozniski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author