port prefix command
Joshua Root
jmr at macports.org
Wed Sep 19 21:06:36 PDT 2012
On 2012-9-20 10:32 , Jeremy Lavergne wrote:
>> There are plenty of ways to get around this in macports, but I think a port prefix command would make things simpler and should be easy to implement.
>>
>> Thoughts?
>
> Couldn't you just ".." off of the results from `which`?
>
> if [ -f `which port`/../../etc/bash_completion]; then
> . `which port`/../../etc/bash_completion
> fi
Indeed. And furthermore, if you can run port, you already have the
prefix somewhere in your shell init files since it's being used in the
definition of PATH. So you could just make it a variable and use it twice.
- Josh
More information about the macports-dev
mailing list