3 ms·
I've been doing Unix for 30 years now and for the last 27 I've had all these scripts wired together. Or rather I have one script, then the others execute it. I
by NelsonMinar 6y ago
I've been doing Unix for 30 years now and for the last 27 I've had all these scripts wired together. Or rather I have one script, then the others execute it.
I get in theory why I'd want interactive login shells to have a fancier / more complex environment than others. Maybe I should care more about optimizing startup time of non-interactive shells. But really, who has the time to figure that stuff out?
- barrkel 6y agoIt's simple enough. Put env vars in bash profile and functions, aliases and other non-env (completion, nvm, rvm etc) in bashrc. Put the latter into the former and they aren't inherited. Put the former into the latter and path appends and other non-idempotent edits to env vars don't work correctly. Though I personally use some functions to make sure my path edits are idempotent for ease of iteration when editing.
- barrkel 6y ago(Oh and you want to source your .bashrc from your .bash_profile so you start out with both env vars and everything else.)
- thespoonbends 6y ago> It's simple enough. > (Oh and ...) +1 to just dumping it all in ~/.bashrc
- deleted 6y ago[deleted]
- m463 6y ago. ~/git/stuff/bash_common.sh