What was happening with cd on exit was that if you ran it without the -p option then the next time you ran it with the -p option it wouldn't open in that directory.
For example if I open ~/downloads without the -p option the next time I open with the -p option I would expect it to be in the ~/downloads folder but instead it's in whichever directory I opened it from.
What was happening with cd on exit was that if you ran it without the -p option then the next time you ran it with the -p option it wouldn't open in that directory.
For example if I open ~/downloads without the -p option the next time I open with the -p option I would expect it to be in the ~/downloads folder but instead it's in whichever directory I opened it from.