Setting primary executable instance
tim at akwebsoft.com
Sun Oct 19 18:31:38 PDT 2014
* Brandon Allbery <allbery.b at gmail.com> [141019 17:20]:
> On Sun, Oct 19, 2014 at 9:05 PM, Tim Johnson <tim at akwebsoft.com> wrote:
> > I've installed emacs 24.
> > If I do
> > which -a emacs
> > I get
> > /opt/local/bin/emacs ## New emacs
> > /usr/bin/emacs ## Old emacs
> 1. "which" lies a lot. use "type".
> 2. Which one is found depends on a number of things:
> a. the order of directories in $PATH; earlier ones override later ones.
> (MacPorts install normally puts /opt/local/bin at the front of $PATH.)
> b. most shells do command hashing of some kind (this is one of the
> reasons that "which" lies, as it usually can't see either the current value
> of $PATH or the command hash in your current shell, whereas "type" is
> required to be a shell builtin that shows what your shell actually
> "knows"); depending on your shell, "hash -r" or "rehash" will force it to
> flush its command hash and see changes in $PATH.
> And no, the port command can't reach into your shell and make it do
> something different automatically, at least not without tricky operations
> that could make it dump core instead. You must do that yourself.
Good tips. Thanks.
tim at tee jay forty nine dot com or akwebsoft dot com
More information about the macports-users