Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: How to make APPENDHISTORY useful?



On Feb 13,  3:53pm, Wayne Davison wrote:
> Subject: Re: How to make APPENDHISTORY useful?
> "Bart Schaefer" writes:
> > but once the file gets full you're back to one of
> > the states described above.
> 
> Not quite.  Since savehistfile() only appends newly entered lines

Ah, that's what I'm missing.

Still, I typically leave my shells running for days or even weeks at a
time; the odds of my not entering SAVEHIST new lines in any given shell
are vanishingly small.

> One simple solution is to have zsh call savehistfile() every N lines when
> APPEND_HISTORY is set.

Another, even simpler, solution would be to separate variables for "how big
is the history file" and "how many lines do I append to it" -- rather than
have SAVEHIST mean both things.



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