Hacker News new | ask | show | jobs
by faho 1478 days 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)

1 comments

You could also pass the exit status into the program being called