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

vanishing history



Does anyone have any idea why my .zshhistory occasionally looses the
vast majority of its contents?  I can't reproduce it, so I can't begin
to track down what's going on.  I have the following settings:

HISTSIZE=3000
cshjunkiehistory
extendedhistory
histallowclobber
histexpiredupsfirst
histignorealldups
histignoredups
histreduceblanks
histverify
incappendhistory

I'm running 4.1.0-dev-2 from CVS.  I have a _very_ vague suspicion
that it might be something to do with running different versions of
zsh on the same history file, or maybe zcompile comes into it somehow,
but really I haven't a clue.  I wanted to get my .zshrc to
automatically alert me when it happens, via:

  _check_hist_size () {
    fc_out=( $(fc -l -1) )
    if (( "$fc_out[1]" < 500 )); then
      print "\nWARNING: Small history ($fc_out[1]) detected\!"
    fi
  }

but that just resulted in:

  _check_hist_size:fc:1: no such event: 0
  _check_hist_size:2: no such file or directory: 500



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