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

Re: history editing



On Nov 21,  2:30pm, Danek Duvall wrote:
> 
> I think this was the key I was missing.  fc -R doesn't replace the
> current history with what it reads in, it adds it to the end.
> 
> I'm surprised, then, that this ever worked.

If $SAVEHIST is greater than $HISTSIZE and the file that you're editing was
non-empty before, then after editing there could still be more than $HISTSIZE
lines in the file.  In that event you'd read in the last $HISTSIZE of those
lines, pushing the entire current history out.

In other words, you only see the effect you were seeing when the number of
lines in the file is less than or equal to $HISTSIZE.



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