From owner-freebsd-ports@FreeBSD.ORG Mon Sep 22 00:22:30 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD4F31065672 for ; Mon, 22 Sep 2008 00:22:30 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA10.emeryville.ca.mail.comcast.net (qmta10.emeryville.ca.mail.comcast.net [76.96.30.17]) by mx1.freebsd.org (Postfix) with ESMTP id BC56F8FC23 for ; Mon, 22 Sep 2008 00:22:30 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA03.emeryville.ca.mail.comcast.net ([76.96.30.27]) by QMTA10.emeryville.ca.mail.comcast.net with comcast id HRoW1a0070b6N64AAcNWss; Mon, 22 Sep 2008 00:22:30 +0000 Received: from koitsu.dyndns.org ([67.180.253.227]) by OMTA03.emeryville.ca.mail.comcast.net with comcast id HcNV1a00B4v8bD78PcNVKw; Mon, 22 Sep 2008 00:22:30 +0000 X-Authority-Analysis: v=1.0 c=1 a=JdViZEfnDJgA:10 a=2X2Dv3S5izkA:10 a=QycZ5dHgAAAA:8 a=y9jfoLYQFkJ4gX7eZr0A:9 a=2AGnmntf7SD7TT832-lNPb16rDAA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 5E1A317B81A; Sun, 21 Sep 2008 17:22:29 -0700 (PDT) Date: Sun, 21 Sep 2008 17:22:29 -0700 From: Jeremy Chadwick To: Jo Rhett Message-ID: <20080922002229.GA12314@icarus.home.lan> References: <20080921215255.GA9622@icarus.home.lan> <34CFC7BB-E7D2-4B34-9D85-70F4C8E718E2@netconsonance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <34CFC7BB-E7D2-4B34-9D85-70F4C8E718E2@netconsonance.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-ports@freebsd.org Subject: Re: Incorrect commandline history with bash X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2008 00:22:30 -0000 On Sun, Sep 21, 2008 at 03:54:12PM -0700, Jo Rhett wrote: > > On Sep 21, 2008, at 2:52 PM, Jeremy Chadwick wrote: >>> The following are the contents of my .bash_profile and .bashrc: >>> >>> #.bash_profile : >>> [ -f ~/.bashrc ] && source ~/.bashrc >>> #end-of-file >> >> You have this backwards. ~/.bashrc should contain something like >> this: >> >> if [ -f "${HOME}/.bash_profile" ] >> then >> source "${HOME}/.bash_profile" >> fi > > Jeremy, I'm not sure what version of FreeBSD you are using but I'd like > to point out that in 6.2 and 6.3-REL his version is correct and yours > will not work. That's funny, because mine does work. I spent quite a lot of time looking at the bash man page over the years to determine how to properly meet said needs. I use the exact same setup on Solaris 7/8/9/10 (bash v2) and FreeBSD 4/5/6/7/8 (bash v3), and it works exactly how the man page describes. > .bashrc is not sourced on login on any of my hosts. I have ". > ~/.bashrc" in my .bash_profile. And I just commented it out, and > .bash_profile environment was set up, and the stuff in .bashrc was not. Everyone lecturing me needs to read, slowly, the INVOCATION part of the bash man page. The method I described above should become apparent afterwards. > Is this perhaps an X versus SSH login sort of thing? I don't know. We > have no X environment, this is entirely logging in via SSH. No, I do not use X anywhere. The OP may be using it. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |