dimo414 / ProfileGem

A shell configuration utility to compartmentalize and manage your terminal utilities and environment
GNU General Public License v3.0
22 stars 6 forks source link

Prefer .bash_profile as the install site? #18

Closed dimo414 closed 4 years ago

dimo414 commented 5 years ago

Original report by Michael Diamond (Bitbucket: dimo414).


As discussed here (and lots of other places), .bashrc is loaded on every shell invocation, whereas .bash_profile is only loaded on login. This suggests loading ProfileGem in .bash_profile would save some parsing time on each new shell interactive session in a given login.

It would have some disadvantages though:

It might be possible to support sourcing ProfileGem in both .bash_profile and .bashrc and have it short-circuit in .bashrc if nothing has changed (but still run all commands.sh).

dimo414 commented 4 years ago

No, this doesn't make sense. Login shells should source ProfileGem if they need to.