Implement detection of shell's initialisation during history's update.
Fixing rewrite of the entire history, present in history's file.