manpath
Jay Levitt
lists-macports at shopwatch.org
Mon Oct 27 04:21:51 PDT 2008
Rainer Müller wrote:
> Shawn Protsman wrote:
>> To my surprise I got no entry found when I did a 'man port'. What is
>> the recommended method to add port manpages to the path?
>>
>> Create a '/etc/paths.d/macports'?
>>
>> Or add to .profile:
>>
>> export MANPATH=/opt/local/share/man:$MANPATH
>
> The latter. Using paths.d would append the MANPATH at the end, but
> usually you want to add new items in front of the system provided ones.
Of course, if you're obsessive, you can use numbered files in paths.d to
control the order, since path_helper reads files in alphabetical order.
1. Turn the default paths into numbered paths.d entries:
mv /etc/paths /etc/paths.d/500-defaults
mv /etc/manpaths /etc/manpaths.d/500-defaults
2. Remove the hidden super-defaults in /etc/profile, /etc/zprofile, and
/etc/csh.login by explicitly clearing PATH and MANPATH[1]:
if [ -x /usr/libexec/path_helper ]; then
PATH=""
eval `/usr/libexec/path_helper -s`
fi
3. Create /etc/paths.d/000-macports
And now you've got an easily-ordered paths.d.
Jay Levitt
[1] As discovered by
http://www.softec.st/en/OpenSource/DevelopersCorner/MasteringThePathHelper.html
More information about the macports-users
mailing list