3 ms·
Well, yeah, if you source the file (for which `.` is a shortcut) it runs in the current shell so the environment is intact. If you just run it it won't work.
by faho 4y ago
Well, yeah, if you source the file (for which `.` is a shortcut) it runs in the current shell so the environment is intact.
If you just run it it won't work.
So instead of running `boop` you would always have to `source boop` or `. boop`. A function or alias you could just run like normal.
(and `export ?` complains about ? being an invalid identifier in bash, in zsh `export "?"` apparently "works", but will reset it before you get a chance to print it in another process)
- NegativeLatency 4y agoYou could also pass the exit status into the program being called