crasch (crasch) wrote,

How do I get not to source .bash_profile?

I use bash as my shell. As I understand it, the contents of the .bash_profile should only be executed once, when I login to my account. (The contents of .bashrc are supposed to be sourced every time I launch a new non-login shell.)

However, every time I open a new window on Mac OS X, it sources the contents of both my .bash_profile and .bashrc files. I believe this is because the default preferences are set as follows, "When creating a new Terminal window: Execute the default login shell using /usr/bin/login".

You can change that preference to "Execute this command (specify complete path): /bin/bash" (Where /bin/bash can be the path to any shell you wish). However, even when I change the new window behavior to the latter preference, .bash_profile is still sourced whenever a new terminal window is launched.

Does anyone know how to tell not to source .bash_profile except at login?
Tags: bash, programming
  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened