.bashrc .profile .bash_profile

Brandon Allbery allbery at kf8nh.com
Tue Oct 6 18:22:19 PDT 2009


On Oct 4, 2009, at 21:17 , Scott Haneda wrote:
>>> If I do not have my aliases and such in .bashrc, my `sudo -s` env  
>>> is pretty stark, and hard to work in. I do not need all my  
>>> settings to come over when in this `sudo -s` mode, but I certainly  
>>> would like the macports paths and other things to make it.
>>
>> Aliases aren't inherited; they belong in .bashrc.  (Shell functions  
>> can be inherited, but now we're getting into distinctions you  
>> probably don't want to know, much less care, about.)
>
> I get curious, :) you sent another email with some good links and  
> references in them, I will be going thought them.  My experience  
> shows they *are* inherited..

Not necessarily unless you arranged for .bashrc to not load in those  
cases (it will be loaded by default).

> The core idea, was to alias `rm` to `rm -i`, and how doing so would  
> break many other scripts and apps.  I walked away thinking, whatever  
> the case may be, that the developer of the app or script should not  
> use `rm` but should fish out the real path toe `rm` and use the full  
> path.

Actually, any serious script should reset the PATH to a known set of  
directories (and also reset IFS, CDPATH, and a number of other  
"interesting" environment variables).

> So, can I use it and not export it?  It seems in all examples I can  
> find, CLICOLOR_FORCE needs to be exported, but maybe there is a  
> "set" way to do it, 'SET CLICOLOR_FORCE' in which case it would not  
> be exported, but just available to me for my session?

Is there some reason you insist on CLICOLOR_FORCE instead of  
CLICOLOR?  This *will* hurt you.

There's a way to set it without exporting it, yes --- but if it's not  
exported, ls won't see it.

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20091006/3d289470/attachment.bin>


More information about the macports-users mailing list