CFR: Replace man/manpath/whatis/apropos with a shell script
Anonymous
swell.k at gmail.com
Sat Sep 11 14:01:51 UTC 2010
Stefan Bethke <stb at lassitu.de> writes:
> Am 11.09.2010 um 09:35 schrieb Gordon Tetlow:
>
>> On Thu, Sep 9, 2010 at 8:17 PM, Anonymous <swell.k at gmail.com> wrote:
>>
>>> Gordon Tetlow <gordon at tetlows.org> writes:
>>>
>>>> 2. Imports configuration from /usr/local/etc/man.d/*.conf and
>>> /etc/man.conf
>>>> (purposefully changed the manpath.config file since it is a different
>>>> syntax).
>>>
>>> Hmm, and if LOCALBASE != /usr/local? hier(7) does not specify /usr/local
>>> as the only place installed packages may reside in, only default one.
>>>
>>
>> That variable is not easily found in shell. I'm open to suggestions on how
>> to figure it out. I suppose I could try something like make -V LOCALBASE
Nah, don't bring make(1) dependency. The user may have WITHOUT_MAKE in
his src.conf. So, just use LOCALBASE from environment if it's defined.
>> since it would be in /etc/make.conf if it is set. Another alternative would
>> be to parse the PATH and look for ../etc/man.d for each path component. That
How about let user control search_path behaviour?
PATH_MAN_SUB bin/../man
PATH_MAN_SUB bin/../.man # e.g. for ~/.bin + ~/.man
PATH_MAN_SUB /usr/bin/../share/man
PATH_CONF_SUB bin/../etc/man.d
It's a bit more flexible than MANPATH_MAP ever was. BTW, if you care
about aesthetics ../../../../ can be eleminated with realpath(1).
>> would be even more generic (and allow for the user to customize it
>> potentially).
>
> Take it from /etc/man.conf, like the rc.d paths are resolved?
This'll work, too. I already have to set a bunch of variables in rc.conf
because rc.d avoids LOCALBASE as some kind of curse. While environ(7)
exist just for that, make using non-default configuration more easy.
More information about the freebsd-current
mailing list