Hacker News new | past | comments | ask | show | jobs | submit login

It'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.




(Oh and you want to source your .bashrc from your .bash_profile so you start out with both env vars and everything else.)


> It's simple enough.

> (Oh and ...)

+1 to just dumping it all in ~/.bashrc




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: