dimanche 30 novembre 2014

.bashrc script not being run from .bash_profile upon startup?


I have some system defaults that I want run each time I startup a new shell (This is for Mac OS X).


To have these defaults set in a startup shell, and a sub shell, I was told to create a .bashrc file, and then have that run from .bash_profile. So, I made (in my ~ (User/Root) directory) a .bashrc file that has a simple command:



alias ll='ls -lahG'
Echo "Hello World"


In my .bash_profile file I have the following:



if [ -f ~./bashrc ]; then
source ~/.bashrc
fi


For some reason, when I start up a new shell, "hello world" is not echoed and the alias does not work. However, if I type bash to begin a new "subshell" (if that is what they are called), "Hello World" does print, and the aliases work.


Any idea why my .bash_profile is either not running, or why the .bashrc file is not?


Thanks



Aucun commentaire:

Enregistrer un commentaire