Thanks, I'll check it out when I get back home. Are you able to reproduce the issue, or did it happen at random? Also, how did you close preenv and its parent shell (by executing "exit" twice, simply closing the window, or ..)? Update: I'm still not able to (re)produce any kind of issue with the history handling. This issue is driving me nuts! I must have looked over the code a hundred times by now. What completely puzzles me, are the reports about the completely unrelated text in .ash_history; I can't seem to relate that to BusyBox in any way .