delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/27/10:36:29

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
Path: not-for-mail
From: Soren A <soren_andersen AT fastmail DOT 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 AT main DOT gmane DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019