delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/03/29/13:04:18

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=UKIwJUHWm2P2GnN7
PdxmULVr6fD5BpKhCWk16ar9BE0uhrDPPz9bV9LoBd4BXpXt24EROzE1d05lUyWe
sHVnFXlqzDBQHTET+VFd4o+AHkRCo3hqOPkAkPqoHmybuHDn4iDyXo+e/5rd+J+P
52mkEyLdfhu63aO619YoX/YDSrk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=artKN4QK7dcXB4qIGtkHre
+zvhA=; b=iHJHS+tGVZiOahcP/KDeB+gb5Jz29lnCg/YHBuNUXF5O5z7lv2YXgk
dmIgUxRRacx+Us+HyuhUaH/pYVLH33OjuEcxxClgoZZKiPPyOFPA09DB6el26USC
DLhYFP4/19OULeGt3LQ8Mpwad9YPkdKW2R9jlR6JbfcTtYKGcIviQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:731, Furash, H*f:sk:CABdLNw, H*i:sk:CABdLNw
X-HELO: limerock03.mail.cornell.edu
X-CornellRouted: This message has been Routed already.
Subject: Re: .bashrc not sourced
To: cygwin AT cygwin DOT com
References: <CABdLNwARbwP_QXox3Owc1AHF174Ut5c010z12-wFWsm-hxoPvA AT mail DOT gmail DOT com>
From: Ken Brown <kbrown AT cornell DOT edu>
Message-ID: <56FAB57A.4020905@cornell.edu>
Date: Tue, 29 Mar 2016 13:03:54 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1
MIME-Version: 1.0
In-Reply-To: <CABdLNwARbwP_QXox3Owc1AHF174Ut5c010z12-wFWsm-hxoPvA@mail.gmail.com>
X-IsSubscribed: yes

On 3/29/2016 11:04 AM, Gary Furash wrote:
> When I log on w/ Mintty or Bash (via the bat file) it takes me to my
> home directory but doesn't automatically source .bashrc.

It's only in non-login shells that .bashrc gets sourced by default.  If 
you want it to be sourced in login shells, you should do that in your 
~/.bash_profile file.  (See the section on startup files in the bash 
manual.)

For example, here's what the default .bash_profile does:

$ cat /etc/defaults/etc/skel/.bash_profile
[...]
# ~/.bash_profile: executed by bash(1) for login shells.
[...]
# User dependent .bash_profile file

# source the users bashrc if it exists
if [ -f "${HOME}/.bashrc" ] ; then
   source "${HOME}/.bashrc"
fi

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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