Re: Why is this not working?
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 05/28/04
- Previous message: Stephane CHAZELAS: "Re: Why is this not working?"
- In reply to: Stephane CHAZELAS: "Re: Why is this not working?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 May 2004 17:13:19 -0400
In article <slrncbepev.14o.stephane.chazelas@spam.is.invalid>,
Stephane CHAZELAS <this.address@is.invalid> wrote:
> 2004-05-28, 11:30(-04), Barry Margolin:
> >
> >> But if you make it a login shell, it won't read .bashrc, will it? It will
> >> read .profile and .bash_login...
> >
> > No, login shells execute *both* .profile and .bashrc.
> >
>
> Only if you have a ". .bashrc" in your ".profile".
> That's not very intuitive, I agree.
You're right. I was thinking of csh/tcsh, which executes both .login
and .cshrc when a login shell starts up.
I wonder why bash did it this way. .profile is for things you want done
once per login session, but .bashrc is for things that should be done in
every interactive shell. Why wouldn't you want the latter to be done in
a login shell? For the rare cases where you don't want this, there
could be something like "set nobashrc" to suppress loading the .bashrc
after .profile.
-- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
- Previous message: Stephane CHAZELAS: "Re: Why is this not working?"
- In reply to: Stephane CHAZELAS: "Re: Why is this not working?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|