Date: Sun, 21 Sep 2008 21:22:09 -0400 From: Garance A Drosihn <drosih@rpi.edu> To: Jeremy Chadwick <koitsu@FreeBSD.org> Cc: freebsd-ports@FreeBSD.org Subject: Re: Incorrect commandline history with bash Message-ID: <p06240802c4fca00b1500@[128.113.24.47]> In-Reply-To: <20080922002819.GA12610@icarus.home.lan> References: <20080921215255.GA9622@icarus.home.lan> <p06240801c4fc7c57b712@[128.113.24.47]> <20080922002819.GA12610@icarus.home.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
At 5:28 PM -0700 9/21/08, Jeremy Chadwick wrote: >On Sun, Sep 21, 2008 at 06:45:22PM -0400, Garance A Drosihn wrote: > > >> I do not understand how that makes any difference. He had all his >> commands in .bashrc, and sourced it from .bash_profile. If he >> moves all his commands to .bash_profile, and then sources that >> from his .bashrc, then isn't the result exactly the same? Either >> way, all commands should be executed no matter how bash starts up. > >The INVOCATION section of the bash man page goes over the subtle >differences. Okay, I've re-read it, and I'm still missing what the difference would be. I'm not arguing that you're wrong, I'm just saying that I don't understand it. Apparently your advice did help the person with the original problem, but I'm still sitting here with literally tens of thousands of RPI users who did it "the wrong way", and not one of them has ever reported a problem due to that. Now, most of those people have never used FreeBSD, but I've used this same setup on freebsd for at least 13 years, and have never seen a problem. Given: a) .bashrc sources .bash_profile or b) .bash_profile sources .bashrc In both cases, both .bashrc and .bash_profile will exist. So, any decision that bash makes based on the *existence* of either file should be the same. In both cases, both files exist. If bash picks one file to source, that file will either contain the commands to execute, or it will source the other file which contains those very same commands. I don't see how that could possibly make any difference. Obviously I'm then at a loss to explain how the problem went away for the original user. All I can guess is that maybe one of the files was permitted wrong, and he happened to fix that while moving the files around. I admit that doesn't seem likely, but I just cannot see how your advice managed to fix his problem. Sign me: Confused in Troy... -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p06240802c4fca00b1500>