help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make emacs to run my ~/.bash_profile


From: Pascal J. Bourguignon
Subject: Re: How to make emacs to run my ~/.bash_profile
Date: Sun, 20 Sep 2009 11:45:42 +0200
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin)

Tim X <timx@nospam.dev.null> writes:

> Wang Lei <fxhjgzydw@gmail.com> writes:
>
>> I think .bash_profile is only executed once, just after login.
>> .bashrc is the actual executed file when starting a shell.
>
> Just to try and clarify....
>
> The .bash_profile is only executed for a login shell. 
> The .bashrc is executed for every shell.
> The idea is to put all the static environment settings in your
> .bash_profile and dynamic settings that change depending on dynamic data
> in the .bashrc. At a guess, I'd say this seperation was from the days
> when computers were a lot slower and you worked hard to minimise the
> work being done. As sub-shells inherit the environment of their parent
> shell, there is no advantage in redefining static data every time a new
> shell is executed. 

However, with GUI environments, often the do you load .bash_profile
(and arguably with reason, since the Finder or GNOME are not bash.

Some terminal emulator have an option to launch the shells as login
shells, so they may load their login RC files.  But not all do that,
and not all users know to set this option.

That's why my .bash_login is empty, and my .bash_profile contains only:

    [ -f ~/.bashrc ] && . ~/.bashrc

and everything's in my '.bashrc'...

-- 
__Pascal Bourguignon__


reply via email to

[Prev in Thread] Current Thread [Next in Thread]