On Thu, May 2, 2013 at 11:34 PM, Ian Wadham <[email protected]> wrote:

> still are.  In Linux and Unix I would have put such commands in .bashrc
> or, back in the day, .kshrc.
>

Nobody cares these days (until they try to use
modules/virtualenv/perlbrew/rvm/hsenv and then they complain a lot because
their broken setup turns out to be broken, and clearly this is someone
else's fault) but you should really NEVER put environment settings into
.bashrc/.zshenv/.kshrc($ENV) files. They are read per shell invocation
instead of per session and will wipe out any changes made by special
sessions, such as those used by environment managers like the ones I named
above.

I got the impression, too, that .bashrc does not run when you start
> an Apple Terminal window, but only when you manually start a new
> "bash" shell.
>

bash does not run .bashrc automatically in a login shell, it assumes you
are doing what you need in .profile / .bash_profile. Accordingly, it is
common for those to source .bashrc.

Note that this is a bash-specific behavior; zsh will run .zshenv for login
shells, {,t}csh will run .{t,}cshrc for login shells. ksh follows slightly
different rules, though (see $ENV).

-- 
brandon s allbery kf8nh                               sine nomine associates
[email protected]                                  [email protected]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
_______________________________________________
macports-users mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to