On 2006-01-15 at 11:36:52 +0100, Martin Costabel <[EMAIL PROTECTED]> wrote:
> ... As "man bash" explains, ~/.bashrc is read by *interactive* shells > that are not login shells. If you start a non-interactive, non-login > shell, then by default *no* startup script is read at all. > > This has been discussed many times, and I know that some people are > not convinced, but I still think it is wrong to source /sw/bin/init.sh > automatically in every subshell. After all, you start your subshell > always inside an interactive environment, and environment variables > like PATH are meant to be transmitted to subshells, so it is > sufficient to run /sw/bin/init.sh once at startup (hence "login") of > the interactive environment in which your non-login shell is > started. If you need a different environment in your subshell, then > define it there. FWIW, I agree that sourcing /sw/bin/init.sh in every subshell is a bad idea. IMO, the confusing thing about bash is that login shells *don't* read ~/.bashrc, unless you tell it to in your ~/.bash_profile. It took me several readings of the (probably version 1.0.n) bash man page to figure out this deliberate incompatibility with sh. Also, in this day and age of graphical logins and everything else being client of *a* window server (my Mac is running two window servers right now) rather than *the* tty server, the source (pardon the pun) of a process' environment is not always as clear as it used to be. Also, the difference between a login shell and a non-login shell is also somewhat fuzzy (AFAICT, Terminal.app always starts login shells). Just venting a little, Dan Sommers -- Dan Sommers <mailto:[EMAIL PROTECTED]> <http://www.tombstonezero.net/dan/> ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Fink-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fink-users
