Zsh Mailing List Archive
Messages sorted by:
Re: Failing to write to history file if containing directory doesn't exist
- X-seq: zsh-users 11971
- From: "Nikolai Weibull" <now@xxxxxxxx>
- To: "Matthew Wozniski" <godlygeek@xxxxxxxxx>
- Subject: Re: Failing to write to history file if containing directory doesn't exist
- Date: Tue, 9 Oct 2007 09:17:54 +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:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=iisxAAIc1+qTXtZ2UPEn/QdpPvHq5vXKDfIMofrH7uc=; b=I4e+gmyNayQoEJ7r2U7gUHhPDx0aGymY3iAOdBciquVIvxonh3BaD0sQ3/dDF5hgHmwhai5MErgLJzT6cZXDfGkpIcl6EE69kcBuW6AknpzrVOPLzw0lEAzaUz4bWdeo1rrBeOXGOVdIQBl2BXoThFk8KV0LuBbXWUmF+efn4GE=
- 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=C3akP9de/4fcniTw17lWXpRtEy2X5fC/dbRKMk6sx+pP6DSwst6SC6IdnhzOsNOPRDuxHaWI/lcq3MbB2za8Z/y2UQvLo0Qcz5ZCq5dSUa4LMgxRJdltsJEIZgogkmAJeU2wVIhpL025AsuMuiQ6UQTlKYAYMD3zQ80oX+LRtlU=
- In-reply-to: <20071009015814.GA21038@mastermind>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200710081015.l98AFlIU018448@xxxxxxxxxxxxxx> <200710081338.l98Dc2br012284@xxxxxxxxxxxxxx> <dbfc82860710080705w6e90db9i2a9714caf27460c4@xxxxxxxxxxxxxx> <20071008141403.GA25326@xxxxxxxxxxx> <20071008151949.GA18576@mastermind> <dbfc82860710080830r289c962eyde18f1564e7f0de0@xxxxxxxxxxxxxx> <20071008154632.GB18576@mastermind> <dbfc82860710081532m5672197crf568b7d120ab192f@xxxxxxxxxxxxxx> <071008184445.ZM25513@xxxxxxxxxxxxxxxxxxxxxx> <20071009015814.GA21038@mastermind>
- Sender: nikolai.weibull@xxxxxxxxx
On 10/9/07, Matthew Wozniski <godlygeek@xxxxxxxxx> wrote:
> 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 was well aware of this.
> > } 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.
That's a good suggestion.
> 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.
Perhaps putting that in /etc/zlogout would work well enough.
Otherwise, zshexit might be the function to hook. Of course, if you
use either sharehistory or incappendhistory, perhaps more frequent
checks are desirable.
Messages sorted by: