In golang (as well as bash scripting) if I change the current working directory (with os.Chdir) it works, but when the program terminates the working directory gets reset to the location it had when the program started.
It makes sense, but what I want to do is an inteligent disk navigator (something like our old and beloved ncd, "Norton Change Directory").
How can I tell the binary (or the shell that starts it, or whatever) not to reset to the previous working path?
I would like to achieve that entirely from within the Go binary, without modifying .bashrc or .zshrc (for portability)