From owner-freebsd-ports@FreeBSD.ORG Sun Sep 21 21:52:56 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 C369A1065672 for ; Sun, 21 Sep 2008 21:52:56 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA07.emeryville.ca.mail.comcast.net (qmta07.emeryville.ca.mail.comcast.net [76.96.30.64]) by mx1.freebsd.org (Postfix) with ESMTP id A8F0C8FC1B for ; Sun, 21 Sep 2008 21:52:56 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA13.emeryville.ca.mail.comcast.net ([76.96.30.52]) by QMTA07.emeryville.ca.mail.comcast.net with comcast id HQQe1a00617UAYkA7Zsw9u; Sun, 21 Sep 2008 21:52:56 +0000 Received: from koitsu.dyndns.org ([67.180.253.227]) by OMTA13.emeryville.ca.mail.comcast.net with comcast id HZsv1a00L4v8bD78ZZsvkU; Sun, 21 Sep 2008 21:52:56 +0000 X-Authority-Analysis: v=1.0 c=1 a=9hNAWELOgeUA:10 a=pGOCM1lEfxUA:10 a=QycZ5dHgAAAA:8 a=i9Adma97lqdz9jFtsoYA:9 a=8UXA3fbvvL1v_LyGB3AA:7 a=_PX6rt7rHIfk3syp7YASXDlCTokA:4 a=EoioJ0NPDVgA:10 a=MSl-tDqOz04A:10 a=SV7veod9ZcQA:10 a=5WZzfXpOq_gA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 9288C17B81A; Sun, 21 Sep 2008 14:52:55 -0700 (PDT) Date: Sun, 21 Sep 2008 14:52:55 -0700 From: Jeremy Chadwick To: freebsd-ports@freebsd.org Message-ID: <20080921215255.GA9622@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Fwd: 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: Sun, 21 Sep 2008 21:52:56 -0000 Individual did not CC the mailing list on his response. -- | 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 | ----- Forwarded message from manish jain ----- > From: manish jain > To: Jeremy Chadwick > Date: Mon, 22 Sep 2008 01:54:46 +0530 > Subject: Re: Incorrect commandline history with bash > > Thanks Jeremy. Sourcing .bash_profile from .bashrc solved the problem. For > some reason, sourcing .bashrc from .bash_profile worked equally well with > the version of Linux I was previously using. > > Regards > Manish Jain > > > > On 9/21/08, Jeremy Chadwick wrote: > > > > On Sat, Sep 20, 2008 at 11:18:34PM +0530, manish jain wrote: > > > I just migrated from Linux and I am now using FreeBSD 6.3. My keyboard > > > layout is US-ISO and my TERM is con25. I am using bash#3 as my login > > shell. > > > (I installed the bash package from the distribution media, not from > > > /usr/ports). > > > > > > The problem is that bash does not remember my commands correctly. Almost > > all > > > commands I enter in a login session are forgotten in the next session. > > Using > > > the Up and Down arrow keys navigates a mangled and incomlete command > > > history. Even using Ctrl-r for a reverse find almost never fetches a > > command > > > I had actually typed in previously. > > > > > > 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 > > > > And all of your applicable environment settings should go in > > .bash_profile. This probably won't solve your problem, but I thought > > I'd point it out. > > > > > #.bashrc : > > > export HISTFILESIZE=200 > > > shopt -s cmdhist > > > shopt -s histappend > > > #end-of-file > > > > I set none of these things (though I do use export HISTTIMEFORMAT="%T " > > but that should not affect your problem) and my .bash_history always > > contains commands from past sessions, including timestamps too. > > > > My options are defaults: > > > > $ shopt | egrep 'cmdhist|histappend' > > cmdhist on > > histappend off > > > > Can you please try pkg_delete'ing the bash you installed from the > > installation media, and instead update your ports tree via csup (not > > cvsup) and then build/install bash from /usr/ports/shells/bash? > > > > Finally, please do not cross-post to multiple lists. It's shunned upon, > > and generally pointless as not everyone is subscribed to both lists. > > I've removed freebsd-questions@freebsd.org, as this could be a ports > > issue rather than a generic question. > > > > -- > > | 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 | > > > > ----- End forwarded message -----