This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bash isn't running my .bashrc!


Actually, my .bashrc is running fine. The Subject: was a honeypot
strategy. 

AFAICT by reading the Fine Documentation for bash, an *interactive*
shell (one invoked with the option flag "-i") does *not* automatically
cause the initialization to include source'ing of .bashrc in the user
$HOME dir. I have gotten the impression that some people think it does. 

In order to get one's .bashrc to be included in shell initialization,
one needs (TTBOMK) to explicitly tell bash to do it. This directive
should be at the end of either one's /etc/profile file or in a later
~/.profile (or the alternate name ~/.bash_profile), depending on whether
one uses the latter or not. 

------------------------------8<---------------------------------------

if [[ $- == *i* ]] ; then
[ -s ~/.bashrc ] && . ~/.bashrc || echo 'No ~/.bashrc!'
fi

------------------------------8<---------------------------------------

  HTH.

-- 
Yes, it's really Sören, not Soren.




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]