On Wed, 6 Jul 2011, Chris Blouch wrote:

export PATH=./:$PATH

That adds the ./ location plus all the existing path settings. Now you should be able to just run foo from wherever you are without putting the ./ in front.

This is not recommended, however. All you need is some nasty script or whatever to plonk something in your working directory that has the same name as a standard system program (e.g. ls) and you could find yourself running their nasty program instead of the program you meant to run.

Of course, if you used:

echo PATH=$PATH:.

instead, at least it would search in the standard search path before finding your local binary. But personally I prefer just to type "./" before whatever it is I want to run. At least I'm meaning to run the program.

Geoff.

--
You received this message because you are subscribed to the Google Groups 
"MacVisionaries" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/macvisionaries?hl=en.

Reply via email to