On Fri, Oct 01, 2004 at 12:36:58PM -0700, Wayne Davison wrote: > [non-appending history-file writing] will have to be improved in some > other manner, possibly by switching over to using a *.new file to > write out the new history lines Here's a patch that makes the savehistfile() function use a temporary file whenever it writes out the whole file from the start (rather than overwriting the existing file). This could be controversial if someone out there has a symlink for their history file (since it would get replaced by the temp file, and thus would no longer remain a symlink). The naming scheme I chose to use was to write out the history data using the name $HISTFILE.$$ since this naming idiom is already used for a temporary file name when acquiring the $HISTFILE.LOCK lock file (there's also no conflict with that use). If folks think that $HISTFILE.new is a better choice, it would be easy to change. Thoughts? Is this a desired change? ..wayne..