On Fri, 29 Jun 2001, Vincent Lefevre wrote: > It seems that cmd2 simply disappeared from the history; cmd2 probably > was the last command I typed in the shell, then I logged out, and > logged in again (thus, the xinit in the history just after cmd1). I was finally able to reproduce a case where the shell failed to save the very last command in the history. It only occurs when the Zle history is active and the shell gets a signal that causes it to die. In these circumstances, the save-history code is subtracting 1 from the maximum number of events that it will save (so that the last, unfinished line is not written out), but since the code is really rewriting the history file using an alternate history buffer, the real result is that it loses the last line in the just-read data. So, do you know if you were exiting the shell via some kind of signal rather than typing something like "exit"? If so, try the attached patch and see if this fixes the problem. ..wayne..