Closed punassuming closed 8 years ago
Hi there!
Thanks for the commit and pull request. The problem with hooking into the exit event is that it's only fired if the user clicks the "X" button. Exiting from the command prompt using the "exit" command will exit without the event firing. This means your history changes could be excluded altogether.
How big exactly is your history file which is slowing it down that much?
Just thinking about this, perhaps it should be configurable.
@vincpa, I just found there is a handler for using exit as well, would you be interested in this option if both handlers were used?
Absolutely. Losing my history at the start of each session is painful.
Only save directory listing on exit.
I have profiled the script and a large portion of the time when performing a
cdX
is saving the cdHistory. This will save the file on exit with a hook.