Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
To: cygwin@cygwin.com
X-Injected-Via-Gmane: http://gmane.org/
Path: not-for-mail
From: Soren A <soren_andersen@fastmail.fm>
Subject: bash isn't running my .bashrc!
Date: Wed, 27 Nov 2002 15:33:56 +0000 (UTC)
Organization: Occasionally Sporadically
Lines: 27
Message-ID: <Xns92D36BD85FB42soren1Gmane@80.91.224.249>
NNTP-Posting-Host: ny-kenton2a-951.buf.adelphia.net
X-Trace: main.gmane.org 1038411236 28895 24.51.95.183 (27 Nov 2002 15:33:56 GMT)
X-Complaints-To: usenet@main.gmane.org
NNTP-Posting-Date: Wed, 27 Nov 2002 15:33:56 +0000 (UTC)
User-Agent: Xnews/L5
X-Archive: encrypt

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/

